Summary: | sys-fs/udev-171-r6: all modules are loaded even with rc_coldplug="NO" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matthew Stapleton <matthew4196> |
Component: | [OLD] Core system | Assignee: | udev maintainers <udev-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | ghepeu, mail, nikoli |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
udev_coldplug_fix.patch
udev_coldplug_fix.patch /lib/udev/rules.d/80-drivers.rules patch udev coldplug fix udev-coldplug.patch |
Description
Matthew Stapleton
2012-06-30 02:49:05 UTC
Created attachment 316715 [details, diff]
udev_coldplug_fix.patch
Can you please upgrade to udev-187-r1 and udev-init-scripts-14 and let me know if this is still an issue? Thanks, William I've got the same problem with sys-fs/udev-189 and sys-fs/udev-init-scripts-16. Matthew's patch fixes it here too. The only difference from sys-fs/udev-171-r6 is that snd-emu10k1 doesn't get loaded anymore if I don't put it in conf.d/modules but I suppose that's expected. Hi Matthew, Is this still an issue with udev-197-r4 and udev-init-scripts-22? I'm asking because your patch runs commands for udev that I don't think apply any more if rc_coldplug is no. I'll include your patch inline here and point out what I mean. Your comments would be greatly appreciated. --- /etc/init.d_orig/udev 2012-06-24 18:33:16.000000000 +1000 +++ /etc/init.d/udev 2012-06-30 11:50:58.000000000 +1000 @@ -171,9 +171,16 @@ if ! yesno "${rc_coldplug}"; then # Do not run any init-scripts, Bug #206518 udevadm control --property=do_not_run_plug_service=1 + + # only create device nodes + udevadm trigger --action="add" --attr-match=dev Since we require devtmpfs now, you shouldn't have to create device nodes. + + # run persistent-net stuff, bug 191466 + udevadm trigger --action="add" --subsystem-match=net Does this still apply? Created attachment 338338 [details, diff]
udev_coldplug_fix.patch
I am thinking that this patch would be more appropriate with modern udev
-- if rc_coldplug is not yes, do not run the coldplug sequence at all.
Thoghts?
William
I can confirm this is a problem with sys-fs/udev-197-r9 and sys-fs/udev-init-scripts-23. However, I use a different patch, using a variable that's already set by init script when cold plugging is disabled. Tested with coldplug setting both on and off. Created attachment 340108 [details, diff]
/lib/udev/rules.d/80-drivers.rules patch
(In reply to comment #7) > Created attachment 340108 [details, diff] [details, diff] > /lib/udev/rules.d/80-drivers.rules patch I'm not interested in a patch to the rules that we would never get pushed upstream if we can avoid it. So, again, what do you think of the patch in comment #5? Thanks, William Created attachment 340120 [details, diff] udev coldplug fix I've used your patch from comment #5, but added back subsystems trigger (it looks like it just adds the subsystems themselves and already loaded kernel modules as "devices" - should be harmless). Also added explicit "--type=devices" to non-coldplug branch (it's a default setting, but the coldplug branch uses it explicitly, so use it here to not break the code pattern). I've tested it and after this patch no extra modules are loaded on boot by udev on my system (of course, I've reverted the rule change first). Created attachment 340132 [details, diff]
udev-coldplug.patch
Sorry, I pointed you to the wrong patch. I thought I had attached this
one, but I hadn't.
Since modern udev uses devtmpfs, I believe we can completely avoid
calling "udevadm trigger" when nocoldplug is specified on the kernel
command line.
So, can you please test this patch? This should be the last one.
Thanks,
William
Your last patch (from comment #10) works fine for me. However, given that this is a change in a critical system component I think it will be prudent to make sure that the trigger calls are really completely unnecessary (maybe test it on other archs than x86/amd64?). BTW I'm not the original reporter of this bug. I haven't heard from the original reporter in months, so I have added the patch in comment #10 as commit 5dd6589. This will be part of udev-init-scripts-24. |