]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tcm_fc: Do not free tpg structure during wq allocation failure
authorMark Rustad <mark.d.rustad@intel.com>
Tue, 3 Apr 2012 17:24:52 +0000 (10:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 16:13:55 +0000 (09:13 -0700)
commit9fb1fd78804e9c0e477aafa69cd4d31b0a7ef5f0
tree2231baae8dd7439f5d44f8d5a98ab1b6a11aef79
parentc63d7f685447174639431744c7b0e1884f2a3742
tcm_fc: Do not free tpg structure during wq allocation failure

commit 06383f10c49f507220594a455c6491ca6f8c94ab upstream.

Avoid freeing a registered tpg structure if an alloc_workqueue call
fails.  This fixes a bug where the failure was leaking memory associated
with se_portal_group setup during the original core_tpg_register() call.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/tcm_fc/tfc_conf.c