All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: ceph-devel@vger.kernel.org, lhenriques@suse.de,
	jlayton@kernel.org, mchangir@redhat.com, stable@vger.kernel.org
Subject: Re: [PATCH] ceph: fix NULL pointer dereference for req->r_session
Date: Tue, 8 Nov 2022 11:35:14 +0800	[thread overview]
Message-ID: <32b14817-9011-d1a6-0029-b5a4005814b7@redhat.com> (raw)
In-Reply-To: <CAOi1vP9g1PkeOoxNwGBZ3QX=Hx+YxpCXDw28roiTmq8P2uHQtw@mail.gmail.com>


On 07/11/2022 22:55, Ilya Dryomov wrote:
> On Thu, Oct 27, 2022 at 11:12 AM <xiubli@redhat.com> wrote:
>> From: Xiubo Li <xiubli@redhat.com>
>>
>> The request's r_session maybe changed when it was forwarded or
>> resent.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>> ---
>>   fs/ceph/caps.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
>> index 894adfb4a092..d34ac716d7fe 100644
>> --- a/fs/ceph/caps.c
>> +++ b/fs/ceph/caps.c
>> @@ -2341,6 +2341,7 @@ static int flush_mdlog_and_wait_inode_unsafe_requests(struct inode *inode)
>>                          goto out;
>>                  }
>>
>> +               mutex_lock(&mdsc->mutex);
> Hi Xiubo,
>
> A few lines above, there is the following comment:
>
>          /*
>           * The mdsc->max_sessions is unlikely to be changed
>           * mostly, here we will retry it by reallocating the
>           * sessions array memory to get rid of the mdsc->mutex
>           * lock.
>           */
>
> Does retry label and gotos still make sense if mdsc->mutex is
> introduced?  Would it make sense to move it up and get rid of
> retry code?

I'm okay to remove the label since we will introduce the mdsc->mutex.

Thanks!

- Xiubo

> Thanks,
>
>                  Ilya
>


      reply	other threads:[~2022-11-08  3:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  9:11 [PATCH] ceph: fix NULL pointer dereference for req->r_session xiubli
2022-11-07 14:55 ` Ilya Dryomov
2022-11-08  3:35   ` Xiubo Li [this message]

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=32b14817-9011-d1a6-0029-b5a4005814b7@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=lhenriques@suse.de \
    --cc=mchangir@redhat.com \
    --cc=stable@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.