mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Al Viro" <viro@zeniv.linux.org.uk>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	gregkh@suse.de, petero2@telia.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix pktcdvd breakage from commit e105b8bfc769b0545b6f0f395179d1e43cbee822
Date: Sun, 30 Nov 2008 14:25:43 +0100	[thread overview]
Message-ID: <ac3eb2510811300525n2e47ccap65e897ac1c4adab5@mail.gmail.com> (raw)
In-Reply-To: <20081130132118.GY28946@ZenIV.linux.org.uk>

On Sun, Nov 30, 2008 at 14:21, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Sun, Nov 30, 2008 at 01:41:29PM +0100, Kay Sievers wrote:
>
>> I posted a fix for that weeks ago. But the pktcdvd maintainer stated,
>> that the char device nodes are not used for anything. So the whole use
>> of dev_t should be removed entirely. They just blindly claim the same
>> char dev_t the block devices use, and conflict with char devices from
>> other subsystems. Patching out the /sys/dev/class links fixes the
>> oops, but the underlying fundamental breakage will still exist.
>>
>> Original mail here states:
>> "Maybe, but that character device would not be used for anything,
>> besides creating sub-directories in /sys/class/pktcdvd. The driver
>> implements a block device, not a character device."
>
> _What_ character device nodes?  The only thing that dev_t value used to
> be used for was giving contents for a text file - ..../dev in sysfs directory.
> With introduction of /sys/dev/char the damn thing got confused for
> character device number *by* *device_create()*.  That's all.
>
> There are no character device nodes at all.  Driver doesn't claim them.
> Not in that call of device_create(), not anywhere else.  sysfs doesn't
> create them (or any other device nodes).  If you mknod such thing as
> char device and try to open it, the kernel won't go anywhere near this driver,
> whether there'd been other drivers or not.
>
> So what kind of fundamental breakage are you talking about?  All I can see
> here is a bogus entry added to bogu^Wmisguided^W /sys/dev/char, which leads
> to WARN_ON() in case if somebody had char device with device number numerically
> equal to that of our block device and to silent crapping into /sys/dev/char
> if no such char device had been there already

Pktcdvd creates char _and_ block device nodes at the same time, while
the char nodes are not allocated, but created and conflict in
/sys/dev/ with properly allocated ones from other subsystems. Your
patch just papers over this bug.

Kay

  reply	other threads:[~2008-11-30 13:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-30 12:19 Al Viro
2008-11-30 12:41 ` Kay Sievers
2008-11-30 13:21   ` Al Viro
2008-11-30 13:25     ` Kay Sievers [this message]
2008-11-30 13:32       ` Al Viro
2008-11-30 13:40         ` Al Viro
2008-11-30 13:44           ` Kay Sievers
2008-11-30 13:50             ` Al Viro
2008-11-30 13:57               ` Kay Sievers
2008-11-30 14:13                 ` Al Viro
2008-11-30 14:28                   ` Kay Sievers
2008-11-30 14:52                     ` Al Viro
2008-11-30 15:53                       ` Al Viro
2008-11-30 15:56                       ` Kay Sievers
2008-12-05  2:57                         ` Kay Sievers
2008-12-06  3:38                           ` Kay Sievers
2008-12-09 21:57                             ` Peter Osterlund
2008-11-30 13:41         ` Kay Sievers

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=ac3eb2510811300525n2e47ccap65e897ac1c4adab5@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petero2@telia.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®