]> git.hungrycats.org Git - linux/commitdiff
[PATCH] another fix to sym2 hotplug conversion
authorAnton Blanchard <anton@samba.org>
Sat, 16 Aug 2003 04:00:01 +0000 (23:00 -0500)
committerJames Bottomley <jejb@fuzzy.(none)>
Sat, 16 Aug 2003 04:00:01 +0000 (23:00 -0500)
In sym_attach we call sym_hcb_attach. If it fails we call
sym_free_resources which will call sym_hcb_free. Unfortunately
sym_hcb_attach also calls sym_hcb_free on failure.

This results in a bunch of things being freed twice and it looks like
the sym2 memory allocator adds them to the freelist twice. Sometime later
on we allocate the memory twice, with weird consequences.

drivers/scsi/sym53c8xx_2/sym_hipd.c

index 7e228977fa1c7f0c42bfbded9896223fdce6830b..7d83f2c288699998ce0cf8d518ecaf51641220fc 100644 (file)
@@ -5942,14 +5942,7 @@ int sym_hcb_attach(hcb_p np, struct sym_fw *fw)
         */
        return 0;
 
-       /*
-        *  We have failed.
-        *  We will try to free all the resources we have 
-        *  allocated, but if we are a boot device, this 
-        *  will not help that much.;)
-        */
 attach_failed:
-               sym_hcb_free(np);
        return -ENXIO;
 }