linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linaro.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] mm: dmapool: Check the dma pool name
Date: Wed, 30 May 2018 20:14:09 +0800	[thread overview]
Message-ID: <CAMz4ku+fBt2uY6MbiMX1X-6jtjdpqp=DWNMrefOG4SsUHWN4kQ@mail.gmail.com> (raw)
In-Reply-To: <20180530120133.GC17450@bombadil.infradead.org>

On 30 May 2018 at 20:01, Matthew Wilcox <willy@infradead.org> wrote:
> On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote:
>> It will be crash if we pass one NULL name when creating one dma pool,
>> so we should check the passing name when copy it to dma pool.
>
> NAK.  Crashing is the appropriate thing to do.  Fix the caller to not
> pass NULL.
>
> If you permit NULL to be passed then you're inviting crashes or just
> bad reporting later when pool->name is printed.

I think it just prints one NULL pool name. Sometimes the device
doesn't care the dma pool names, so I think we can make code more
solid to valid the passing parameters like other code does.
Or can we add check to return NULL when the passing name is NULL
instead of crashing the kernel? Thanks.

-- 
Baolin.wang
Best Regards

  reply	other threads:[~2018-05-30 12:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30 11:28 Baolin Wang
2018-05-30 12:01 ` Matthew Wilcox
2018-05-30 12:14   ` Baolin Wang [this message]
2018-05-30 15:13     ` Matthew Wilcox
2018-05-30 15:41       ` Matthew Wilcox
2018-05-31  2:34         ` Baolin Wang

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='CAMz4ku+fBt2uY6MbiMX1X-6jtjdpqp=DWNMrefOG4SsUHWN4kQ@mail.gmail.com' \
    --to=baolin.wang@linaro.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox