Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706AbdIIU7b (ORCPT ); Sat, 9 Sep 2017 16:59:31 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36490 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbdIIU7a (ORCPT ); Sat, 9 Sep 2017 16:59:30 -0400 X-Google-Smtp-Source: ADKCNb7BVWxyuPi1IHTxw5fTthc9RUR42wYB1XSKbwVRODM1lElca7qLCl1aIGTlsBCYiMxFD+a8Jw== Date: Sat, 09 Sep 2017 13:59:25 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20170909221726.241c29f6@cakuba.netronome.com> References: <20170909194121.39cd9f56@cakuba.netronome.com> <20170909212732.5bc98775@cakuba.netronome.com> <20170909221726.241c29f6@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Subject: Re: [bisected] Re: Module removal-related regression? To: Jakub Kicinski CC: LKML , Greg Kroah-Hartman From: Dmitry Torokhov Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v89KxaDP020320 Content-Length: 1874 Lines: 58 On September 9, 2017 1:17:26 PM PDT, Jakub Kicinski wrote: >On Sat, 9 Sep 2017 12:55:51 -0700, Dmitry Torokhov wrote: >> On Sat, Sep 9, 2017 at 12:27 PM, Jakub Kicinski >wrote: >> > On Sat, 9 Sep 2017 19:41:21 +0200, Jakub Kicinski wrote: >> >> Hi! >> >> >> >> I'm having trouble with modules on linux/master. rmmod succeeds >but the >> >> module is still loaded and the refcount goes to 1: >> >> >> >> #rmmod nfp; insmod ./src/nfp.ko nfp_pf_netdev=0 ; \ >> >> /opt/netronome/bin/nfp-hwinfo -n 2 assembly.partno \ >> >> lsmod | grep nfp; \ >> >> rmmod nfp; \ >> >> lsmod | grep nfp >> >> nfp 249856 0 >> >> nfp 200704 1 >> >> >> >> If I rmmod again the module will be actually unloaded. The user >space >> >> is mostly Ubuntu 14.04. Has anyone seen this? I'm trying to >bisect >> >> now... >> > >> > Got 'em! >> > >> > commit 1455cf8dbfd06aa7651dcfccbadb7a093944ca65 (HEAD, >refs/bisect/bad) >> > Author: Dmitry Torokhov >> > Date: Wed Jul 19 17:24:30 2017 -0700 >> > >> > driver core: emit uevents when device is bound to a driver >> >> Does it happen with all modules or only nfp one? >> >> It seems to work here: >> >> dtor@dtor-glaptop3:~ $ lsmod | grep psmouse >> psmouse 135168 0 >> dtor@dtor-glaptop3:~ $ sudo rmmod psmouse >> dtor@dtor-glaptop3:~ $ lsmod | grep psmouse >> dtor@dtor-glaptop3:~ $ sudo modprobe psmouse > >It looks like the driver is actually reloaded. The driver used to >return EPROBE_DEFER, but I think it doesn't any more (rebuilding the >kernel to test that right now). > >Could the uevent on unbind tickle Ubuntu 14.04's udev or somehow >else cause the driver to be loaded again? It depends on how silly the udev rules are, but yes, this can definitely happen. Thanks. -- Dmitry