Re: [PATCH] kobject: fix suppressing modalias in uevents delivered over netlink

From: Casey Leedom
Date: Thu Dec 21 2017 - 15:26:47 EST

| From: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
| Sent: Wednesday, December 20, 2017 9:13 PM
| 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:
| rules: load drivers only on "add" systemd/systemd@9b32afa
| Previously we were loading kernel modules on all device events save for
| "remove". With the introduction of KOBJ_BIND/KOBJ_UNBIND this causes issues,
| as driver modules that have devices bound to the...

Thanks Dmitry.

Now I understand why your changed this behavior. It
added new BIND/UNBIND events and the current udev rules treated that as a
load event.

I'm not familiar with the format of /etc/udev/rules.d/ files. Komali's
system doesn't have a 80-drivers.rules entry. It looks like she can just
add the file with the diff to test this out. (Although I'm not sure what
"tifm_sd" is ... it looks like a specific driver ...)