Messages in this thread Patch in this message | | | Subject | Re: [PATCH] USB Fixes for 2.6.0-test11 | From | Greg KH <> | Date | Wed, 10 Dec 2003 17:29:08 -0800 |
| |
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); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |