lkml.org 
[lkml]   [2008]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] UIO: hold a reference to the device's owner while the device is open
On Thu, Apr 10, 2008 at 02:12:36PM -0700, Greg KH wrote:
> On Thu, Apr 10, 2008 at 11:02:29PM +0200, Hans J. Koch wrote:
> > On Thu, Apr 10, 2008 at 02:37:00PM +0200, Uwe Kleine-K??nig wrote:
> > > Otherwise the device might just disappear while /dev/uioX is being used
> > > which results in an Oops.
> >
> > Hi Uwe,
> > thanks for this one, good catch! Looks fine to me. There are some minor issues, see
> > below.
> > And I'd like to hear Greg's opinion: Do you agree we can omit
> > try_module_get() in uio_mmap()?
>
> If it's already been grabbed in the open() call, everything should be
> safe, right?

Yes, it looks quite clean to me. module_get in open(), module_put in
release() and nothing of that sort anywhere else. Maybe it just looked
toooo simple to me ;-)

Thanks for your confirmation.

Hans

>
> thanks,
>
> greg k-h


\
 
 \ /
  Last update: 2008-04-10 23:25    [W:0.050 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site