[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180411183622.794995434@linuxfoundation.org>
Date: Wed, 11 Apr 2018 20:32:30 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Bart Van Assche <bart.vanassche@...disk.com>,
Hannes Reinecke <hare@...e.com>,
Doug Ledford <dledford@...hat.com>,
Christoph Hellwig <hch@....de>,
David Disseldorp <ddiss@...e.de>,
Nicholas Bellinger <nab@...ux-iscsi.org>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.9 011/310] IB/srpt: Avoid that aborting a command triggers a kernel warning
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <bart.vanassche@...disk.com>
[ Upstream commit bd2c52d733f126ff75f99c537a27655b2db07e28 ]
Avoid that the following warning is triggered:
WARNING: CPU: 10 PID: 166 at ../drivers/infiniband/ulp/srpt/ib_srpt.c:2674 srpt_release_cmd+0x139/0x140 [ib_srpt]
CPU: 10 PID: 166 Comm: kworker/u24:8 Not tainted 4.9.4-1-default #1
Workqueue: tmr-fileio target_tmr_work [target_core_mod]
Call Trace:
[<ffffffffaa3c4f70>] dump_stack+0x63/0x83
[<ffffffffaa0844eb>] __warn+0xcb/0xf0
[<ffffffffaa0845dd>] warn_slowpath_null+0x1d/0x20
[<ffffffffc06ba429>] srpt_release_cmd+0x139/0x140 [ib_srpt]
[<ffffffffc06e4377>] target_release_cmd_kref+0xb7/0x120 [target_core_mod]
[<ffffffffc06e4d7f>] target_put_sess_cmd+0x2f/0x60 [target_core_mod]
[<ffffffffc06e15e0>] core_tmr_lun_reset+0x340/0x790 [target_core_mod]
[<ffffffffc06e4816>] target_tmr_work+0xe6/0x140 [target_core_mod]
[<ffffffffaa09e4d3>] process_one_work+0x1f3/0x4d0
[<ffffffffaa09e7f8>] worker_thread+0x48/0x4e0
[<ffffffffaa09e7b0>] ? process_one_work+0x4d0/0x4d0
[<ffffffffaa0a46da>] kthread+0xca/0xe0
[<ffffffffaa0a4610>] ? kthread_park+0x60/0x60
[<ffffffffaa71b775>] ret_from_fork+0x25/0x30
Signed-off-by: Bart Van Assche <bart.vanassche@...disk.com>
Reviewed-by: Hannes Reinecke <hare@...e.com>
Cc: Doug Ledford <dledford@...hat.com>
Cc: Christoph Hellwig <hch@....de>
Cc: David Disseldorp <ddiss@...e.de>
Signed-off-by: Nicholas Bellinger <nab@...ux-iscsi.org>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -2666,7 +2666,8 @@ static void srpt_release_cmd(struct se_c
struct srpt_rdma_ch *ch = ioctx->ch;
unsigned long flags;
- WARN_ON(ioctx->state != SRPT_STATE_DONE);
+ WARN_ON_ONCE(ioctx->state != SRPT_STATE_DONE &&
+ !(ioctx->cmd.transport_state & CMD_T_ABORTED));
if (ioctx->n_rw_ctx) {
srpt_free_rw_ctxs(ch, ioctx);
Powered by blists - more mailing lists