* [PATCH v2] scsi: RDMA/srpt: remove unnecessary assertion in srpt_queue_response
@ 2019-12-17 19:44 Aditya Pakki
2019-12-17 20:34 ` Bart Van Assche
2020-01-03 20:23 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Aditya Pakki @ 2019-12-17 19:44 UTC (permalink / raw)
To: pakki001
Cc: kjlu, Bart Van Assche, Doug Ledford, Jason Gunthorpe, linux-rdma,
target-devel, linux-kernel
Currently, BUG_ON in srpt_queue_response, is used as an assertion for
empty rdma channel. However, if the channel is NULL, the call trace
on console is sufficient for diagnosis.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
v1: Avoid potential NULL pointer derefernce of ch. Current fix
suggested by Bart Van Assche
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 23c782e3d49a..98552749d71c 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -2810,8 +2810,6 @@ static void srpt_queue_response(struct se_cmd *cmd)
int resp_len, ret, i;
u8 srp_tm_status;
- BUG_ON(!ch);
-
state = ioctx->state;
switch (state) {
case SRPT_STATE_NEW:
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] scsi: RDMA/srpt: remove unnecessary assertion in srpt_queue_response
2019-12-17 19:44 [PATCH v2] scsi: RDMA/srpt: remove unnecessary assertion in srpt_queue_response Aditya Pakki
@ 2019-12-17 20:34 ` Bart Van Assche
2020-01-03 20:23 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2019-12-17 20:34 UTC (permalink / raw)
To: Aditya Pakki
Cc: kjlu, Doug Ledford, Jason Gunthorpe, linux-rdma, target-devel,
linux-kernel
On 12/17/19 11:44 AM, Aditya Pakki wrote:
> Currently, BUG_ON in srpt_queue_response, is used as an assertion for
> empty rdma channel. However, if the channel is NULL, the call trace
> on console is sufficient for diagnosis.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> v1: Avoid potential NULL pointer derefernce of ch. Current fix
> suggested by Bart Van Assche
> ---
> drivers/infiniband/ulp/srpt/ib_srpt.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 23c782e3d49a..98552749d71c 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -2810,8 +2810,6 @@ static void srpt_queue_response(struct se_cmd *cmd)
> int resp_len, ret, i;
> u8 srp_tm_status;
>
> - BUG_ON(!ch);
> -
> state = ioctx->state;
> switch (state) {
> case SRPT_STATE_NEW:
I think the description of this patch should also mention that this
patch removes a check of a pointer after it has already been
dereferenced. Anyway:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] scsi: RDMA/srpt: remove unnecessary assertion in srpt_queue_response
2019-12-17 19:44 [PATCH v2] scsi: RDMA/srpt: remove unnecessary assertion in srpt_queue_response Aditya Pakki
2019-12-17 20:34 ` Bart Van Assche
@ 2020-01-03 20:23 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-01-03 20:23 UTC (permalink / raw)
To: Aditya Pakki
Cc: kjlu, Bart Van Assche, Doug Ledford, linux-rdma, target-devel,
linux-kernel
On Tue, Dec 17, 2019 at 01:44:37PM -0600, Aditya Pakki wrote:
> Currently, BUG_ON in srpt_queue_response, is used as an assertion for
> empty rdma channel. However, if the channel is NULL, the call trace
> on console is sufficient for diagnosis.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> ---
> v1: Avoid potential NULL pointer derefernce of ch. Current fix
> suggested by Bart Van Assche
> ---
> drivers/infiniband/ulp/srpt/ib_srpt.c | 2 --
> 1 file changed, 2 deletions(-)
Applied to for-next with the reworked commit message Bart suggested
Thanks,
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-03 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 19:44 [PATCH v2] scsi: RDMA/srpt: remove unnecessary assertion in srpt_queue_response Aditya Pakki
2019-12-17 20:34 ` Bart Van Assche
2020-01-03 20:23 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).