From: Greg KH <greg@kroah.com>
To: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB Fixes for 2.6.0-test11
Date: Wed, 10 Dec 2003 17:29:08 -0800 [thread overview]
Message-ID: <10711061483686@kroah.com> (raw)
In-Reply-To: <10711061482794@kroah.com>
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);
next prev parent reply other threads:[~2003-12-11 1:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-11 1:27 [BK PATCH] USB Fixes for 2.6.0-test11 Greg KH
2003-12-11 1:29 ` [PATCH] " Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH [this message]
2003-12-11 17:56 ` [BK PATCH] Kobject Fix " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10711061483686@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.