lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 28 Mar 2009 14:36:09 +0100
From:	Bartlomiej Zolnierkiewicz <>
To:	Jonathan Corbet <>
Cc:	Larry Finger <>,
	LKML <>,
	Christoph Hellwig <>,
	Al Viro <>,
	Li Zefan <>,
	Wu Fengguang <>,
	Ingo Molnar <>
Subject: Re: Possible IRQ lock inversion from 2.6.29-Linus-03321-gbe0ea69 (2.6.29-git)

On Friday 27 March 2009, Jonathan Corbet wrote:
> On Fri, 27 Mar 2009 13:54:35 +0100
> Bartlomiej Zolnierkiewicz <> wrote:
> > I remember looking a bit more closely into the issue and not seeing
> > the problem with the locking (though I could have missed something):
> > 
> > file->f_lock is never taken in hard-irq or soft-irq context and in
> > the only place where file->f_lock is taken with fasync_lock hold we're
> > protected against IRQs by write_lock_irq().
> I do think that the warning is spurious at this time.
> > [ Despite not being a problem now I think that changing spin_[un]lock()
> >   to *_irq() variants for file->f_lock could be (given that it really
> >   fixes the warning) more viable long-term solution than adding special
> >   lockdep handling (well, it could be that one day file->f_lock is used
> >   in soft-irq context and then the irq lock inversion issue will become
> >   a real one) and shouldn't incurr performance penalty since we hold it
> >   only for a very brief time. ]
> We could do that.  When I made the change I'd verified that there were
> no users in IRQ context, and I couldn't really see why there should
> be.  I'd rather avoid adding all those IRQ disables if I can avoid it.
> How about, instead, just reversing the order of lock acquisition in
> fasync_helper()?  That would increase the hold time for f_lock, but I
> have a hard time seeing that being a real problem.  I'm running with
> the following now; all seems well.  I'll send it up in a bit if nobody
> gripes.

This is even better and works just fine here.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists