Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751667AbdLUFNi (ORCPT ); Thu, 21 Dec 2017 00:13:38 -0500 Received: from mail-ua0-f177.google.com ([209.85.217.177]:37257 "EHLO mail-ua0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbdLUFNf (ORCPT ); Thu, 21 Dec 2017 00:13:35 -0500 X-Google-Smtp-Source: ACJfBosPNTB0xhKVteYMlh8IrwIkQYcz8EKS0B4NZkFOMEYKsCEmAItBYkxIGDmlcd2gyIJAEXVYGLgMUJxPsrETfRo= MIME-Version: 1.0 In-Reply-To: References: <20171213232122.5ztmwume5kylh4mz@dtor-ws> From: Dmitry Torokhov Date: Wed, 20 Dec 2017 23:13:33 -0600 Message-ID: Subject: Re: [PATCH] kobject: fix suppressing modalias in uevents delivered over netlink To: Casey Leedom Cc: Greg Kroah-Hartman , Eric Dumazet , Eric Dumazet , Tariq Toukan , "David S . Miller" , Komali Katari , "Luis R. Rodriguez" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1503 Lines: 30 On Tue, Dec 19, 2017 at 3:20 PM, Casey Leedom wrote: > By the way, Komali went back and tried 4.14.7 and it does exhibit the > issue which she originally reported. As noted before, the origin of the new > behavior was tracked down to kernel.org:1455cf8 ... Also as noted, Dmitry's > patch does not solve the problem. OK, so there is 2 separate issues. First is that the "zapping" of modaliases was broken by Eric's changes and we do need the patch above to fix it so we do not end up with modules being essentially not-unloadable on systems with old udev rules, as since trying to unload module would result in unbinding from a device, and udev would see unbind uevent and immediately reload the module in question. Greg, can you please schedule my patch in for 4.15? The 2nd issue is that Casey is seeing cxgb4vf driver being loaded. This happens because vfio-pci driver binds to the device, which causes KOBJ_BIND to get emitted, which causes all modules that match the PCI device ID that was bound to load [again]. While we could fix the issue by putting another bandaid and zapping the modalias on KOBJ_BIND as well, I am not sure we need to do that, as I do not see a harm in having cxgb4vf module loaded. Rather than patching the kernel I'd recommend Casey simply update the udev scripts to only load module on KOBJ_ADD event: https://github.com/systemd/systemd/commit/9b32afa9f241fe8febc0a754850f1e7331caf6e3#diff-0e123aabb4420b8b95088699179f3416 Thanks. -- Dmitry