All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: mpm@selenic.com, akpm@osdl.org, Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch 2.6.12-rc2] revert fs/char_dev.c CONFIG_BASE_FULL change
Date: Sun, 17 Apr 2005 10:06:53 -0700	[thread overview]
Message-ID: <200504171006.53328.david-b@pacbell.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

I tracked down a regression in PCMCIA (and other software) to a
new bogus register_chrdev() behavior that got merged last month;
a patch from Matt Mackall that misbehaves.

This patch just reverts Matt's, restoring the previous behavior
but at the cost of about a Kbyte of static memory on 32bit CPUs.
Someday a Real Fix(tm) would be good.

- Dave


[-- Attachment #2: chrdev.patch --]
[-- Type: text/x-diff, Size: 952 bytes --]

This reverts a fs/char_dev.c patch that was merged into BK on March 3.

The problem is that it breaks things ... __register_chrdev_region() has
a block of code, commented "temporary" for over two years now, which
fails rudely during PCMCIA initialization or other register_chrdev()
calls, because it doesn't "degrade to linked list".  This keeps whole
subsystems from working.

A real fix to that "temporary" code should be possible, using some better
scheme to allocate major numbers, but it's not something I want to spend
time on just now.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

--- 1.38/fs/char_dev.c	2005-03-09 09:03:28 -08:00
+++ edited/fs/char_dev.c	2005-04-17 08:45:19 -07:00
@@ -26,8 +26,7 @@
 
 static struct kobj_map *cdev_map;
 
-/* degrade to linked list for small systems */
-#define MAX_PROBE_HASH (CONFIG_BASE_SMALL ? 1 : 255)
+#define MAX_PROBE_HASH 255	/* random */
 
 static DECLARE_MUTEX(chrdevs_lock);
 

             reply	other threads:[~2005-04-17 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17 17:06 David Brownell [this message]
2005-04-17 17:33 ` [patch 2.6.12-rc2] revert fs/char_dev.c CONFIG_BASE_FULL change Matt Mackall

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=200504171006.53328.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=torvalds@osdl.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 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.