Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] sbp2 slab corruption fix

This fixed a problem that showed up in the Fedora development tree a few
weeks before the Fedora Core 4 release, initially as slab corruption, later
as hard crashes on boot up, when slab debugging was disabled for the
release. More details on the history at
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158424

The problem is caused by sbp2's use of scsi_host->hostdata[0] to hold a
scsi_id, without explicitly requesting space for it. Since hostdata is
declared as a zero-sized array, we don't get any such space by default, so
it must be explicitly requested. The patch below implements just that.

Signed-off-by: Alexandre Oliva <aoliva@redhat.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Alexandre Oliva and committed by
Linus Torvalds
a2ef79e1 bcfff0b4

+2 -1
+2 -1
drivers/ieee1394/sbp2.c
··· 745 745 list_add_tail(&scsi_id->scsi_list, &hi->scsi_ids); 746 746 747 747 /* Register our host with the SCSI stack. */ 748 - scsi_host = scsi_host_alloc(&scsi_driver_template, 0); 748 + scsi_host = scsi_host_alloc(&scsi_driver_template, 749 + sizeof (unsigned long)); 749 750 if (!scsi_host) { 750 751 SBP2_ERR("failed to register scsi host"); 751 752 goto failed_alloc;