30 Sep, 2006

40 commits

  • All sound/sound_firmware.c contains is mod_firmware_load() that is a legacy
    API only used by some OSS drivers.

    This patch builds it into an own sound_firmware module that is only built
    depending on CONFIG_SOUND_PRIME making the kernel slightly smaller for ALSA
    users.

    [alan@lxorguk.ukuu.org.uk: comment fix]
    Signed-off-by: Adrian Bunk
    Acked-by: Takashi Iwai
    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • I had to look back: this code was extracted from the module.c code in 2005.

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Add access control lists for tmpfs.

    Signed-off-by: Andreas Gruenbacher
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Gruenbacher
     
  • The patches solve the following problem: We want to grant access to devices
    based on who is logged in from where, etc. This includes switching back and
    forth between multiple user sessions, etc.

    Using ACLs to define device access for logged-in users gives us all the
    flexibility we need in order to fully solve the problem.

    Device special files nowadays usually live on tmpfs, hence tmpfs ACLs.

    Different distros have come up with solutions that solve the problem to
    different degrees: SUSE uses a resource manager which tracks login sessions
    and sets ACLs on device inodes as appropriate. RedHat uses pam_console, which
    changes the primary file ownership to the logged-in user. Others use a set of
    groups that users must be in in order to be granted the appropriate accesses.

    The freedesktop.org project plans to implement a combination of a
    console-tracker and a HAL-device-list based solution to grant access to
    devices to users, and more distros will likely follow this approach.

    These patches have first been posted here on 2 February 2005, and again
    on 8 January 2006. We have been shipping them in SLES9 and SLES10 with
    no problems reported. The previous submission is archived here:

    http://lkml.org/lkml/2006/1/8/229
    http://lkml.org/lkml/2006/1/8/230
    http://lkml.org/lkml/2006/1/8/231

    This patch:

    Add some infrastructure for access control lists on in-memory
    filesystems such as tmpfs.

    Signed-off-by: Andreas Gruenbacher
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Gruenbacher
     
  • POSIX states that poll() shall fail with EINVAL if nfds > OPEN_MAX. In
    this context, POSIX is referring to sysconf(OPEN_MAX), which is the value
    of current->signal->rlim[RLIMIT_NOFILE].rlim_cur in the linux kernel, not
    the compile-time constant which happens to also be named OPEN_MAX. In the
    current code, an application may poll up to max_fdset file descriptors,
    even if this exceeds RLIMIT_NOFILE. The current code also breaks
    applications which poll more than max_fdset descriptors, which worked circa
    2.4.18 when the check was against NR_OPEN, which is 1024*1024. This patch
    enforces the limit precisely as POSIX defines, even if RLIMIT_NOFILE has
    been changed at run time with ulimit -n.

    To elaborate on the rationale for this, there are three cases:

    1) RLIMIT_NOFILE is at the default value of 1024

    In this (default) case, the patch changes nothing. Calls with nfds > 1024
    fail with EINVAL both before and after the patch, and calls with nfds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Snook
     
  • For len equal to 4, we never call sppp_lcp_conf_parse_options(),
    therefore rmagic does not get initialized.

    Signed-off-by: Eric Sesterhenn
    Acked-by: Paul Fulghum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sesterhenn
     
  • I've been using systemtap for some debugging and I noticed that it can't
    probe a lot of modules. Turns out it's kind of silly, the sections section
    of /sys/module is limited to 32byte filenames and many of the actual
    sections are a a bit longer than that.

    [akpm@osdl.org: rewrite to use dymanic allocation]
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian S. Nelson
     
  • I just got a bounce telling me my contributions aren't welcome.

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

    Matthew Wilcox
     
  • People search maintainers for NBD and then decide it is not
    maintained.

    (akpm: ditto LVM. And other things, but I forget what they were)

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

    Pavel Machek
     
  • This cleans up SubmittingPatches a bit.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Constify two structs.
    Correct some typos.

    Compile-tested and run-tested (module inserted) on 2.6.18-rc4-mm3.

    Signed-off-by: Andreas Mohr
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Mohr
     
  • This patch limits the messages when ldisc open faulures happen. It happens
    under memory pressure.

    Signed-off-by: Akinobu Mita
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Mention Documenation/ABI/ requirements in Documentation/SubmitChecklist.

    Signed-off-by: Randy Dunlap
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • akpm draws my attention to the fact that sysctl(VM_PAGE_CLUSTER) might
    conceivably change page_cluster to 0 while valid_swaphandles() is in the
    middle of using it, leading to an embarrassingly long loop: take a local
    snapshot of page_cluster and work with that.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • ratelimit_pages in page-writeback.c is recalculated (in set_ratelimit())
    every time a CPU is hot-added/removed. But this value is not recalculated
    when new pages are hot-added.

    This patch fixes that problem by calling set_ratelimit() when new pages
    are hot-added.

    [akpm@osdl.org: cleanups]
    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • page-writeback.c has a static local variable "total_pages", which is the
    total number of pages in the system.

    There is a global variable "vm_total_pages", which is the total number of
    pages the VM controls.

    Both are assigned from the return value of nr_free_pagecache_pages().

    This patch removes the local variable and uses the global variable in that
    place.

    One more issue with the local static variable "total_pages" is that it is
    not updated when new pages are hot-added. Since vm_total_pages is updated
    when new pages are hot-added, this patch fixes that problem too.

    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • This change corrects the logic on the preprocessor conditionals that
    include support for ISA port i/o (/dev/ioports) into the mem character
    driver.

    This fixes the following error when building for powerpc platforms with
    CONFIG_PCI=n.

    drivers/built-in.o: undefined reference to `pci_io_base'

    Signed-off-by: Geoff Levand
    Acked-by: Linas Vepstas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geoff Levand
     
  • I think this is a time to step down from my SUPERH architecture
    maintainerships. The major development issues for this port seem to shift
    on the hardwares I can't access and I have no recent activity on kernel. I
    shouldn't qualify as a maintainer of SUPERH port now and there is no
    problem because Paul is actively maintaining it. The attached patch drops
    my name, address and web URL from MAINTAINERS file.

    Signed-off-by: Kazumoto Kojima
    Cc: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kaz Kojima
     
  • Replace current->fs by fs helper variable to reduce some indirection
    overhead and (at least at the moment, before the current_thread_info() %gs
    PDA improvement is available) get rid of more costly current references.
    Reduces fs/namei.o from 37786 to 37082 Bytes (704 Bytes saved).

    [akpm@osdl.org: cleanup]
    Signed-off-by: Andreas Mohr
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Mohr
     
  • This patch (as776) adds a new chapter to Documentation/CodingStyle,
    explaining the circumstances under which a function should return 0 for
    failure and non-zero for success as opposed to a negative error code for
    failure and 0 for success.

    Signed-off-by: Alan Stern
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Stern
     
  • Un-inlining rwsem_down_failed_common() (two callsites) reduced lib/rwsem.o
    on my Athlon, gcc 4.1.2 from 5935 to 5480 Bytes (455 Bytes saved).

    I thus guess that reduced icache footprint (and better function caching) is
    worth more than any function call overhead.

    Signed-off-by: Andreas Mohr
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Mohr
     
  • This patch adds Jim Lewis to the MAINTAINERS file for the Spidernet
    network driver.

    Signed-off-by: James K Lewis
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Lewis
     
  • Forward port of the patch by Solar and ported by Julio.

    Compiles, boots, and passes my looptorturetest.sh.

    Signed-off-by: Serge E. Hallyn
    Cc: Julio Auto
    Cc: Solar Designer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • This appears to be a verbatim copy-n-paste of the GPL.

    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The cpuset code handling hot unplug of CPUs or Memory Nodes was incorrect -
    it could remove a CPU or Node from the top cpuset, while leaving it still
    in some child cpusets.

    One basic rule of cpusets is that each cpusets cpus and mems are subsets of
    its parents. The cpuset hot unplug code violated this rule.

    So the cpuset hotunplug handler must walk down the tree, removing any
    removed CPU or Node from all cpusets.

    However, it is not allowed to make a cpusets cpus or mems become empty.
    They can only transition from empty to non-empty, not back.

    So if the last CPU or Node would be removed from a cpuset by the above
    walk, we scan back up the cpuset hierarchy, finding the nearest ancestor
    that still has something online, and copy its CPU or Memory placement.

    Signed-off-by: Paul Jackson
    Cc: Nathan Lynch
    Cc: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Jackson
     
  • Change the list of memory nodes allowed to tasks in the top (root) nodeset
    to dynamically track what cpus are online, using a call to a cpuset hook
    from the memory hotplug code. Make this top cpus file read-only.

    On systems that have cpusets configured in their kernel, but that aren't
    actively using cpusets (for some distros, this covers the majority of
    systems) all tasks end up in the top cpuset.

    If that system does support memory hotplug, then these tasks cannot make
    use of memory nodes that are added after system boot, because the memory
    nodes are not allowed in the top cpuset. This is a surprising regression
    over earlier kernels that didn't have cpusets enabled.

    One key motivation for this change is to remain consistent with the
    behaviour for the top_cpuset's 'cpus', which is also read-only, and which
    automatically tracks the cpu_online_map.

    This change also has the minor benefit that it fixes a long standing,
    little noticed, minor bug in cpusets. The cpuset performance tweak to
    short circuit the cpuset_zone_allowed() check on systems with just a single
    cpuset (see 'number_of_cpusets', in linux/cpuset.h) meant that simply
    changing the 'mems' of the top_cpuset had no affect, even though the change
    (the write system call) appeared to succeed. With the following change,
    that write to the 'mems' file fails -EACCES, and the 'mems' file stubbornly
    refuses to be changed via user space writes. Thus no one should be mislead
    into thinking they've changed the top_cpusets's 'mems' when in affect they
    haven't.

    In order to keep the behaviour of cpusets consistent between systems
    actively making use of them and systems not using them, this patch changes
    the behaviour of the 'mems' file in the top (root) cpuset, making it read
    only, and making it automatically track the value of node_online_map. Thus
    tasks in the top cpuset will have automatic use of hot plugged memory nodes
    allowed by their cpuset.

    [akpm@osdl.org: build fix]
    [bunk@stusta.de: build fix]
    Signed-off-by: Paul Jackson
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Jackson
     
  • Fix simple typo in RTC_HCTOSYS option.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • A previous patch to allow an exiting task to OOM kill itself (and thereby
    avoid a little deadlock) introduced a problem. We don't want the
    PF_EXITING task, even if it is 'current', to access mem reserves if there
    is already a TIF_MEMDIE process in the system sucking up reserves.

    Also make the commenting a little bit clearer, and note that our current
    scheme of effectively single threading the OOM killer is not itself
    perfect.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • - It is not possible to have task->mm == &init_mm.

    - task_lock() buys nothing for 'if (!p->mm)' check.

    Signed-off-by: Oleg Nesterov
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • No logic changes, but imho easier to read.

    Signed-off-by: Oleg Nesterov
    Acked-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • The only one usage of TASK_DEAD outside of last schedule path,

    select_bad_process:

    for_each_task(p) {

    if (!p->mm)
    continue;
    ...
    if (p->state == TASK_DEAD)
    continue;
    ...

    TASK_DEAD state is set at the end of do_exit(), this means that p->mm
    was already set == NULL by exit_mm(), so this task was already rejected
    by 'if (!p->mm)' above.

    Note also that the caller holds tasklist_lock, this means that p can't
    pass exit_notify() and then set TASK_DEAD when p->mm != NULL.

    Also, remove open-coded is_init().

    Signed-off-by: Oleg Nesterov
    Cc: Ingo Molnar
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • I am not sure about this patch, I am asking Ingo to take a decision.

    task_struct->state == EXIT_DEAD is a very special case, to avoid a confusion
    it makes sense to introduce a new state, TASK_DEAD, while EXIT_DEAD should
    live only in ->exit_state as documented in sched.h.

    Note that this state is not visible to user-space, get_task_state() masks off
    unsuitable states.

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

    Oleg Nesterov
     
  • After the previous change (->flags & PF_DEAD) (->state == EXIT_DEAD), we
    don't need PF_DEAD any longer.

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

    Oleg Nesterov
     
  • schedule() checks PF_DEAD on every context switch and sets ->state = EXIT_DEAD
    to ensure that the exiting task will be deactivated. Note that this EXIT_DEAD
    is in fact a "random" value, we can use any bit except normal TASK_XXX values.

    It is better to set this state in do_exit() along with PF_DEAD flag and remove
    that check in schedule().

    We are safe wrt concurrent try_to_wake_up() (for example ptrace, tkill), it
    can not change task's ->state: the 'state' argument of try_to_wake_up() can't
    have EXIT_DEAD bit. And in case when try_to_wake_up() sees a stale value of
    ->state == TASK_RUNNING it will do nothing.

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

    Oleg Nesterov
     
  • Introduce the disable_irq_nosync_lockdep_irqsave() and
    enable_irq_lockdep_irqrestore() APIs. These are needed for NE2000; basically
    NE2000 calls disable_irq and enable_irq as locking against the IRQ handler,
    but both in cases where interrupts are on and off. This means that lockdep
    needs to track the old state of the virtual irq flags on disable_irq, and
    restore these at enable_irq time.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Everyone passes valid pointer there.

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

    Alexey Dobriyan
     
  • If register_filesystem() fails mux workqueue must be killed.

    Signed-off-by: Alexey Dobriyan
    Cc: Eric Van Hensbergen
    Cc: Ron Minnich
    Cc: Latchesar Ionkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • It always returns 0, so relying on it is useless. The only caller isn't
    checking return value. In general, un-, de-, -free functions should return
    void.

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

    Alexey Dobriyan
     
  • If register_filesystem() fails, vxfs_inode cache must be destroyed.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Two lines -- two bugs. :-(

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

    Alexey Dobriyan