Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755337AbZCORo5 (ORCPT ); Sun, 15 Mar 2009 13:44:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753048AbZCORos (ORCPT ); Sun, 15 Mar 2009 13:44:48 -0400 Received: from kanga.kvack.org ([205.233.56.17]:37448 "EHLO kanga.kvack.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751515AbZCORos (ORCPT ); Sun, 15 Mar 2009 13:44:48 -0400 Date: Sun, 15 Mar 2009 13:44:45 -0400 From: Benjamin LaHaise To: Davide Libenzi Cc: Linux Kernel Mailing List , Trond Myklebust , Andrew Morton , Eric Dumazet , linux-aio , zach.brown@oracle.com Subject: Re: [patch] eventfd - remove fput() call from possible IRQ context Message-ID: <20090315174445.GD18305@kvack.org> References: <49B89B22.7080303@cosmosbay.com> <20090311224712.fb8db075.akpm@linux-foundation.org> <49B8A75E.6040409@cosmosbay.com> <20090311233903.f036027a.akpm@linux-foundation.org> <1236986902.7265.73.camel@heimdal.trondhjem.org> <1237003328.7265.98.camel@heimdal.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1105 Lines: 21 On Sat, Mar 14, 2009 at 06:36:34PM -0700, Davide Libenzi wrote: > The following patch remove a possible source of fput() call from inside > IRQ context. Myself, like Eric, wasn't able to reproduce an fput() call > from IRQ context, but conceptually the bug is there. > 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. This looks reasonably sane, the only concern I have with it is that I think it logically makes more sense to use the same convention for fi_filp and ki_eventfd, as the different in IS_ERR vs checking for NULL is a bit confusing. Aside from that, it looks like it should fix the problem correctly. -ben -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/