libfc: Protect ep->esb_stat changes via ex_lock
authorBart Van Assche <bvanassche@acm.org>
Wed, 14 Aug 2013 15:37:08 +0000 (15:37 +0000)
committerRobert Love <robert.w.love@intel.com>
Wed, 4 Sep 2013 20:23:38 +0000 (13:23 -0700)
commit5d73bea2d3a004698d16ba5face89f0bef383e76
treea652a9094b2f4bb3d9398bf3da3497c2af1c3f8f
parentb86788658be425a5454246a954721d9122d2b3d6
libfc: Protect ep->esb_stat changes via ex_lock

This patch avoids that the WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT))
statement in fc_seq_send_locked() gets triggered sporadically when
running FCoE target code due to concurrent ep->esb_stat modifications.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
drivers/scsi/libfc/fc_exch.c