linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Cc: Miklos Szeredi <mszeredi@redhat.com>,
	linfeilong <linfeilong@huawei.com>,
	linux-fsdevel@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	lihaotian <lihaotian9@huawei.com>
Subject: Re: [PATCH] fuse: fix potential accessing NULL pointer problem in fuse_send_init()
Date: Thu, 29 Oct 2020 16:25:47 +0100	[thread overview]
Message-ID: <CAJfpegtcU_=hhmq9C-n1dkCBOcTX7VzkdXDpOZZNh1iZ73-t0w@mail.gmail.com> (raw)
In-Reply-To: <5e1bf70a-0c6b-89b6-dc9f-474ccfcfe597@huawei.com>

On Thu, Oct 22, 2020 at 4:52 PM Zhiqiang Liu <liuzhiqiang26@huawei.com> wrote:
>
>
> In fuse_send_init func, ia is allocated by calling kzalloc func, and
> we donot check whether ia is NULL before using it. Thus, if allocating
> ia fails, accessing NULL pointer problem will occur.

Note the __GFP_NOFAIL flag for kzalloc(), which ensures that it will not fail.

Thanks,
Miklos

  parent reply	other threads:[~2020-10-29 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 14:51 [PATCH] fuse: fix potential accessing NULL pointer problem in fuse_send_init() Zhiqiang Liu
2020-10-27  9:21 ` Zhiqiang Liu
2020-10-29 15:25 ` Miklos Szeredi [this message]
2020-10-30  3:01   ` Zhiqiang Liu

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='CAJfpegtcU_=hhmq9C-n1dkCBOcTX7VzkdXDpOZZNh1iZ73-t0w@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=lihaotian9@huawei.com \
    --cc=linfeilong@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuzhiqiang26@huawei.com \
    --cc=mszeredi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).