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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b896452-e653-bc96-3c26-1deeae995890@gmail.com>
Date:   Mon, 17 Apr 2017 12:03:09 -0700
From:   Tyrel Datwyler <turtle.in.the.kernel@...il.com>
To:     NeilBrown <neilb@...e.com>,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     Tyrel Datwyler <tyreld@...ux.vnet.ibm.com>,
        linux-scsi@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: ibmvfc: don't check for failure from
 mempool_alloc()

On 04/09/2017 07:15 PM, NeilBrown wrote:
> 
> mempool_alloc() cannot fail when passed GFP_NOIO or any
> other gfp setting that is permitted to sleep.
> So remove this pointless code.
> 
> Signed-off-by: NeilBrown <neilb@...e.com>

Acked-by: Tyrel Datwyler <tyreld@...ux.vnet.ibm.com>

> ---
>  drivers/scsi/ibmvscsi/ibmvfc.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
> index 2c92dabb55f6..26cd3c28186a 100644
> --- a/drivers/scsi/ibmvscsi/ibmvfc.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c
> @@ -3910,12 +3910,6 @@ static int ibmvfc_alloc_target(struct ibmvfc_host *vhost, u64 scsi_id)
>  	spin_unlock_irqrestore(vhost->host->host_lock, flags);
>  
>  	tgt = mempool_alloc(vhost->tgt_pool, GFP_NOIO);
> -	if (!tgt) {
> -		dev_err(vhost->dev, "Target allocation failure for scsi id %08llx\n",
> -			scsi_id);
> -		return -ENOMEM;
> -	}
> -
>  	memset(tgt, 0, sizeof(*tgt));
>  	tgt->scsi_id = scsi_id;
>  	tgt->new_scsi_id = scsi_id;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ