android_kernel_motorola_sm6375/include/target
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nicholas Bellinger 5259a06ef9 target: Fix percpu_ref_put race in transport_lun_remove_cmd
This patch fixes a percpu_ref_put race for se_lun->lun_ref in
transport_lun_remove_cmd() where ->lun_ref could end up being
put more than once per command via different target completion
and fabric release contexts.

It adds a cmpxchg() for se_cmd->lun_ref_active to ensure that
percpu_ref_put() is only ever called once per se_cmd.

This bug was manifesting itself as a LUN shutdown regression
bug in >= v3.13 code, where percpu_ref_kill() would end up
hanging indefinately due to the incorrect percpu_ref count.

(Change se_cmd->lun_ref_active from bool -> int to force at
 least a 4-byte cmpxchg with MIPS ll/sc ins. - Fengguang)

Reported-by: Tommy Apel <[email protected]>
Cc: Tommy Apel <[email protected]>
Cc: <[email protected]> #3.13+
Signed-off-by: Nicholas Bellinger <[email protected]>
2014-01-30 03:58:34 -08:00
..
iscsi iscsi-target: Convert gfp_t parameter to task state bitmask 2014-01-25 06:58:52 +00:00
configfs_macros.h
target_core_backend.h target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation 2014-01-18 09:53:12 +00:00
target_core_base.h target: Fix percpu_ref_put race in transport_lun_remove_cmd 2014-01-30 03:58:34 -08:00
target_core_configfs.h target: Remove TF_CIT_TMPL macro 2013-10-16 13:35:02 -07:00
target_core_fabric.h target: Add protection SGLs to target_submit_cmd_map_sgls 2014-01-18 09:58:09 +00:00
target_core_fabric_configfs.h target: Add se_portal_group->tpg_auth_group 2013-07-03 19:44:31 -07:00