eventfd: remove fput() call from possible IRQ context
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 <91df8000b8dca80eb036dde93edf593d4a91414e@xmailserver.org>
Cc: Benjamin LaHaise <b05c66fa21e46731bb89a779db663748f3df8f6a@kvack.org>
Cc: Trond Myklebust <cc958843532c615cbd4920e868f78c7985331a5a@fys.uio.no>
Cc: Eric Dumazet <376627c3b2da88577629dab6f8516ef352eb3ff8@cosmosbay.com>
Signed-off-by: Jeff Moyer <cd6badf7869d996b866599075536a600ed1910b5@redhat.com>
Cc: Zach Brown <bdd5f2a410e3c75a25da3e38f76d719a18e93cd3@oracle.com>
Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas