android_kernel_oneplus_msm8998/drivers/target
Nicholas Bellinger 44d03b9280 target: Don't BUG_ON during NodeACL dynamic -> explicit conversion
commit 391e2a6de9781e4906dd7e0b1cc097050bf43e11 upstream.

After the v4.2+ RCU conversion to se_node_acl->lun_entry_hlist,
a BUG_ON() was added in core_enable_device_list_for_node() to
detect when the located orig->se_lun_acl contains an existing
se_lun_acl pointer reference.

However, this scenario can happen when a dynamically generated
NodeACL is being converted to an explicit NodeACL, when the
explicit NodeACL contains a different LUN mapping than the
default provided by the WWN endpoint.

So instead of triggering BUG_ON(), go ahead and fail instead
following the original pre RCU conversion logic.

Reported-by: Benjamin ESTRABAUD <ben.estrabaud@mpstor.com>
Cc: Benjamin ESTRABAUD <ben.estrabaud@mpstor.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-14 15:22:51 -08:00
..
iscsi target/iscsi: Fix double free in lio_target_tiqn_addtpg() 2017-01-12 11:22:49 +01:00
loopback
sbp
tcm_fc
Kconfig
Makefile
target_core_alua.c
target_core_alua.h
target_core_configfs.c
target_core_device.c target: Don't BUG_ON during NodeACL dynamic -> explicit conversion 2017-02-14 15:22:51 -08:00
target_core_fabric_configfs.c
target_core_fabric_lib.c
target_core_file.c target: Fix max_unmap_lba_count calc overflow 2016-08-20 18:09:26 +02:00
target_core_file.h
target_core_hba.c
target_core_iblock.c target: Fix max_unmap_lba_count calc overflow 2016-08-20 18:09:26 +02:00
target_core_iblock.h
target_core_internal.h target: Fix ordered task target_setup_cmd_from_cdb exception hang 2016-08-20 18:09:26 +02:00
target_core_pr.c
target_core_pr.h
target_core_pscsi.c
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c target: Fix ordered task target_setup_cmd_from_cdb exception hang 2016-08-20 18:09:26 +02:00
target_core_spc.c
target_core_stat.c
target_core_tmr.c
target_core_tpg.c
target_core_transport.c target: Make EXTENDED_COPY 0xe4 failure return COPY TARGET DEVICE NOT REACHABLE 2016-10-28 03:01:36 -04:00
target_core_ua.c
target_core_ua.h
target_core_user.c target/user: Fix use-after-free of tcmu_cmds if they are expired 2017-01-09 08:07:53 +01:00
target_core_xcopy.c target: Don't override EXTENDED_COPY xcopy_pt_cmd SCSI status code 2016-10-28 03:01:36 -04:00
target_core_xcopy.h