Re: [PATCH] Fix SCSI proc oops

From: Torben Mathiasen (torben@kernel.dk)
Date: Fri Oct 13 2000 - 06:34:17 EST


On Thu, Oct 12 2000, David S. Miller wrote:
>
[snip]

> 1) No host adapters for this tpnt were ever registered
> 2) All host adapters for this tpns were successfully
> removed by this loop above the test in question:
>
> /* Next we go through and remove the instances of the individual hosts
> * that were detected */
>
> pcount0 = next_scsi_host;
> for (shpnt = scsi_hostlist; shpnt; shpnt = sh1) {
>
> Both events leave us with tpnt->present == 0, but only in the #2 case
> do we want to do the unlink and procfs deletions.
>
> It's very easy to fix, Torben can you try this (untested) patch?
>

Yes it works, its not all that different from my patch ;). AFAIK its the
(!tpnt->present) that fixes the oops as it seems remove_proc_entry
doesn't care wether this proc entry really exists or not. Adding
orig-present only saves some code from being executed. We should
keep it though, this might change in the future.

Linus would you mind incresing the Revision number in scsi.c when you
apply the patch.

-- 
Torben Mathiasen <tmm@kernel.dk>
Linux ThunderLAN maintainer 
http://tlan.kernel.dk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:24 EST