All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chengguang Xu <cgxu519@icloud.com>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>,
	"Yan, Zheng" <zyan@redhat.com>, Sage Weil <sage@redhat.com>
Subject: Re: [PATCH] ceph: Check memory allocation result
Date: Tue, 30 Jan 2018 08:08:56 +0800	[thread overview]
Message-ID: <BCF48816-962F-4314-BDD6-84F7BC57267F@icloud.com> (raw)
In-Reply-To: <CAOi1vP_b_1Um6gwo+Zz+YF8jmBbJY79Gndx8ie0caWrcGwStuA@mail.gmail.com>

Hi Ilya

Is there a specific tree for ceph kernel client?

I found below git repository is quite old.

https://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git/


Thanks,
Chengguang.



> 在 2018年1月30日,上午12:42,Ilya Dryomov <idryomov@gmail.com> 写道:
> 
> On Fri, Jan 26, 2018 at 7:54 AM, Chengguang Xu <cgxu519@icloud.com> wrote:
>> Should check result of kstrndup() in case of memory allocation failure.
>> 
>> Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
>> ---
>> net/ceph/ceph_common.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>> 
>> diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
>> index 5c036d2..1e492ef 100644
>> --- a/net/ceph/ceph_common.c
>> +++ b/net/ceph/ceph_common.c
>> @@ -421,6 +421,10 @@ struct ceph_options *
>>                        opt->name = kstrndup(argstr[0].from,
>>                                              argstr[0].to-argstr[0].from,
>>                                              GFP_KERNEL);
>> +                       if (!opt->name) {
>> +                               err = -ENOMEM;
>> +                               goto out;
>> +                       }
>>                        break;
>>                case Opt_secret:
>>                        opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL);
> 
> Applied.
> 
> Thanks,
> 
>                Ilya


  reply	other threads:[~2018-01-30  1:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26  6:54 [PATCH] ceph: Check memory allocation result Chengguang Xu
2018-01-29 16:42 ` Ilya Dryomov
2018-01-30  0:08   ` Chengguang Xu [this message]
2018-01-30 13:31     ` Ilya Dryomov

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=BCF48816-962F-4314-BDD6-84F7BC57267F@icloud.com \
    --to=cgxu519@icloud.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=sage@redhat.com \
    --cc=zyan@redhat.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.