]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
eventfd: remove fput() call from possible IRQ context
authorDavide Libenzi <davidel@xmailserver.org>
Thu, 19 Mar 2009 00:04:19 +0000 (17:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Mar 2009 22:57:18 +0000 (15:57 -0700)
commit87c3a86e1c220121d0ced59d1a71e78ed9abc6dd
treef0460d0a5f34da0c3df3cc729b705fc93a69be4b
parentd0115552cdb0b4d4146975889fee2e9355515c4b
eventfd: remove fput() call from possible IRQ context

Remove a source of fput() call from inside IRQ context.  Myself, like Eric,
wasn't able to reproduce an fput() call from IRQ context, but Jeff said he was
able to, with the attached test program.  Independently from this, the bug is
conceptually there, so we might be better off fixing it.  This patch adds an
optimization similar to the one we already do on ->ki_filp, on ->ki_eventfd.
Playing with ->f_count directly is not pretty in general, but the alternative
here would be to add a brand new delayed fput() infrastructure, that I'm not
sure is worth it.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/aio.c