09 Aug, 2006

5 commits


07 Aug, 2006

3 commits

  • Linus Torvalds
     
  • * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (24 commits)
    Input: ati_remote - use msec instead of jiffies
    Input: ati_remote - add missing input_sync()
    Input: ati_remote - relax permissions sysfs module parameters
    Input: ati_remote - make filter time a module parameter
    Input: atkbd - restore repeat rate when resuming
    Input: trackpoint - activate protocol when resuming
    Input: logips2pp - fix button mapping for MX300
    Input: keyboard - change to use kzalloc
    Input: serio/gameport - check whether driver core calls succeeded
    Input: spaceball - make 4000FLX Lefty work
    Input: keyboard - simplify emulate_raw() implementation
    Input: keyboard - remove static variable and clean up initialization
    Input: hiddev - use standard list implementation
    Input: add missing handler->start() call
    Input: HID - fix potential out-of-bound array access
    Input: fix list iteration in input_release_device()
    Input: iforce - add Trust Force Feedback Race Master support
    Input: iforce - check array bounds before accessing elements
    Input: libps2 - warn instead of oopsing when passed bad arguments
    Input: fm801-gp - fix use after free
    ...

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
    [ALSA] Don't reject O_RDWR at opening PCM OSS with read/write-only device
    [ALSA] snd-emu10k1: Implement support for Audigy 2 ZS [SB0353]
    [ALSA] add MAINTAINERS entry for snd-aoa
    [ALSA] aoa: platform function gpio: ignore errors from functions that don't exist
    [ALSA] make snd-powermac load even when it can't bind the device
    [ALSA] aoa: fix toonie codec
    [ALSA] aoa: feature gpio layer: fix IRQ access
    [ALSA] Conversions from kmalloc+memset to k(z|c)alloc
    [ALSA] snd-emu10k1: Fixes ALSA bug#2190

    Linus Torvalds
     

06 Aug, 2006

32 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [LAPB]: Fix windowsize check
    [TCP]: Fixes IW > 2 cases when TCP is application limited
    [PKT_SCHED] RED: Fix overflow in calculation of queue average
    [LLX]: SOCK_DGRAM interface fixes
    [PKT_SCHED]: Return ENOENT if qdisc module is unavailable
    [BRIDGE]: netlink status fix

    Linus Torvalds
     
  • While busy-waiting for completion, check the hardware after scheduling;
    don't schedule and then immediately check the _timeout_. If the yield()
    took a long time (as it does on my OLPC prototype board when it's busy),
    we'd report a timeout even though the hardware was now ready.

    This fixes it, and also switches the yield() for a cond_resched() because
    we don't actually want to be _that_ nice about it. I see nice
    tightly-packed SMBus transactions now, rather than waiting for milliseconds
    between successive phases.

    Actually, we shouldn't be busy-waiting here at all. We should be using
    interrupts. That's an exercise for another day though.

    Signed-off-by: David Woodhouse
    Cc: Christer Weinigel
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • I saw an oops down this path when trying to create a new file on a UDF
    filesystem which was internally marked as readonly, but mounted rw:

    udf_create
    udf_new_inode
    new_inode
    alloc_inode
    udf_alloc_inode
    udf_new_block
    returns EIO due to readonlyness
    iput (on error)
    udf_put_inode
    udf_discard_prealloc
    udf_next_aext
    udf_current_aext
    udf_get_fileshortad
    OOPS

    the udf_discard_prealloc() path was examining uninitialized fields of the
    udf inode.

    udf_discard_prealloc() already has this code to short-circuit the discard
    path if no extents are preallocated:

    if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ||
    inode->i_size == UDF_I_LENEXTENTS(inode))
    {
    return;
    }

    so if we initialize UDF_I_LENEXTENTS(inode) = 0 earlier in udf_new_inode,
    we won't try to free the (not) preallocated blocks, since this will match
    the i_size = 0 set when the inode was initialized.

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

    Eric Sandeen
     
  • The recent fixups in futex.c need to be applied to futex_compat.c too. Fixes
    a hang reported by Olaf.

    Signed-off-by: Thomas Gleixner
    Cc: Olaf Hering
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • A patch in -mm kernel correct the parsing of "address resources" of pnpacpi.
    Before we assumed it was memory only, but it could be also IO.

    But this change show an hidden bug : some resources could be producer type
    that are not handled by pnp layer. So we should ignore the producer
    resources.

    This patch fixes bug 6292 (http://bugzilla.kernel.org/show_bug.cgi?id=6292).
    Some devices like PNP0A03 have 0xd00-0xffff and 0x0-0xcf7 as IO producer
    resources.

    Before correcting "address resources" parsing, it was seen as memory and was
    harmless, because nobody tried to reserve this memory range as it should be
    IO.

    With the correction it become IO resources, and make failed all others device
    that want to register IO in this range and use pnp layer (like a ISA sound
    card).

    The solution is to ignore producer resources

    Signed-off-by: Matthieu CASTET
    Signed-off-by: Uwe Bugla
    Cc: Bjorn Helgaas
    Cc: Adam Belay
    Cc: "Brown, Len"
    Acked-by: Shaohua Li
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    matthieu castet
     
  • reiserfs_write_full_page does zero bytes in the file past eof, but it may
    call get_block on those buffers as well. On machines where the page size
    is larger than the blocksize, this can result in mmaped files incorrectly
    growing up to a block boundary during writepage.

    The fix is to avoid calling get_block for any blocks that are entirely past
    eof

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

    Chris Mason
     
  • The correct lock ordering is inode lock -> BKL

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

    Chris Mason
     
  • This patch is for collision check enhancement for memory hot add.

    It's better to do resouce collision check before doing memory hot add,
    which will touch memory management structures.

    And add_section() should check section exists or not before calling
    sparse_add_one_section(). (sparse_add_one_section() will do another
    check anyway. but checking in memory_hotplug.c will be easy to understand.)

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: keith mannthey
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • both of acpi_memory_enable_device() and acpi_memory_add_device() may evaluate
    _CRS method.

    We should avoid evaluate device's resource twice if we could get it
    successfully in past.

    Signed-off-by: KAMEZWA Hiroyuki
    Cc: Keith Mannthey
    Cc: Yasunori Goto
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • add_memory() does all necessary check to avoid collision. then, acpi layer
    doesn't have to check region by itself.

    (*) pfn_valid() just returns page struct is valid or not. It returns 0
    if a section has been already added even is ioresource is not added.
    ioresource collision check in mm/memory_hotplug.c can do more precise
    collistion check.
    added enabled bit check just for sanity check..

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Keith Mannthey
    Cc: Yasunori Goto
    Cc: Dave Hansen
    Cc: "Brown, Len"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • find_next_system_ram() is used to find available memory resource at onlining
    newly added memory. This patch fixes following problem.

    find_next_system_ram() cannot catch this case.

    Resource: (start)-------------(end)
    Section : (start)-------------(end)

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Keith Mannthey
    Cc: Yasunori Goto
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • find_next_system_ram() returns valid memory range which meets requested area,
    only used by memory-hot-add.

    This function always rewrite requested resource even if returned area is not
    fully fit in requested one. And sometimes the returnd resource is larger than
    requested area. This annoyes the caller. This patch changes the returned
    value to fit in requested area.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Keith Mannthey
    Cc: Yasunori Goto
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • ioresouce handling code in memory hotplug allows not-aligned memory hot add.
    But when memmap and other memory structures are initialized, parameters should
    be aligned. (if not aligned, initialization of mem_map will do wrong, it
    assumes parameters are aligned.) This patch fix it.

    And this patch allows ioresource collision check to handle -EEXIST.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Keith Mannthey
    Cc: Yasunori Goto
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • In bugzilla #6941, Jens Kilian reported:

    "The function befs_utf2nls (in fs/befs/linuxvfs.c) writes a 0 byte past the
    end of a block of memory allocated via kmalloc(), leading to memory
    corruption. This happens only for filenames which are pure ASCII and a
    multiple of 4 bytes in length. [...]

    Without DEBUG_SLAB, this leads to further corruption and hard lockups; I
    believe this is the bug which has made kernels later than 2.6.8 unusable
    for me. (This must be due to changes in memory management, the bug has
    been in the BeFS driver since the time it was introduced (AFAICT).)

    Steps to reproduce:
    Create a directory (in BeOS, naturally :-) with files named, e.g.,
    "1", "22", "333", "4444", ... Mount it in Linux and do an "ls" or "find""

    This patch implements the suggested fix. Credits to Jens Kilian for
    debugging the problem and finding the right fix.

    Signed-off-by: Diego Calleja
    Cc: Jens Kilian
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Diego Calleja
     
  • At least Maxtor OneTouch III require a "start stop unit" command after auto
    spin-down before the next access can proceed. This patch activates the
    responsible code in scsi_mod for all Maxtor SBP-2 disks.
    https://bugzilla.novell.com/show_bug.cgi?id=183011

    Maybe that should be done for all SBP-2 disks, but better be cautious.

    Signed-off-by: Stefan Richter
    Cc: Jody McIntyre
    Cc: Ben Collins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefan Richter
     
  • While helping someone to submit a patch to the stable branch, I noticed
    that the stable branch is not listed in the MAINTAINERS file. This was
    after I went there to look for the email addresses for the stable branch
    list (stable@kernel.org).

    This patch adds the stable branch to the maintainers file so that people
    can find where to send patches when they have a fix for the stable team.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Chris Wright
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     
  • Clean up proc file removal in sq module for superh arch. currently on a
    failed module load or on module unload a proc file is left registered which
    can cause a random memory execution or oopses if read after unload. This
    patch cleans up that deregistration.

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

    Neil Horman
     
  • * MODE_MASK is unused in eicon driver.
    * Conflicts with a ptrace stuff on arm.

    drivers/isdn/hardware/eicon/divasync.h:259:1: warning: "MODE_MASK" redefined
    include2/asm/ptrace.h:48:1: warning: this is the location of the previous definition

    Signed-off-by: Alexey Dobriyan
    Acked-by: Karsten Keil
    Acked-by: Armin Schindler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • A set of tty line discipline cleanup patches were introduced before the
    dawn of time, in kernel version 2.4.21. This patch performs that cleanup
    for the hvsi driver.

    The hvsi driver is used only on IBM pSeries PowerPC boxes. The driver was
    originally written by Hollis Blanchard, who has delegated maintainership to
    me. So this my first and maybe only patch in this official new role,
    because this driver is otherwise bug-free :-)

    Alan: "Actually its also a bug fix, tty->ldisc should be locked by refcounting
    and the helpers do this for you."

    Signed-off-by: Linas Vepstas
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linas Vepstas
     
  • Under certain rare circumstances, it appears that there can be be a
    NULL-pointer deref when a user fiddles with terminal emeulation programs while
    outpu is being sent to the console. This patch checks for and avoids a
    NULL-pointer deref.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Linas Vepstas
    Cc: Paul Fulghum
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linas Vepstas
     
  • Signed-off-by: Alexey Dobriyan
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Signed-off-by: Maxime Bizon
    Acked-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maxime Bizon
     
  • If we don't find the item we are lookng for, we allocate a new one, and
    then grab the lock again and search to see if it has been added while we
    did the alloc. If it had been added we need to 'cache_put' the newly
    created item that we are never going to use. But as it hasn't been
    initialised properly, putting it can cause an oops.

    So move the ->init call earlier to that it will always be fully initilised
    if we have to put it.

    Thanks to Philipp Matthias Hahn
    for reporting the problem.

    Signed-off-by: Neil Brown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Brown
     
  • Removes many, many "declared inside parameter list" warnings on parisc.

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

    Alexey Dobriyan
     
  • The POSIX_FADV_NOREUSE hint means "the application will use this range of the
    file a single time". It seems to be intended that the implementation will use
    this hint to perform drop-behind of that part of the file when the application
    gets around to reading or writing it.

    However for reasons which aren't obvious (or sane?) I mapped
    POSIX_FADV_NOREUSE onto POSIX_FADV_WILLNEED. ie: it does readahead.

    That's daft. So for now, make POSIX_FADV_NOREUSE a no-op.

    This is a non-back-compatible change. If someone was using POSIX_FADV_NOREUSE
    to perform readahead, they lose. The likelihood is low.

    If/when we later implement POSIX_FADV_NOREUSE things will get interesting - to
    do it fully we'll need to maintain file offset/length ranges and peform all
    sorts of complex tricks, and managing the lifetime of those ranges' data
    structures will be interesting..

    A sensible implementation would probably ignore the file range and would
    simply mark the entire file as needing some form of drop-behind treatment.

    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • - fix up the start up sequence.

    This new sequence allow you to correctly enable the LCD controller
    even if the bootloader has already did it.

    - fix up a wrong indentation issue.

    Signed-off-by: Rodolfo Giometti
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rodolfo Giometti
     
  • Fix "info->var.rotate" data settings.

    This info should be deduced directly from "fbdev->panel->control_base"
    defined into au1100fb.h.

    Signed-off-by: Rodolfo Giometti
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rodolfo Giometti
     
  • Reported by: Dave Jones

    Whilst printk'ing to both console and serial console, I got this...
    (2.6.18rc1)

    BUG: sleeping function called from invalid context at kernel/sched.c:4438
    in_atomic():0, irqs_disabled():1

    Call Trace:
    [] show_trace+0xaa/0x23d
    [] dump_stack+0x15/0x17
    [] __might_sleep+0xb2/0xb4
    [] __cond_resched+0x15/0x55
    [] cond_resched+0x3b/0x42
    [] console_conditional_schedule+0x12/0x14
    [] fbcon_redraw+0xf6/0x160
    [] fbcon_scroll+0x5d9/0xb52
    [] scrup+0x6b/0xd6
    [] lf+0x24/0x44
    [] vt_console_print+0x166/0x23d
    [] __call_console_drivers+0x65/0x76
    [] _call_console_drivers+0x5e/0x62
    [] release_console_sem+0x14b/0x232
    [] fb_flashcursor+0x279/0x2a6
    [] run_workqueue+0xa8/0xfb
    [] worker_thread+0xef/0x122
    [] kthread+0x100/0x136
    [] child_rip+0x8/0x12

    This can occur when release_console_sem() is called but the log
    buffer still has contents that need to be flushed. The console drivers
    are called while the console_may_schedule flag is still true. The
    might_sleep() is triggered when fbcon calls console_conditional_schedule().

    Fix by setting console_may_schedule to zero earlier, before the call to the
    console drivers.

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

    Antonino A. Daplas
     
  • The per cpu variables are used incorrectly in vmstat.h.

    Signed-off-by: Jan Blunck
    Cc: Christoph Lameter
    Acked-by: Steve Fox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • When delivering PTRACE_EVENT_VFORK_DONE, provide pid of the child process
    when tracer calls ptrace(PTRACE_GETEVENTMSG). This is already
    (accidentally) available when the tracer is tracing VFORK in addition to
    VFORK_DONE.

    Signed-off-by: Chuck Ebbert
    Cc: Daniel Jacobowitz
    Cc: Albert Cahalan
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • A recent patch that allowed linear arrays to be reconfigured on-line
    allowed in a bug which results in divide by zero - not all
    mddev->array_size were converted to conf->array_size.

    This patch finished the conversion and fixed the bug.

    The offending patch was commit 7c7546ccf6463edbeee8d9aac6de7be1cd80d08a.

    Thanks to Simon Kirby for the bug report.

    Cc: Simon Kirby
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Seems like the omap-rng driver in the main tree predates the switch from
    to ... now it builds OK.

    Signed-off-by: David Brownell
    Signed-off-by: Michael Buesch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell