lkml.org 
[lkml]   [2007]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix crash in sbp2_remove_device() when dma_set_mask() fails
On  6 Aug, Olaf Hering wrote:
> --- a/drivers/ieee1394/sbp2.c
> +++ b/drivers/ieee1394/sbp2.c
> @@ -929,13 +929,14 @@ static void sbp2_remove_device(struct sb
> if (!lu)
> return;
>
> - hi = lu->hi;
> -
> if (lu->shost) {
> scsi_remove_host(lu->shost);
> scsi_host_put(lu->shost);
> }
> flush_scheduled_work();
> + hi = lu->hi;
> + if (!hi)
> + return;

We need to kfree lu here. Patch comes right away.

> sbp2util_remove_command_orb_pool(lu);
>
> list_del(&lu->lu_list);
> @@ -977,8 +978,7 @@ static void sbp2_remove_device(struct sb
>
> lu->ud->device.driver_data = NULL;
>
> - if (hi)
> - module_put(hi->host->driver->owner);
> + module_put(hi->host->driver->owner);
>
> kfree(lu);
> }


--
Stefan Richter
-=====-=-=== =--- -=-==
http://arcgraph.de/sr/

-
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/

\
 
 \ /
  Last update: 2007-08-11 11:47    [W:0.035 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site