Browse Source

[PATCH] usbfs: use the correct signal number for disconnection

usbfs stores the wrong signal number in the siginfo structure used for
notifying user programs about device disconnect.  This patch (as726)
fixes it.

From: Zoran Marceta <Zoran.Marceta@micronasnit.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Zoran Marceta 19 năm trước cách đây
mục cha
commit
58a5b0a634
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/usb/core/inode.c

+ 1 - 1
drivers/usb/core/inode.c

@@ -695,7 +695,7 @@ static void usbfs_remove_device(struct usb_device *dev)
 		wake_up_all(&ds->wait);
 		list_del_init(&ds->list);
 		if (ds->discsignr) {
-			sinfo.si_signo = SIGPIPE;
+			sinfo.si_signo = ds->discsignr;
 			sinfo.si_errno = EPIPE;
 			sinfo.si_code = SI_ASYNCIO;
 			sinfo.si_addr = ds->disccontext;