From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730AbbCOIuO (ORCPT ); Sun, 15 Mar 2015 04:50:14 -0400 Received: from h1446028.stratoserver.net ([85.214.92.142]:58134 "EHLO mail.ahsoftware.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbbCOIuG (ORCPT ); Sun, 15 Mar 2015 04:50:06 -0400 Message-ID: <550547B9.1040602@ahsoftware.de> Date: Sun, 15 Mar 2015 09:50:01 +0100 From: Alexander Holler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Al Viro CC: Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [git pull] gadgetfs fixes References: <20150313164228.GQ29656@ZenIV.linux.org.uk> <5504D4B9.2010901@ahsoftware.de> <20150315013948.GU29656@ZenIV.linux.org.uk> <55052828.7090701@ahsoftware.de> <20150315081733.GV29656@ZenIV.linux.org.uk> In-Reply-To: <20150315081733.GV29656@ZenIV.linux.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 15.03.2015 um 09:17 schrieb Al Viro: > Another question, if you don't mind - does that series (i.e. what's currently > in Linus' tree) fix the module refcount issues you'd been seeing? I agree > with your analysis of likely cause (->f_op reassignments with different > ->owner before and after) and these patches should have eliminated that, but > confirmation would be nice... > > Incidentally, none of those file_operations need ->owner in the first place; > it doesn't hurt (as long as ->f_op doesn't change that way), but such files > (living on a filesystem provided by the module their methods are in) > don't need the module refcount bumped while the file is opened - having it > opened pins file_system_type of containing filesystem (by keeping a reference > to struct vfsmount, which keeps a reference to struct super_block, which keeps > a reference to file_system_type), so the module will be kept busy just fine. > Again, having ->owner on file_operations doesn't hurt, so it's not a bug > per se - just pointless in such cases. So we might want to remove it > from ep_io_operations someday. Anyway, that's a completely separate story... Hmm, a year ago or so I've stumbled over the fact that the owner might be necessary for correct entries in sysfs (that was mtd). I've no idea if that's true here too but it might be worse to mention it. Alexander Holler