All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Dan Schatzberg <schatzberg.dan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-block@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH resend] loop: Fix IS_ERR() vs NULL bugs in loop_prepare_queue()
Date: Sun, 01 Mar 2020 01:02:19 +0000	[thread overview]
Message-ID: <20200301120219.22d92d73@canb.auug.org.au> (raw)
In-Reply-To: <20200228172136.h5dvwvrg5yfywxss@kili.mountain>

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

Hi all,

On Fri, 28 Feb 2020 20:21:36 +0300 Dan Carpenter <dan.carpenter@oracle.com> 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@oracle.com>
> Acked-by: Dan Schatzberg <schatzberg.dan@gmail.com>
> ---
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Dan Schatzberg <schatzberg.dan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-block@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH resend] loop: Fix IS_ERR() vs NULL bugs in loop_prepare_queue()
Date: Sun, 1 Mar 2020 12:02:19 +1100	[thread overview]
Message-ID: <20200301120219.22d92d73@canb.auug.org.au> (raw)
In-Reply-To: <20200228172136.h5dvwvrg5yfywxss@kili.mountain>

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

Hi all,

On Fri, 28 Feb 2020 20:21:36 +0300 Dan Carpenter <dan.carpenter@oracle.com> 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@oracle.com>
> Acked-by: Dan Schatzberg <schatzberg.dan@gmail.com>
> ---
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-03-01  1:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 14:13 [PATCH] loop: Fix IS_ERR() vs NULL bugs in loop_prepare_queue() Dan Carpenter
2020-02-28 14:13 ` Dan Carpenter
2020-02-28 14:25 ` Jens Axboe
2020-02-28 14:25   ` Jens Axboe
2020-02-28 16:11   ` Dan Carpenter
2020-02-28 16:11     ` Dan Carpenter
2020-02-28 16:15   ` Dan Schatzberg
2020-02-28 16:15     ` Dan Schatzberg
2020-02-28 17:21   ` [PATCH resend] " Dan Carpenter
2020-02-28 17:21     ` Dan Carpenter
2020-03-01  1:02     ` Stephen Rothwell [this message]
2020-03-01  1:02       ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200301120219.22d92d73@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schatzberg.dan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.