Bug 833 - modprobe usb-storage fails due to kernel thread doing funny stuff...
Summary: modprobe usb-storage fails due to kernel thread doing funny stuff...
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.15.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-30 09:13 UTC by Alain Knaff
Modified: 2010-02-24 09:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Patch to fix issue (527 bytes, patch)
2009-12-30 09:46 UTC, Alain Knaff
Details
Patch (fixed) (524 bytes, patch)
2009-12-30 21:02 UTC, Alain Knaff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Knaff 2009-12-30 09:13:35 UTC
modprobe usb-storage fails with a "Module already exists" error with 2.6.32.

The following seems to happen:

usb-storage depends on usb-libusual, so modprobe schedules first an insmod usb-libusual, and then usb-storage.

However, the kernel does funny stuff in usb-libusual's init, and spawns a thread to do "modprobe -q -- usb-storage". Usually, this thread wins the race, and usb-storage will already be present before the outer modprobe gets around to inserting it. With the result that it gets an error, because the module already exists.

It's more than a cosmetic problem, because this makes modprobing anything that depends on usb-storage impossible (such as ums-cypress)

The attached patch fixes the issue by ignoring EEXIST in do_modprobe
Comment 1 Alain Knaff 2009-12-30 09:46:40 UTC
Created attachment 873 [details]
Patch to fix issue
Comment 2 Alain Knaff 2009-12-30 21:02:45 UTC
Created attachment 875 [details]
Patch (fixed)

Previous patch had a typo. Fixed here.
Comment 3 Denys Vlasenko 2010-01-10 03:55:22 UTC
Applied to git, will be in 1.16.x. Thanks!