[PATCH] ehea: Fix: Remove adapter from adapter list in error path
Stefan Richter
stefanr at s5r6.in-berlin.de
Thu Feb 12 01:15:34 EST 2009
Hannes Hering wrote:
> Remove adapter from adapter list before freeing data structure in error path.
...
> --- linux-2.6.29-rc4/drivers/net/ehea/ehea_main.c 2009-02-11 13:13:47.812542928 +0100
> +++ patched_kernel/drivers/net/ehea/ehea_main.c 2009-02-11 13:14:04.197540184 +0100
> @@ -3448,6 +3448,7 @@ out_kill_eq:
> ehea_destroy_eq(adapter->neq);
>
> out_free_ad:
> + list_del(&adapter->list);
> kfree(adapter);
>
> out:
On a related note, ehea_set_mac_addr()/ehea_update_bcmc_registrations()
accesses adapter_list without serialization by ehea_fw_handles.lock and
thus apparently unsafely.
There may be other unsafe accesses of adapter_list; that's just the
first one which I spotted.
--
Stefan Richter
-=====-==--= --=- -=-==
http://arcgraph.de/sr/
More information about the Linuxppc-dev
mailing list