From: Matthew Wilcox <willy@infradead.org>
To: Baolin Wang <baolin.wang@linaro.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 08:13:27 -0700 [thread overview]
Message-ID: <20180530151327.GA13951@bombadil.infradead.org> (raw)
In-Reply-To: <CAMz4ku+fBt2uY6MbiMX1X-6jtjdpqp=DWNMrefOG4SsUHWN4kQ@mail.gmail.com>
On Wed, May 30, 2018 at 08:14:09PM +0800, Baolin Wang wrote:
> 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.
No. Fix your driver.
next prev parent reply other threads:[~2018-05-30 15:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 11:28 [PATCH] mm: dmapool: Check the dma pool name Baolin Wang
2018-05-30 12:01 ` Matthew Wilcox
2018-05-30 12:14 ` Baolin Wang
2018-05-30 15:13 ` Matthew Wilcox [this message]
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=20180530151327.GA13951@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=arnd@arndb.de \
--cc=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).