From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sysfs: return correct error code on unimplemented mmap()
Date: Tue, 29 Oct 2013 16:05:24 -0700 [thread overview]
Message-ID: <20131029230524.GA14393@kroah.com> (raw)
In-Reply-To: <526E9D67.9090504@mentor.com>
On Mon, Oct 28, 2013 at 07:22:47PM +0200, Vladimir Zapolskiy wrote:
> On 10/28/13 18:35, Greg Kroah-Hartman wrote:
> >On Mon, Oct 28, 2013 at 06:28:30PM +0200, Vladimir Zapolskiy wrote:
> >>Both POSIX.1-2008 and Linux Programmer's Manual have a dedicated return
> >>error code for a case, when a file doesn't support mmap(), it's ENODEV.
> >>
> >>This change replaces overloaded EINVAL with ENODEV in a situation
> >>described above for sysfs binary files.
> >>
> >>Signed-off-by: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> >>Cc: Greg Kroah-Hartman<gregkh@linuxfoundation.org>
> >
> >Is this a problem in linux-next or 3.12-rc7 and older kernels? What
> >userspace tool is breaking here?
>
> The patch itself is against 3.12-rc7, but the same problem can be found
> in older kernels as well.
>
> I assume the bugfix is quite safe, because both EINVAL and ENODEV should
> be handled by user space tools, however for developers it might be
> beneficial to distinguish cases of completely not supported mmap() and
> supported but misused mmap() applied to a binary sysfs file. At the
> moment from the user space perspective there is no indication of
> unsupported mmap() over a file in sysfs.
Ok, fair enough, but it doesn't apply to my tree given the recent sysfs
changes there. Can you redo this against linux-next, or wait for
3.13-rc1 and resend it against that release in a few weeks?
thanks,
greg k-h
next prev parent reply other threads:[~2013-10-29 23:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 16:28 [PATCH] sysfs: return correct error code on unimplemented mmap() Vladimir Zapolskiy
2013-10-28 16:35 ` Greg Kroah-Hartman
2013-10-28 17:22 ` Vladimir Zapolskiy
2013-10-29 23:05 ` Greg Kroah-Hartman [this message]
2013-10-30 12:08 ` [PATCH rebased] " Vladimir Zapolskiy
2013-10-30 14:50 ` Vladimir Zapolskiy
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=20131029230524.GA14393@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vladimir_zapolskiy@mentor.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.