lkml.org 
[lkml]   [2003]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [BK PATCHES] libata fixes
Linus Torvalds wrote:
>
> On Fri, 5 Dec 2003, Jeff Garzik wrote:
>
>>Linus, please do a
>>
>> bk pull bk://gkernel.bkbits.net/libata-2.5
>>
>>This will update the following files:
>>
>> drivers/scsi/libata-core.c | 17 ++---
>> drivers/scsi/sata_promise.c | 128 +++++++++++++++++++++++++-------------------
>
>
> Right now, I'm accepting one-liners that I think are "obvious" and also
> "very important" (ie fixes for oopses that anybody can trigger, rather
> than for example updates to one particular driver). So it sounds like I
> might accept _one_ of these:
>
>
>><jgarzik@redhat.com> (03/12/05 1.1498)
>> [libata] fix use-after-free
>>
>> Fixes oops some were seeing on module unload.
>>
>> Caught by Jon Burgess.
>
>
> If this is basically an obvious one-liner ("move a kfree")?
>
> Andrew is still off, and he can make a decision independently, but right
> now I'm not going to apply anything bigger.


Yep, split out and attached...

Jeff


# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1497 -> 1.1498
# drivers/scsi/libata-core.c 1.8 -> 1.9
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/12/05 jgarzik@redhat.com 1.1498
# [libata] fix use-after-free
#
# Fixes oops some were seeing on module unload.
#
# Caught by Jon Burgess.
# --------------------------------------------
#
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c Fri Dec 5 13:46:54 2003
+++ b/drivers/scsi/libata-core.c Fri Dec 5 13:46:54 2003
@@ -3224,8 +3224,6 @@
scsi_host_put(ap->host); /* FIXME: check return val */
}

- kfree(host_set);
-
pci_release_regions(pdev);

for (i = 0; i < host_set->n_ports; i++) {
@@ -3242,6 +3240,7 @@
}
}

+ kfree(host_set);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}
\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.035 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site