[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130401212142.GD21522@ZenIV.linux.org.uk>
Date: Mon, 1 Apr 2013 22:21:42 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: Yet another pipe related oops.
On Mon, Apr 01, 2013 at 02:00:29PM -0700, Greg Kroah-Hartman wrote:
> > IOW, how do we deal with a race between attempt to open a debugfs file and
> > its removal on driver unload? Greg?
>
> Hm, I thought the i_fop->owner thing would be the needed protection, but
It will be, if you manage to fetch it...
> I guess you are right, it will not. I guess we need to do what
> character devices do and have an "intermediate" fops in order to protect
> this. Would that work?
You mean, with reassigning ->f_op in ->open()? That'll work, as long as
we have exclusion between removal and fetching the sucker in primary
->open()... Where would you prefer to stash fops?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists