Help debug for bug 6651 - smbd SIGSEGV when breaking oplocks.
[ira/wip.git] / 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);
 }