Re: [PATCH resend] loop: Fix IS_ERR() vs NULL bugs in loop_prepare_queue()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

On Fri, 28 Feb 2020 20:21:36 +0300 Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> The alloc_workqueue() function returns NULL on error, it never returns
> error pointers.
> 
> Fixes: 29dab2122492 ("loop: use worker per cgroup instead of kworker")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Acked-by: Dan Schatzberg <schatzberg.dan@xxxxxxxxx>
> ---
> Resending because this goes through your -mm tree, Andrew.  The
> get_maintainer.pl script lead me astray.
> 
>  drivers/block/loop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index da8ec0b9d909..a31ca5e04fae 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -897,7 +897,7 @@ static int loop_prepare_queue(struct loop_device *lo)
>  					WQ_UNBOUND | WQ_FREEZABLE |
>  					WQ_MEM_RECLAIM,
>  					lo->lo_number);
> -	if (IS_ERR(lo->workqueue))
> +	if (!lo->workqueue)
>  		return -ENOMEM;
>  
>  	return 0;

Added to linux-next from tomorrow (in case Andrew has better things to
do with his weekend :-)).

-- 
Cheers,
Stephen Rothwell

Attachment: pgp9ap6SkhPf9.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux