public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hans J. Koch" <hjk@hansjkoch.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>,
	Benedikt Spranger <b.spranger@linutronix.de>,
	linux-kernel@vger.kernel.org, Alexander.Frank@eberspaecher.com
Subject: Re: [PATCH 2/2] uio: do not expose inode to uio open/release hooks
Date: Wed, 12 Dec 2012 09:50:54 +0100	[thread overview]
Message-ID: <20121212085053.GF2642@local> (raw)
In-Reply-To: <20121212044648.GB7224@kroah.com>

On Tue, Dec 11, 2012 at 08:46:48PM -0800, Greg KH wrote:
> On Wed, Dec 12, 2012 at 02:42:22AM +0100, Hans J. Koch wrote:
> > On Tue, Dec 11, 2012 at 03:20:32PM -0800, Greg KH wrote:
> > > On Wed, Dec 12, 2012 at 12:12:02AM +0100, Benedikt Spranger wrote:
> > > > The inode parameter is unused by in kernel users of UIO.
> > > 
> > > Ok.
> > > 
> > > > Also the inode parameter makes it hard to resolve the existing open(),
> > > > mmap() and close() difficulty.
> > > 
> > > I don't understand, what do you mean by this?  What is this parameter
> > > causing problems with?
> > 
> > The problem is that according to POSIX, it is guaranteed that in userspace
> > you can do
> > 
> > fd = open("/dev/uio0", ...)
> > ptr = mmap(...fd...)
> > close(fd)
> > 
> > with ptr still being valid and useable after that.
> 
> Yes, but what does that have to do with this in-kernel, internal api?

Ah, OK. You're right, the commit message is confusing.

Bene, it's enough to say we drop the inode parameter because nobody
ever needed it. I cannot see why this also helps with the other problem.

Thanks,
Hans

  reply	other threads:[~2012-12-12  8:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11 23:12 [PATCH 0/2] uio: open(), mmap(), close() Benedikt Spranger
2012-12-11 23:12 ` [PATCH 1/2] uio: add warning to documentation Benedikt Spranger
2012-12-11 23:18   ` Greg KH
2012-12-12  0:45     ` Benedikt Spranger
2012-12-12  4:49       ` Greg KH
2012-12-12  1:56     ` Hans J. Koch
2012-12-12  4:47       ` Greg KH
2012-12-11 23:12 ` [PATCH 2/2] uio: do not expose inode to uio open/release hooks Benedikt Spranger
2012-12-11 23:20   ` Greg KH
2012-12-12  1:42     ` Hans J. Koch
2012-12-12  4:46       ` Greg KH
2012-12-12  8:50         ` Hans J. Koch [this message]
2012-12-12  8:56           ` Benedikt Spranger
2012-12-12 15:08             ` Greg KH
2012-12-13  0:08               ` Hans J. Koch
2012-12-13  0:15                 ` Greg KH

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=20121212085053.GF2642@local \
    --to=hjk@hansjkoch.de \
    --cc=Alexander.Frank@eberspaecher.com \
    --cc=b.spranger@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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