From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Arnd Bergmann <arnd@arndb.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Robin Murphy <robin.murphy@arm.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Ard Biesheuvel <ardb@kernel.org>,
Alex Williamson <alex.williamson@redhat.com>,
Cornelia Huck <cohuck@redhat.com>
Subject: Re: [PATCH v1 1/5] memremap: Check for size parameter
Date: Wed, 15 Apr 2020 17:58:55 +0300 [thread overview]
Message-ID: <20200415145855.GM185537@smile.fi.intel.com> (raw)
In-Reply-To: <20191116162937.GA23951@lst.de>
On Sat, Nov 16, 2019 at 05:29:37PM +0100, Christoph Hellwig wrote:
> On Fri, Nov 15, 2019 at 08:00:40PM +0200, Andy Shevchenko wrote:
> > There is no use of memremap() to be called with size = 0.
> > Simple return NULL pointer and allow callers to drop this check.
>
> Given that this really is an error condition, maybe a WARN_ON_ONCE
> would fit here?
It appears some users are using defensive programming and rely simple on error
code. I dunno if they are really expect to have size == 0 in some (non-fatal)
cases.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2020-04-15 14:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 18:00 [PATCH v1 1/5] memremap: Check for size parameter Andy Shevchenko
2019-11-15 18:00 ` [PATCH v1 2/5] dma-mapping: Drop duplicate check for size parameter of memremap() Andy Shevchenko
2019-11-16 16:29 ` Christoph Hellwig
2019-11-15 18:00 ` [PATCH v1 3/5] ALSA: hda: " Andy Shevchenko
2019-11-15 18:00 ` [PATCH v1 4/5] efi/esrt: " Andy Shevchenko
2019-11-15 18:00 ` [PATCH v1 5/5] vfio/pci: " Andy Shevchenko
2019-11-15 22:52 ` Alex Williamson
2019-11-16 16:29 ` [PATCH v1 1/5] memremap: Check for size parameter Christoph Hellwig
2020-04-15 14:58 ` Andy Shevchenko [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=20200415145855.GM185537@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alex.williamson@redhat.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=cohuck@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=robin.murphy@arm.com \
--cc=tiwai@suse.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