Help debug for bug 6651 - smbd SIGSEGV when breaking oplocks.
authorJeremy Allison <jra@samba.org>
Tue, 25 Aug 2009 04:14:52 +0000 (21:14 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 25 Aug 2009 04:14:52 +0000 (21:14 -0700)
Should help track if we get invoked with an invalid fd from
the signal handler.
Jeremy.

source3/smbd/oplock_linux.c

index b4a5495e4b10b2b679d6d095bc0263db9fe64d4e..535e80961630f3c084a95d6c592eb4c84f1a2dd1 100644 (file)
@@ -98,6 +98,10 @@ static void linux_oplock_signal_handler(struct tevent_context *ev_ctx,
        files_struct *fsp;
 
        fsp = file_find_fd(fd);
+       if (fsp == NULL) {
+               DEBUG(0,("linux_oplock_signal_handler: failed to find fsp for file fd=%d\n", fd ));
+               smb_panic("linux_oplock_signal_handler\n");
+       }
        break_kernel_oplock(smbd_messaging_context(), fsp);
 }