Re: ide-scsi segfaults under 2.5.44

From: Mike Anderson (andmike@us.ibm.com)
Date: Sun Oct 20 2002 - 13:18:25 EST


Thomas,
        It looks like sg.c was missed in the update from put_device to
        device_unregister.

I have only compile tested the patch below, but it should fix the
problem. I will have a chance to run later on today.

Thomas Molina [tmolina@cox.net] wrote:
> Oct 19 22:10:30 dad kernel: [<d905f780>]
> scsi_driverfs_bus_type_Rfc6baff9+0x0/0x80 [scsi_mod]
> Oct 19 22:10:30 dad kernel: [<c01d0b78>] put_driver+0x28/0x50
> Oct 19 22:10:30 dad kernel: [<d9097028>] sg_template+0x48/0xa0 [sg]
> Oct 19 22:10:30 dad kernel: [<d90928ac>] exit_sg+0x4c/0x50 [sg]
> Oct 19 22:10:30 dad kernel: [<d9097028>] sg_template+0x48/0xa0 [sg]
> Oct 19 22:10:30 dad kernel: [<c0119e1e>] free_module+0x1e/0xb0
> Oct 19 22:10:30 dad kernel: [<c01192f7>] sys_delete_module+0xe7/0x1c0
> Oct 19 22:10:30 dad kernel: [<c0108adf>] syscall_call+0x7/0xb
> Oct 19 22:10:30 dad kernel:
-andmike

--
Michael Anderson
andmike@us.ibm.com

sg.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) ------

===== drivers/scsi/sg.c 1.30 vs edited ===== --- 1.30/drivers/scsi/sg.c Fri Oct 18 11:27:30 2002 +++ edited/drivers/scsi/sg.c Sun Oct 20 10:59:33 2002 @@ -1607,7 +1607,7 @@ sdp->de = NULL; device_remove_file(&sdp->sg_driverfs_dev, &dev_attr_type); device_remove_file(&sdp->sg_driverfs_dev, &dev_attr_kdev); - put_device(&sdp->sg_driverfs_dev); + device_unregister(&sdp->sg_driverfs_dev); if (NULL == sdp->headfp) vfree((char *) sdp); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:50 EST