lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d497d620-9aff-616c-67ae-bfb93f39b926@acm.org>
Date:   Tue, 17 Dec 2019 12:34:44 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Aditya Pakki <pakki001@....edu>
Cc:     kjlu@....edu, Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org,
        target-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] scsi: RDMA/srpt: remove unnecessary assertion in
 srpt_queue_response

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@....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@....org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ