20 May, 2009

13 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    cifs: fix pointer initialization and checks in cifs_follow_symlink (try #4)

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
    mfd: pcf50633: fix unsafe disable_irq()
    mfd: Keep a cache of WM8350 volatile values

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    ipv4: make default for INET_LRO consistent with help text
    net: fix skb_seq_read returning wrong offset/length for page frag data
    pkt_sched: gen_estimator: use 64 bit intermediate counters for bps
    be2net: add two new pci device ids to pci device table
    sch_teql: should not dereference skb after ndo_start_xmit()
    tcp: fix MSG_PEEK race check
    Doc: fixed descriptions on /proc/sys/net/core/* and /proc/sys/net/unix/*
    Neterion: *FIFO1_DMA_ERR set twice, should 2nd be *FIFO2_DMA_ERR?
    mv643xx_eth: fix PPC DMA breakage
    bonding: fix link down handling in 802.3ad mode
    bridge: fix initial packet flood if !STP
    bridge: relay bridge multicast pkgs if !STP
    NET: Meth: Fix unsafe mix of irq and non-irq spinlocks.
    mlx4_en: Fix not deleted napi structures
    ipconfig: handle case of delayed DHCP server
    netpoll: don't dereference NULL dev from np
    wimax/i2400m: fix device crash: fix optimization in _roq_queue_update_ws

    Linus Torvalds
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    TPM: get_event_name stack corruption

    Linus Torvalds
     
  • * 'core/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    futex: setup writeable mapping for futex ops which modify user space data

    Linus Torvalds
     
  • get_event_name uses sprintf to fill a buffer declared on the stack. It fills
    the buffer 2 bytes at a time. What the code doesn't take into account is that
    sprintf(buf, "%02x", data) actually writes 3 bytes. 2 bytes for the data and
    then it nul terminates the string. Since we declare buf to be 40 characters
    long and then we write 40 bytes of data into buf sprintf is going to write 41
    characters. The fix is to leave room in buf for the nul terminator.

    Signed-off-by: Eric Paris
    Signed-off-by: James Morris

    Eric Paris
     
  • The futex code installs a read only mapping via get_user_pages_fast()
    even if the futex op function has to modify user space data. The
    eventual fault was fixed up by futex_handle_fault() which walked the
    VMA with mmap_sem held.

    After the cleanup patches which removed the mmap_sem dependency of the
    futex code commit 4dc5b7a36a49eff97050894cf1b3a9a02523717 (futex:
    clean up fault logic) removed the private VMA walk logic from the
    futex code. This change results in a stale RO mapping which is not
    fixed up.

    Instead of reintroducing the previous fault logic we set up the
    mapping in get_user_pages_fast() read/write for all operations which
    modify user space data. Also handle private futexes in the same way
    and make the current unconditional access_ok(VERIFY_WRITE) depend on
    the futex op.

    Reported-by: Andreas Schwab
    Signed-off-by: Thomas Gleixner
    CC: stable@kernel.org

    Thomas Gleixner
     
  • Produce correct output for
    - tagged commit (v2.6.30-rc6)
    - past tagged commit (v2.6.30-rc5-299-g7c7327d)
    - no tag

    Signed-off-by: Linus Torvalds

    Nico Schottelius
     
  • Without this change Openmoko Freerunner (GTA02) bootstrap will deadlock.
    As pointed out in other patches this issue is in the wild since the merge
    of:

    : commit 3aa551c9b4c40018f0e261a178e3d25478dc04a9
    : Author: Thomas Gleixner
    : Date: Mon Mar 23 18:28:15 2009 +0100
    :
    : genirq: add threaded interrupt handler support
    :
    : Add support for threaded interrupt handlers

    Signed-off-by: Nelson Castillo
    Cc: Ingo Molnar
    Cc:
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Samuel Ortiz

    Nelson Castillo
     
  • Due to the way that the WM8350 audio driver handles CODEC_ENA many of
    the WM8350 audio registers are marked as volatile when they aren't
    actually so. Allow the audio driver to see a cache of these values for
    inspection during interrupt context.

    To do this we need to stop satisfying any bits from volatile registers
    from cache - there's no real benefit from doing so anyway, we did the
    read already.

    Signed-off-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Mark Brown
     
  • * 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
    microblaze: Fix kind-of-intr checking against number of interrupts
    microblaze: Update Microblaze defconfig

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
    regulator: da903x: add missing __devexit_p()

    Linus Torvalds
     
  • Martin Knoblauch reports that trying to build 2.6.30-rc6-git3 with
    RHEL4.3 userspace (gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)) causes an
    internal compiler error (ICE):

    drivers/char/random.c: In function `get_random_int':
    drivers/char/random.c:1672: error: unrecognizable insn:
    (insn 202 148 150 0 /scratch/build/linux-2.6.30-rc6-git3/arch/x86/include/asm/tsc.h:23 (set (reg:SI 0 ax [91])
    (subreg:SI (plus:DI (plus:DI (reg:DI 0 ax [88])
    (subreg:DI (reg:SI 6 bp) 0))
    (const_int -4 [0xfffffffffffffffc])) 0)) -1 (nil)
    (nil))
    drivers/char/random.c:1672: internal compiler error: in extract_insn, at recog.c:2083

    and after some debugging it turns out that it's due to the code trying
    to figure out the rough value of the current stack pointer by taking an
    address of an uninitialized variable and casting that to an integer.

    This is clearly a compiler bug, but it's not worth fighting - while the
    current stack kernel pointer might be somewhat hard to predict in user
    space, it's also not generally going to change for a lot of the call
    chains for a particular process.

    So just drop it, and mumble some incoherent curses at the compiler.

    Tested-by: Martin Knoblauch
    Cc: Matt Mackall
    Cc: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

19 May, 2009

12 commits

  • This is the third respin of the patch posted yesterday to fix the error
    handling in cifs_follow_symlink. It also includes a fix for a bogus NULL
    pointer check in CIFSSMBQueryUnixSymLink that Jeff Moyer spotted.

    It's possible for CIFSSMBQueryUnixSymLink to return without setting
    target_path to a valid pointer. If that happens then the current value
    to which we're initializing this pointer could cause an oops when it's
    kfree'd.

    This patch is a little more comprehensive than the last patches. It
    reorganizes cifs_follow_link a bit for (hopefully) better readability.
    It should also eliminate the uneeded allocation of full_path on servers
    without unix extensions (assuming they can get to this point anyway, of
    which I'm not convinced).

    On a side note, I'm not sure I agree with the logic of enabling this
    query even when unix extensions are disabled on the client. It seems
    like that should disable this as well. But, changing that is outside the
    scope of this fix, so I've left it alone for now.

    Reported-by: Jeff Moyer
    Signed-off-by: Jeff Layton
    Reviewed-by: Jeff Moyer
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Steve French

    Jeff Layton
     
  • Commit e81963b1 ("ipv4: Make INET_LRO a bool instead of tristate.")
    changed this config from tristate to bool. Add default so that it is
    consistent with the help text.

    Signed-off-by: Frans Pop
    Signed-off-by: David S. Miller

    Frans Pop
     
  • When called with a consumed value that is less than skb_headlen(skb)
    bytes into a page frag, skb_seq_read() incorrectly returns an
    offset/length relative to skb->data. Ensure that data which should come
    from a page frag does.

    Signed-off-by: Thomas Chenault
    Tested-by: Shyam Iyer
    Signed-off-by: David S. Miller

    Thomas Chenault
     
  • The problem is that permission checking is skipped if atomic open is
    possible, but when exec opens a file, it just opens it O_READONLY which
    means EXEC permission will not be checked at that time.

    This problem is observed by the following sequence (executed as root):

    mount -t nfs4 server:/ /mnt4
    echo "ls" >/mnt4/foo
    chmod 744 /mnt4/foo
    su guest -c "mnt4/foo"

    Signed-off-by: Frank Filz
    Signed-off-by: Trond Myklebust
    Cc: stable@kernel.org
    Tested-by: Eugene Teo
    Signed-off-by: Linus Torvalds

    Frank Filz
     
  • gen_estimator can overflow bps (bytes per second) with Gb links, while
    it was designed with a u32 API, with a theorical limit of 34360Mbit
    (2^32 bytes)

    Using 64 bit intermediate avbps/brate counters can allow us to reach
    this theorical limit.

    Signed-off-by: Eric Dumazet
    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • It is illegal to dereference a skb after a successful ndo_start_xmit()
    call. We must store skb length in a local variable instead.

    Bug was introduced in 2.6.27 by commit 0abf77e55a2459aa9905be4b226e4729d5b4f0cb
    (net_sched: Add accessor function for packet length for qdiscs)

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Commit 518a09ef11 (tcp: Fix recvmsg MSG_PEEK influence of
    blocking behavior) lets the loop run longer than the race check
    did previously expect, so we need to be more careful with this
    check and consider the work we have been doing.

    I tried my best to deal with urg hole madness too which happens
    here:
    if (!sock_flag(sk, SOCK_URGINLINE)) {
    ++*seq;
    ...
    by using additional offset by one but I certainly have very
    little interest in testing that part.

    Signed-off-by: Ilpo Järvinen
    Tested-by: Frans Pop
    Tested-by: Ian Zimmermann
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc: Explicit alignment for .data.cacheline_aligned
    powerpc/ps3: Update ps3_defconfig
    powerpc/ftrace: Fix constraint to be early clobber
    powerpc/ftrace: Use pr_devel() in ftrace.c
    powerpc: Do not assert pte_locked for hugepage PTE entries

    Linus Torvalds
     
  • …it.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix fallback sched_clock()'s offset when using jiffies

    * 'core-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    lockdep: increase MAX_LOCKDEP_ENTRIES and MAX_LOCKDEP_CHAINS

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Fix performance regression caused by paravirt_ops on native kernels
    xen: use header for EXPORT_SYMBOL_GPL
    x86, 32-bit: fix kernel_trap_sp()
    x86: fix percpu_{to,from}_op()
    x86: mtrr: Fix high_width computation when phys-addr is >= 44bit
    x86: Fix false positive section mismatch warnings in the apic code

    Linus Torvalds
     
  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    tracing: Append prompt in /debug/tracing/README file
    x86/function-graph: fix constraint for recording old return value

    Linus Torvalds
     

18 May, 2009

15 commits

  • Commit c45d6320 ("fix reference counting of ftdi_private") stopped
    ftdi_sio_port_remove() from directly freeing the port-private data, with
    the intention if the port was still open, it would be freed when
    ftdi_close() is eventually called and releases the last refcount on the
    structure.

    That's all very well, but ftdi_sio_port_remove() still contains a call
    to usb_set_serial_port_data(port, NULL) -- so by the time we get to
    ftdi_close() for the port which was unplugged, it _still_ oopses on
    dereferencing that NULL pointer, as it did before (and does in 2.6.29).

    The fix is just not to clear the private data in ftdi_sio_port_remove().
    Then the refcount is properly reduced to zero when the final kref_put()
    happens in ftdi_close().

    Remove a bogus comment too, while we're at it. And stop doing things
    inside "if (priv)" -- it must _always_ be there.

    Based loosely on an earlier patch by Daniel Mack, and suggestions by
    Alan Stern.

    Signed-off-by: David Woodhouse
    Tested-by: Daniel Mack
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • Commit 5b7f3a50 (fix dataflash 64-bit divisions) unfortunately
    introduced a typo. Erase addr and len were swapped in the pageaddr
    calculation, causing the wrong sectors to get erased.

    Signed-off-by: Peter Korsgaard
    Acked-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse
    Signed-off-by: Linus Torvalds

    Peter Korsgaard
     
  • `local_add_unless(x, y, z)' will be expanded to `(&(x)->y, (y), (x))', but
    `&(x)->y' should be `&(x)->a'

    Signed-off-by: Roel Kluin
    Cc: Mathieu Desnoyers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • + Fix typographic fault.

    Signed-off-by: Michal Simek

    Michal Simek
     
  • Signed-off-by: Michal Simek

    Michal Simek
     
  • The remove function uses __devexit, so the .remove assignment needs
    __devexit_p() to fix a build error with hotplug disabled.

    Signed-off-by: Mike Frysinger
    CC: Liam Girdwood
    CC: Mike Rapoport
    CC: Eric Miao
    Acked-by: Eric Miao
    Signed-off-by: Liam Girdwood

    Mike Frysinger
     
  • I don't think anything guarantees that the objects in data.page_aligned
    are a multiple of PAGE_SIZE, thus the section may end on any boundary.

    So the following section, .data.cacheline_aligned needs an explicit
    alignment.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Refresh and set these options:

    CONFIG_SYSFS_DEPRECATED_V2: y -> n
    CONFIG_INPUT_JOYSTICK: y -> n
    CONFIG_HID_SONY: n -> m
    CONFIG_RTC_DRV_PS3: - -> m

    Signed-off-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Geoff Levand
     
  • After upgrading my distcc boxes from gcc 4.2.2 to 4.4.0, the function
    graph tracer broke. This was discovered on my x86 boxes.

    The issue is that gcc used the same register for an output as it did for
    an input in an asm statement. I first thought this was a bug in gcc and
    reported it. I was notified that gcc was correct and that the output had
    to be flagged as an "early clobber".

    I noticed that powerpc had the same issue and this patch fixes it.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Benjamin Herrenschmidt

    Steven Rostedt
     
  • pr_debug() can now result in code being generated even when #DEBUG
    is not defined. That's not really desirable in the ftrace code
    which we want to be snappy.

    With CONFIG_DYNAMIC_DEBUG=y:

    size before:
    text data bss dec hex filename
    3334 672 4 4010 faa arch/powerpc/kernel/ftrace.o

    size after:
    text data bss dec hex filename
    2616 360 4 2980 ba4 arch/powerpc/kernel/ftrace.o

    Signed-off-by: Michael Ellerman
    Acked-by: Steven Rostedt
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     
  • With CONFIG_DEBUG_VM, an assertion is made when changing the protection
    flags of a PTE that the PTE is locked. Huge pages use a different pagetable
    format and the assertion is bogus and will always trigger with a bug looking
    something like

    Unable to handle kernel paging request for data at address 0xf1a00235800006f8
    Faulting instruction address: 0xc000000000034a80
    Oops: Kernel access of bad area, sig: 11 [#1]
    SMP NR_CPUS=32 NUMA Maple
    Modules linked in: dm_snapshot dm_mirror dm_region_hash
    dm_log dm_mod loop evdev ext3 jbd mbcache sg sd_mod ide_pci_generic
    pata_amd ata_generic ipr libata tg3 libphy scsi_mod windfarm_pid
    windfarm_smu_sat windfarm_max6690_sensor windfarm_lm75_sensor
    windfarm_cpufreq_clamp windfarm_core i2c_powermac
    NIP: c000000000034a80 LR: c000000000034b18 CTR: 0000000000000003
    REGS: c000000003037600 TRAP: 0300 Not tainted (2.6.30-rc3-autokern1)
    MSR: 9000000000009032 CR: 28002484 XER: 200fffff
    DAR: f1a00235800006f8, DSISR: 0000000040010000
    TASK = c0000002e54cc740[2960] 'map_high_trunca' THREAD: c000000003034000 CPU: 2
    GPR00: 4000000000000000 c000000003037880 c000000000895d30 c0000002e5a2e500
    GPR04: 00000000a0000000 c0000002edc40880 0000005700000393 0000000000000001
    GPR08: f000000011ac0000 01a00235800006e8 00000000000000f5 f1a00235800006e8
    GPR12: 0000000028000484 c0000000008dd780 0000000000001000 0000000000000000
    GPR16: fffffffffffff000 0000000000000000 00000000a0000000 c000000003037a20
    GPR20: c0000002e5f4ece8 0000000000001000 c0000002edc40880 0000000000000000
    GPR24: c0000002e5f4ece8 0000000000000000 00000000a0000000 c0000002e5f4ece8
    GPR28: 0000005700000393 c0000002e5a2e500 00000000a0000000 c000000003037880
    NIP [c000000000034a80] .assert_pte_locked+0xa4/0xd0
    LR [c000000000034b18] .ptep_set_access_flags+0x6c/0xb4
    Call Trace:
    [c000000003037880] [c000000003037990] 0xc000000003037990 (unreliable)
    [c000000003037910] [c000000000034b18] .ptep_set_access_flags+0x6c/0xb4
    [c0000000030379b0] [c00000000014bef8] .hugetlb_cow+0x124/0x674
    [c000000003037b00] [c00000000014c930] .hugetlb_fault+0x4e8/0x6f8
    [c000000003037c00] [c00000000013443c] .handle_mm_fault+0xac/0x828
    [c000000003037cf0] [c0000000000340a8] .do_page_fault+0x39c/0x584
    [c000000003037e30] [c0000000000057b0] handle_page_fault+0x20/0x5c
    Instruction dump:
    7d29582a 7d200074 7800d182 0b000000 3c004000 3960ffff 780007c6 796b00c4
    7d290214 7929a302 1d290068 7d6b4a14 7c000074 7800d182 0b000000

    This patch fixes the problem by not asseting the PTE is locked for VMAs
    backed by huge pages.

    Signed-off-by: Mel Gorman
    Signed-off-by: Benjamin Herrenschmidt

    Mel Gorman
     
  • Signed-off-by: Wang Tinggong
    Signed-off-by: David S. Miller

    Wang Tinggong
     
  • FIFO1_DMA_ERR is set twice, the second should be FIFO2_DMA_ERR.

    Signed-off-by: Roel Kluin
    Acked-by: Ram Vepa
    Signed-off-by: David S. Miller

    roel kluin
     
  • After 2.6.29, PPC no more admits passing NULL to the dev parameter of
    the DMA API. The result is a BUG followed by solid lock-up when the
    mv643xx_eth driver brings an interface up. The following patch makes
    the driver work on my Pegasos again; it is mostly a search and replace
    of NULL by mp->dev->dev.parent in dma allocation/freeing/mapping/unmapping
    functions.

    Signed-off-by: Gabriel Paubert
    Acked-by: Lennert Buytenhek
    Signed-off-by: David S. Miller

    Gabriel Paubert
     
  • One of the purposes of bonding is to allow for redundant links, and failover
    correctly if the cable is pulled. If all the members of a bonded device have
    no carrier present, the bonded device itself needs to report no carrier present
    to user space so management tools (like routing daemons) can respond.

    Bonding in 802.3ad mode does not work correctly for this because it incorrectly
    chooses a link that is down as a possible aggregator.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Stephen Hemminger