From: Jiri Slaby <jirislaby@gmail.com>
To: Oliver Neukum <oliver@neukum.org>
Cc: Jiri Kosina <jikos@jikos.cz>,
linux-input@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: cleanup of hiddev
Date: Tue, 04 Nov 2008 23:57:02 +0100 [thread overview]
Message-ID: <4910D33E.7050006@gmail.com> (raw)
In-Reply-To: <200811042351.28526.oliver@neukum.org>
On 11/04/2008 11:51 PM, Oliver Neukum wrote:
> If you call usb_register_dev() before you set
> hiddev_table[usbhid->intf->minor - HIDDEV_MINOR_BASE]
> this check in hiddev_open() may fail:
> if (i >= HIDDEV_MINORS || i < 0 || !hiddev_table[i])
> return -ENODEV;
I think, that's the point. You should also get ENODEV if you don't call
usb_register_dev(), create a node for non-existent minor manually and try to
open it. It behaves the same as if there was a lock you suggested...
Ex.:
# grep 137 /proc/devices
# mknod node c 137 0
# cat node
cat: node: No such device or address
next prev parent reply other threads:[~2008-11-04 22:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 16:31 cleanup of hiddev Oliver Neukum
2008-11-03 19:58 ` Jiri Slaby
[not found] ` <490F57D3.6060503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-04 12:17 ` Oliver Neukum
[not found] ` <200811041317.40482.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-11-04 15:19 ` Jiri Slaby
[not found] ` <4910681D.6020701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-04 15:29 ` Oliver Neukum
2008-11-04 15:33 ` Jiri Slaby
2008-11-04 17:56 ` Oliver Neukum
[not found] ` <200811041856.47950.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-11-04 20:34 ` Jiri Slaby
2008-11-04 22:51 ` Oliver Neukum
2008-11-04 22:57 ` Jiri Slaby [this message]
2008-11-04 22:59 ` Oliver Neukum
2008-11-04 14:19 ` Oliver Neukum
2008-11-04 15:00 ` Alan Stern
2008-11-04 15:12 ` Oliver Neukum
2008-11-04 15:17 ` Jiri Slaby
2008-11-04 13:07 ` Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2008-11-05 11:52 Oliver Neukum
[not found] ` <200811051252.40133.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-11-05 12:03 ` Jiri Slaby
2008-11-11 23:53 ` Jiri Kosina
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=4910D33E.7050006@gmail.com \
--to=jirislaby@gmail.com \
--cc=jikos@jikos.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).