ChangeSet 1.1526, 2003/12/10 16:00:53-08:00, arvidjaar@mail.ru [PATCH] USB: prevent catch-all USB aliases in modules.alias visor.c defines one empty slot in USB ids table that can be filled in at runtime using module parameters. file2alias generates catch-all alias for it: alias usb:v*p*dl*dh*dc*dsc*dp*ic*isc*ip* visor patch adds the same sanity check as in depmod to scripts/file2alias. scripts/file2alias.c | 7 +++++++ 1 files changed, 7 insertions(+) diff -Nru a/scripts/file2alias.c b/scripts/file2alias.c --- a/scripts/file2alias.c Wed Dec 10 16:46:45 2003 +++ b/scripts/file2alias.c Wed Dec 10 16:46:45 2003 @@ -52,6 +52,13 @@ id->bcdDevice_lo = TO_NATIVE(id->bcdDevice_lo); id->bcdDevice_hi = TO_NATIVE(id->bcdDevice_hi); + /* + * Some modules (visor) have empty slots as placeholder for + * run-time specification that results in catch-all alias + */ + if (!(id->idVendor | id->bDeviceClass | id->bInterfaceClass)) + return 1; + strcpy(alias, "usb:"); ADD(alias, "v", id->match_flags&USB_DEVICE_ID_MATCH_VENDOR, id->idVendor);