eventfd: remove fput() call from possible IRQ context
authorDavide Libenzi <davidel@xmailserver.org>
Thu, 19 Mar 2009 00:04:19 +0000 (17:04 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 23 Mar 2009 22:00:01 +0000 (15:00 -0700)
commit07d3c798afc8c28457907269fb26b000e40e8254
treece3414c3fc37f0140938dad818197f4fee29a54a
parent49838e7c80ce1bf98ac567c5b7131ac9992b5043
eventfd: remove fput() call from possible IRQ context

commit 87c3a86e1c220121d0ced59d1a71e78ed9abc6dd upstream.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/aio.c