From: Richard Gooch <rgooch@ras.ucalgary.ca>
To: "Carsten Otte" <COTTE@de.ibm.com>
Cc: Richard Gooch <rgooch@ras.ucalgary.ca>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] linux-2.417 devfs 64bit portablility issue
Date: Sun, 24 Mar 2002 19:28:19 -0700 [thread overview]
Message-ID: <200203250228.g2P2SJt20329@vindaloo.ras.ucalgary.ca> (raw)
In-Reply-To: <OF651FD06B.226CC224-ONC1256B82.0043E511@de.ibm.com>
Carsten Otte writes:
> the previous version of my patch did contain a bug,
> caused by incorrect parameter order when calling
> __devfs_unregister_major. The symptom was, that
> major numbers registered with devfs_register_*dev
> but not allocated with devfs_alloc_major were not
> freed by calling devfs_unregister_*dev. This is
> now fixed. Sorry, the patch is attached (due to Notes
> messing up with whitespace).
> (See attached file: linux-2.4.17-devfs_fixup.diff)
In future, please send patches in plain text, rather than
MIME-encoded.
> Richard, I would appreciate it if you could finally
> look into this.
I don't like your patch because:
- it replaces the bitfield with a character array. This in turn causes
more data bloat (8 times more), and also prevents the use of the ffz
functions
- you've mixed in a behavioural change to devfs_register_???dev() to
call devfs_alloc_major() when the provided major is 0. While this
might be good idea in the long run (but maybe not), it should be
separated from the actual fix.
Unfortunately I've been busy chasing other (possible, not sure yet
what the source of the problems are) bugs, so I haven't had time to
code up a solution yet.
Is there any reason why switching from __u32 to unsigned long won't
work? Of course, the initialising values would need to be 64 bits wide
on a 64 bit machine, but that could probably be taken care of with
some clever macros (ab)use:
#if 64 bit
#define INITIALISER64(a,b) (a)<<32|(b)
#else
#define INITIALISER64(a,b) (a),(b)
#endif
static struct major_list block_major_list =
{SPIN_LOCK_UNLOCKED,
{INITIALISER64(0xfffffb8f,0xffffffff), /* Majors 0 to 63 */
INITIALISER64(0xfffffffe,0xff03ffef), /* Majors 64 to 127 */
and so on. Untested, and I only spent a few seconds thinking about it,
but perhaps this will solve it.
Regards,
Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
next prev parent reply other threads:[~2002-03-25 2:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-20 12:27 Carsten Otte
2002-03-25 2:28 ` Richard Gooch [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-21 14:48 Carsten Otte
2002-02-18 10:01 Carsten Otte
2002-02-18 17:56 ` Richard Gooch
2002-02-12 11:18 Carsten Otte
2002-02-11 13:00 Carsten Otte
2002-02-11 16:12 ` Russell King
2002-02-11 21:05 ` Anton Blanchard
2002-02-12 0:33 ` David S. Miller
2002-02-18 1:02 ` Richard Gooch
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=200203250228.g2P2SJt20329@vindaloo.ras.ucalgary.ca \
--to=rgooch@ras.ucalgary.ca \
--cc=COTTE@de.ibm.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®