Commit 4e9f2a9a authored by Anton Blanchard's avatar Anton Blanchard Committed by James Bottomley

[PATCH] another fix to sym2 hotplug conversion

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.
parent 1aac244b
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment