22 Sep, 2010

1 commit


07 Aug, 2010

1 commit

  • Make /dev/console get initialised before any initialisation routine that
    invokes modprobe because if modprobe fails, it's going to want to open
    /dev/console, presumably to write an error message to.

    The problem with that is that if the /dev/console driver is not yet
    initialised, the chardev handler will call request_module() to invoke
    modprobe, which will fail, because we never compile /dev/console as a
    module.

    This will lead to a modprobe loop, showing the following in the kernel
    log:

    request_module: runaway loop modprobe char-major-5-1
    request_module: runaway loop modprobe char-major-5-1
    request_module: runaway loop modprobe char-major-5-1
    request_module: runaway loop modprobe char-major-5-1
    request_module: runaway loop modprobe char-major-5-1

    This can happen, for example, when the built in md5 module can't find
    the built in cryptomgr module (because the latter fails to initialise).
    The md5 module comes before the call to tty_init(), presumably because
    'crypto' comes before 'drivers' alphabetically.

    Fix this by calling tty_init() from chrdev_init().

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

24 Sep, 2009

1 commit

  • There are two useless lines in fs/char_dev.c.

    In register_chrdev there is a loop to change all '/' into '!' in the
    kernel object name.
    This code is useless as the same substitution is in kobject_set_name_vargs in
    lib/kobject.c:
    228 /* ewww... some of these buggers have '/' in the name ... */
    229 while ((s = strchr(kobj->name, '/')))
    230 s[0] = '!';

    kobject_set_name_vargs is called by kobject_set_name.
    kobject_set_name is called just above the useless loop.

    [hidave.darkstar@gmail.com: fix warning, remove the unused char *s]
    Signed-off-by: Renzo Davoli
    Cc: Al Viro
    Signed-off-by: Dave Young
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Renzo Davoli
     

12 Sep, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (377 commits)
    ASoC: au1x: PSC-AC97 bugfixes
    ALSA: dummy - Increase MAX_PCM_SUBSTREAMS to 128
    ALSA: dummy - Add debug proc file
    ALSA: Add const prefix to proc helper functions
    ALSA: Re-export snd_pcm_format_name() function
    ALSA: hda - Use auto model for HP laptops with ALC268 codec
    ALSA: cs46xx - Fix minimum period size
    ASoC: Fix WM835x Out4 capture enumeration
    ALSA: Remove unneeded ifdef from sound/core.h
    ALSA: Remove struct snd_monitor_file from public sound/core.h
    ASoC: Remove unuused hw_read_t
    sound: oxygen: work around MCE when changing volume
    ALSA: dummy - Fake buffer allocations
    ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
    ASoC: fix pxa2xx-ac97.c breakage
    ALSA: dummy - Fix the timer calculation in systimer mode
    ALSA: dummy - Add more description
    ALSA: dummy - Better jiffies handling
    ALSA: dummy - Support high-res timer mode
    ALSA: Release v1.0.21
    ...

    Linus Torvalds
     

11 Sep, 2009

1 commit


10 Aug, 2009

1 commit


13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

12 Jun, 2009

1 commit

  • The only user of the i_cindex element in the inode structure is used
    is by the firewire drivers. As part of an attempt to slim down the
    inode structure to save memory --- since a typical Linux system will
    have hundreds of thousands if not millions of inodes cached, a
    reduction in the size inode has high leverage.

    The firewire driver does not need i_cindex in any fast path, so it's
    simple enough to calculate when it is needed, instead of wasting space
    in the inode structure.

    Signed-off-by: "Theodore Ts'o"
    Cc: krh@redhat.com
    Cc: stefanr@s5r6.in-berlin.de
    Cc: linux-fsdevel@vger.kernel.org
    Signed-off-by: Al Viro

    Theodore Ts'o
     

07 Jan, 2009

1 commit


23 Oct, 2008

1 commit


16 Oct, 2008

1 commit


21 Jun, 2008

2 commits


29 Apr, 2008

1 commit


09 Feb, 2008

1 commit


25 Jan, 2008

2 commits


17 Oct, 2007

1 commit

  • provide BDI constructor/destructor hooks

    [akpm@linux-foundation.org: compile fix]
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

20 Jul, 2007

1 commit


05 Apr, 2007

1 commit

  • Revert all this. It can cause device-mapper to receive a different major from
    earlier kernels and it turns out that the Amanda backup program (via GNU tar,
    apparently) checks major numbers on files when performing incremental backups.

    Which is a bit broken of Amanda (or tar), but this feature isn't important
    enough to justify the churn.

    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

21 Feb, 2007

1 commit

  • Several people have reported failures in dynamic major device number handling
    due to the recent changes in there to avoid handing out the local/experimental
    majors.

    Rolf reports that this is due to a gcc-4.1.0 bug.

    The patch refactors that code a lot in an attempt to provoke the compiler into
    behaving.

    Cc: Rolf Eike Beer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

13 Feb, 2007

1 commit


01 Oct, 2006

1 commit


30 Sep, 2006

2 commits

  • Add some documentation comments for the cdev interface.

    Signed-off-by: Jonathan Corbet
    Cc: Rolf Eike Beer
    Acked-by: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Corbet
     
  • The code in __register_chrdev_region checks that if the driver wishing to
    register has the same major as an existing driver the new minor range is
    strictly less than the existing minor range. However, it does not also
    check that the new minor range is strictly greater than the existing minor
    range. That is, if driver X has registered with major=x and minor=0-3,
    __register_chrdev_region will allow driver Y to register with major=x and
    minor=1-4.

    Signed-off-by: Amos Waterland
    Cc: Linas Vepstas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amos Waterland
     

27 Sep, 2006

1 commit

  • Set the backing device info capabilities for /dev/mem and /dev/kmem to
    permit direct sharing under no-MMU conditions and full mapping capabilities
    under MMU conditions. Make the BDI used by these available to all directly
    mappable character devices.

    Also comment the capabilities for /dev/zero.

    [akpm@osdl.org: ifdef reductions]
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

15 Jul, 2006

1 commit


01 Jul, 2006

1 commit


27 Jun, 2006

1 commit


01 Apr, 2006

1 commit

  • Make baby-simple the code for /proc/devices. Based on the proven design
    for /proc/interrupts.

    This also fixes the early-termination regression 2.6.16 introduced, as
    demonstrated by:

    # dd if=/proc/devices bs=1
    Character devices:
    1 mem
    27+0 records in
    27+0 records out

    This should also work (but is untested) when /proc/devices >4096 bytes,
    which I believe is what the original 2.6.16 rewrite fixed.

    [akpm@osdl.org: cleanups, simplifications]
    Signed-off-by: Joe Korty
    Cc: Neil Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Korty
     

29 Mar, 2006

2 commits

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Mark the f_ops members of inodes as const, as well as fix the
    ripple-through this causes by places that copy this f_ops and then "do
    stuff" with it.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

26 Mar, 2006

1 commit


21 Mar, 2006

1 commit


15 Jan, 2006

1 commit

  • A Christoph suggested that the /proc/devices file be converted to use the
    seq_file interface. This patch does that.

    I've obxerved one or two installation that had sufficiently large sans that
    they overran the 4k limit on /proc/devices.

    Signed-off-by: Neil Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     

13 Jul, 2005

1 commit

  • While fixing an oops in the st driver in a dirty release path, I
    encountered an oops in cdev_put for cdevs allocated using cdev_alloc. If
    cdev_del is called when the cdev kobject still has an open user, when the
    last cdev_put is called, the cdev_put will call kobject_put, which will end
    up ultimately releasing the cdev in cdev_dynamic_release. Patch fixes the
    oops by preventing cdev_put from accessing freed memory.

    Signed-off-by: Brian King
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian King
     

29 Jun, 2005

1 commit


24 Jun, 2005

1 commit

  • Patch to add check to get_chrdev_list and get_blkdev_list to prevent reads
    of /proc/devices from spilling over the provided page if more than 4096
    bytes of string data are generated from all the registered character and
    block devices in a system

    Signed-off-by: Neil Horman
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     

06 May, 2005

1 commit


18 Apr, 2005

1 commit

  • 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
    Acked-by: Matt Mackall
    Signed-off-by: Linus Torvalds

    David Brownell