All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: dhowells@redhat.com, idryomov@gmail.com,
	ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ceph: fix an oops in error handling in ceph_netfs_issue_op
Date: Tue, 2 Feb 2021 17:20:45 +0300	[thread overview]
Message-ID: <20210202142045.GD20820@kadam> (raw)
In-Reply-To: <20210202131041.43977-1-jlayton@kernel.org>

On Tue, Feb 02, 2021 at 08:10:41AM -0500, Jeff Layton wrote:
> Dan reported a potential oops in the cleanup if ceph_osdc_new_request
> returns an error. Eliminate the unneeded initialization of "req" and
> then just set it to NULL in the case where it holds an ERR_PTR.
> 
> Also, drop the unneeded NULL check before calling
> ceph_osdc_put_request.
> 
> Fixes: 1cf7fdf52d5a ("ceph: convert readpage to fscache read helper")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Suggested-by: Ilya Dryomov <idryomov@gmail.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>


Looks good.

Acked-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: dhowells@redhat.com, idryomov@gmail.com,
	ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ceph: fix an oops in error handling in ceph_netfs_issue_op
Date: Tue, 02 Feb 2021 14:20:45 +0000	[thread overview]
Message-ID: <20210202142045.GD20820@kadam> (raw)
In-Reply-To: <20210202131041.43977-1-jlayton@kernel.org>

On Tue, Feb 02, 2021 at 08:10:41AM -0500, Jeff Layton wrote:
> Dan reported a potential oops in the cleanup if ceph_osdc_new_request
> returns an error. Eliminate the unneeded initialization of "req" and
> then just set it to NULL in the case where it holds an ERR_PTR.
> 
> Also, drop the unneeded NULL check before calling
> ceph_osdc_put_request.
> 
> Fixes: 1cf7fdf52d5a ("ceph: convert readpage to fscache read helper")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Suggested-by: Ilya Dryomov <idryomov@gmail.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>


Looks good.

Acked-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter

  reply	other threads:[~2021-02-02 14:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 13:10 [PATCH] ceph: fix an oops in error handling in ceph_netfs_issue_op Jeff Layton
2021-02-02 13:10 ` Jeff Layton
2021-02-02 14:20 ` Dan Carpenter [this message]
2021-02-02 14:20   ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2021-02-02  5:47 [PATCH] ceph: Fix an Oops in error handling Dan Carpenter
2021-02-02  5:47 ` Dan Carpenter
2021-02-02 12:35 ` Ilya Dryomov
2021-02-02 12:35   ` Ilya Dryomov
2021-02-02 12:37 ` Jeff Layton
2021-02-02 12:37   ` Jeff Layton
2021-02-02 14:19   ` Dan Carpenter
2021-02-02 14:19     ` Dan Carpenter

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=20210202142045.GD20820@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.