]> git.proxmox.com Git - mirror_frr.git/commit
lib: avoid crash when cancelling invalid rw job
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 1 Dec 2017 19:44:32 +0000 (14:44 -0500)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 16 Jan 2018 20:28:26 +0000 (15:28 -0500)
commit42d745387a0b75f539b6ad45e32305199b59c53a
treefbb2c3b57aecdafa56d939d690d297ed32f2c0d0
parent23b6084b8cc5acc4d1b1686a7cc3a8d2f6b03518
lib: avoid crash when cancelling invalid rw job

There are some observed instances where we end up trying to cancel a rw
job based on a file descriptor that we don't have a reference on. The
specific cancel function for rw jobs assumes it's called with a file
descriptor that is valid within pollfds and will cause a segmentation
fault by buffer overrun if this is not the case.

Instead log it and move on. Since the fd does not exist this should
patch over the buggy behavior and provide additional information to help
in finding the root cause.

Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/thread.c