linux/drivers/infiniband/ulp
Bart Van Assche 88155b6f05 IB/srpt: Simplify srpt_handle_tsk_mgmt()
[ Upstream commit 51093254bf ]

Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.

This patch fixes the following kernel crash:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000001
IP: [<ffffffffa0565f37>] srpt_handle_new_iu+0x6d7/0x790 [ib_srpt]
Oops: 0002 [#1] SMP
Call Trace:
 [<ffffffffa05660ce>] srpt_process_completion+0xde/0x570 [ib_srpt]
 [<ffffffffa056669f>] srpt_compl_thread+0x13f/0x160 [ib_srpt]
 [<ffffffff8109726f>] kthread+0xcf/0xe0
 [<ffffffff81613cfc>] ret_from_fork+0x7c/0xb0

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Fixes: 3e4f574857 ("ib_srpt: Convert TMR path to target_submit_tmr")
Tested-by: Alex Estrin <alex.estrin@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2016-04-18 08:49:20 -04:00
..
ipoib net: better IFF_XMIT_DST_RELEASE support 2014-10-07 13:22:11 -04:00
iser IB/iser: Fix wrong calculation of protection buffer length 2015-05-17 19:12:22 -04:00
isert target: Remove first argument of target_{get,put}_sess_cmd() 2016-03-02 15:18:56 -05:00
srp IB/srp: Fix return value check in srp_init_module() 2014-08-14 08:57:54 -07:00
srpt IB/srpt: Simplify srpt_handle_tsk_mgmt() 2016-04-18 08:49:20 -04:00
Makefile IB: Allow build of hw/ and ulp/ subdirectories independently 2014-06-02 14:51:12 -07:00