15 Sep, 2011

23 commits

  • Fix regression introduced by commit 5ada28bf7675 ("led-class: always
    implement blinking") which broke sysfs delay handling by not storing the
    updated value. Consequently it was only possible to set one of the delays
    through the sysfs interface as the other delay was automatically restored
    to it's default value. Reading the parameters always gave the defaults.

    Signed-off-by: Johan Hovold
    Acked-by: Florian Fainelli
    Acked-by: Richard Purdie
    Cc: [2.6.37+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • In drivers/misc/pti.c::pti_control_frame_built_and_sent() we assign 'comm'
    to 'thread_name_p' if (!thread_name). The problem is that 'comm' then
    goes out of scope and later we use 'thread_name_p' which now refers to an
    out-of-scope variable. To fix that, simply move 'comm' up to have
    function scope.

    Signed-off-by: Jesper Juhl
    Cc: Greg Kroah-Hartman
    Cc: J Freyensee
    Cc: Jeremy Rocher
    Cc: Sergei Trofimovich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Fix these errors:

    drivers/tty/serial/crisv10.c:4453: error: 'if_ser0' undeclared (first use in this function): 2 errors in 2 logs
    drivers/tty/serial/crisv10.c:4453: error: (Each undeclared identifier is reported only once: 2 errors in 2 logs
    drivers/tty/serial/crisv10.c:4453: error: for each function it appears in.): 2 errors in 2 logs

    "if_ser0" is a typo, it should be "if_serial_0".

    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Xen backend drivers (e.g., blkback and netback) would sometimes fail to
    map grant pages into the vmalloc address space allocated with
    alloc_vm_area(). The GNTTABOP_map_grant_ref would fail because Xen could
    not find the page (in the L2 table) containing the PTEs it needed to
    update.

    (XEN) mm.c:3846:d0 Could not find L1 PTE for address fbb42000

    netback and blkback were making the hypercall from a kernel thread where
    task->active_mm != &init_mm and alloc_vm_area() was only updating the page
    tables for init_mm. The usual method of deferring the update to the page
    tables of other processes (i.e., after taking a fault) doesn't work as a
    fault cannot occur during the hypercall.

    This would work on some systems depending on what else was using vmalloc.

    Fix this by reverting ef691947d8a3 ("vmalloc: remove vmalloc_sync_all()
    from alloc_vm_area()") and add a comment to explain why it's needed.

    Signed-off-by: David Vrabel
    Cc: Jeremy Fitzhardinge
    Cc: Konrad Rzeszutek Wilk
    Cc: Ian Campbell
    Cc: Keir Fraser
    Cc: [3.0.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Vrabel
     
  • Revert the post-3.0 commit 82f9d486e59f5 ("memcg: add
    memory.vmscan_stat").

    The implementation of per-memcg reclaim statistics violates how memcg
    hierarchies usually behave: hierarchically.

    The reclaim statistics are accounted to child memcgs and the parent
    hitting the limit, but not to hierarchy levels in between. Usually,
    hierarchical statistics are perfectly recursive, with each level
    representing the sum of itself and all its children.

    Since this exports statistics to userspace, this may lead to confusion
    and problems with changing things after the release, so revert it now,
    we can try again later.

    Signed-off-by: Johannes Weiner
    Acked-by: KAMEZAWA Hiroyuki
    Cc: Daisuke Nishimura
    Cc: Michal Hocko
    Cc: Ying Han
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Without swap, anonymous pages are not scanned. As such, they should not
    count when considering force-scanning a small target if there is no swap.

    Otherwise, targets are not force-scanned even when their effective scan
    number is zero and the other conditions--kswapd/memcg--apply.

    This fixes 246e87a93934 ("memcg: fix get_scan_count() for small
    targets").

    [akpm@linux-foundation.org: fix comment]
    Signed-off-by: Johannes Weiner
    Acked-by: KAMEZAWA Hiroyuki
    Reviewed-by: Michal Hocko
    Cc: Ying Han
    Cc: Balbir Singh
    Cc: KOSAKI Motohiro
    Cc: Daisuke Nishimura
    Acked-by: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Include linux/sched.h to fix below build error.

    CC drivers/rtc/rtc-imxdi.o
    drivers/rtc/rtc-imxdi.c: In function 'di_write_wait':
    drivers/rtc/rtc-imxdi.c:168: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
    drivers/rtc/rtc-imxdi.c:168: error: (Each undeclared identifier is reported only once
    drivers/rtc/rtc-imxdi.c:168: error: for each function it appears in.)
    drivers/rtc/rtc-imxdi.c:168: error: implicit declaration of function 'signal_pending'
    drivers/rtc/rtc-imxdi.c:168: error: implicit declaration of function 'schedule_timeout'
    drivers/rtc/rtc-imxdi.c: In function 'dryice_norm_irq':
    drivers/rtc/rtc-imxdi.c:329: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)

    Signed-off-by: Axel Lin
    Cc: Baruch Siach
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Since GPIOLIB is optional on alpha, GENERIC_GPIO must not be selected by
    default. If GPIOLIB is enabled, it will select GENERIC_GPIO.

    See for an example of what 'def_bool y'
    breaks.

    Reported-by: Michael Cree
    Signed-off-by: Ben Hutchings
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Michael Cree
    Cc: Mark Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     
  • richard@nod.at:
    Fixes:
    /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libc.a(strrchr.o): In function `rindex':
    (.text+0x0): multiple definition of `strrchr'

    If both STATIC_LINK and UML_NET_VDE are set to "y" libc's strrchr may
    clash with the kernel implementation.

    This workaround comes originally from Jeff Dike:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494995#35

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • 1) take subarch-specific stuff to subarch_ptrace()
    2) PTRACE_{PEEK,POKE}{TEXT,DATA} is handled by ptrace_request() just fine...

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • It's 32bit-only, not 64bit-only... And while we are at it, it's
    set_fpxregs(), not set_fpregs()...

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • while not doing free_irq() from irq handler is commendable, kfree() on the
    data passed to said handler before free_irq() is Not Good(tm). Freeing
    the stack it's being run on is also not nice... Solution: delay actually
    freeing stuff.

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • ... so set winch->fd to -1 before doing free_irq(), to avoid having
    winch_interrupt() come from/during the latter and attempt to do
    reactivate_fd() on something that's already gone.

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • tty->count is decremented only after ->close() had been called and
    several tasks can hit it in parallel. As the result, using tty->count
    to check if you are the last one is broken. We end up leaving line->tty
    not reset to NULL and the next IRQ on that sucker will blow up trying to
    dereference pointers from kfree'd struct tty.

    Fix is obvious: we need to use a counter of our own.

    Signed-off-by: Al Viro
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Some time ago Jeff prepared 42daba316557 ("uml: stop saving process FP
    state") for UML to stop saving the process FP state between task
    switches. The assumption was that since with SKAS0 every guest process
    runs inside a host process context the host OS will take care of keeping
    the proper FP state.

    Unfortunately this is not true for multi-threaded applications, where
    all guest threads share a single host process context yet all may use
    the FPU on their own. Although I haven't verified it I suspect things
    to be even worse in SKAS3 mode where all guest processes run inside a
    single host process.

    The patch reintroduces the saving and restoring of the FP context
    between task switches.

    [richard@nod.at: Ingo posted this patch in 2009, sadly it was never applied
    and got lost. Now in 2011 the problem was reported by Gunnar.]

    Signed-off-by: Ingo van Lil
    Signed-off-by: Richard Weinberger
    Reported-by:
    Tested-by:
    Cc: Stanislav Meduna
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo van Lil
     
  • I could use out_close1, but that seems to be the code path to close the fd
    returned by os_create_unix_socket, and using it to close the fd returned
    by mkstemp might lead to some confusion, so I don't do it.

    Signed-off-by: Jonathan Neuschäfer
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Neuschäfer
     
  • Commit b789ef518b2 ("slub: Add cmpxchg_double_slab()") tests for
    cmpxchg_double support in the SLUB code and it breaks UML builds with
    SLUB. Since UML does not support checking for CPU features, disable
    CMPXCHG_DOUBLE just like CMPXCHG_LOCAL is disabled for UML.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Reviewed-by: Christoph Lameter
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thadeu Lima de Souza Cascardo
     
  • The vmstat_text array is only defined for CONFIG_SYSFS or CONFIG_PROC_FS,
    yet it is referenced for per-node vmstat with CONFIG_NUMA:

    drivers/built-in.o: In function `node_read_vmstat':
    node.c:(.text+0x1106df): undefined reference to `vmstat_text'

    Introduced in commit fa25c503dfa2 ("mm: per-node vmstat: show proper
    vmstats").

    Define the array for CONFIG_NUMA as well.

    [akpm@linux-foundation.org: remove unneeded ifdefs]
    Signed-off-by: David Rientjes
    Reported-by: Cong Wang
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • When compiling mm/mempolicy.c with struct user copy checks the following
    warning is shown:

    In file included from arch/x86/include/asm/uaccess.h:572,
    from include/linux/uaccess.h:5,
    from include/linux/highmem.h:7,
    from include/linux/pagemap.h:10,
    from include/linux/mempolicy.h:70,
    from mm/mempolicy.c:68:
    In function `copy_from_user',
    inlined from `compat_sys_get_mempolicy' at mm/mempolicy.c:1415:
    arch/x86/include/asm/uaccess_64.h:64: warning: call to `copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
    LD mm/built-in.o

    Fix this by passing correct buffer size value.

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

    KAMEZAWA Hiroyuki
     
  • commit 9d8cebd4bcd7 ("mm: fix mbind vma merge problem") didn't really
    fix the mbind vma merge problem due to wrong pgoff value passing to
    vma_merge(), which made vma_merge() always return NULL.

    Before the patch applied, we are getting a result like:

    addr = 0x7fa58f00c000
    [snip]
    7fa58f00c000-7fa58f00d000 rw-p 00000000 00:00 0
    7fa58f00d000-7fa58f00e000 rw-p 00000000 00:00 0
    7fa58f00e000-7fa58f00f000 rw-p 00000000 00:00 0

    here 7fa58f00c000->7fa58f00f000 we get 3 VMAs which are expected to be
    merged described as described in commit 9d8cebd.

    Re-testing the patched kernel with the reproducer provided in commit
    9d8cebd, we get the correct result:

    addr = 0x7ffa5aaa2000
    [snip]
    7ffa5aaa2000-7ffa5aaa6000 rw-p 00000000 00:00 0
    7fffd556f000-7fffd5584000 rw-p 00000000 00:00 0 [stack]

    Signed-off-by: Caspar Zhang
    Cc: KOSAKI Motohiro
    Cc: Christoph Lameter
    Cc: Hugh Dickins
    Cc: Mel Gorman
    Cc: Lee Schermerhorn
    Cc: Minchan Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Caspar Zhang
     
  • * git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6: (25 commits)
    [SCSI] bnx2i: Fixed the endian on TTT for NOP out transmission
    [SCSI] libfc: fix referencing to fc_fcp_pkt from the frame pointer via fr_fsp()
    [SCSI] libfc: block SCSI eh thread for blocked rports
    [SCSI] libfc: fix fc_eh_host_reset
    [SCSI] fcoe: Fix deadlock between fip's recv_work and rtnl
    [SCSI] qla2xxx: Update version number to 8.03.07.07-k.
    [SCSI] qla2xxx: Set the task attributes after memsetting fcp cmnd.
    [SCSI] qla2xxx: Correct inadvertent loop state transitions during port-update handling.
    [SCSI] qla2xxx: Save and restore irq in the response queue interrupt handler.
    [SCSI] qla2xxx: Double check for command completion if abort mailbox command fails.
    [SCSI] qla2xxx: Acquire hardware lock while manipulating dsd list.
    [SCSI] qla2xxx: Fix qla24xx revision check while enabling interrupts.
    [SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.
    [SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors.
    [SCSI] hpsa: fix physical device lun and target numbering problem
    [SCSI] hpsa: fix problem that OBDR devices are not detected
    [SCSI] isci: add version number
    [SCSI] isci: fix event-get pointer increment
    [SCSI] isci: dynamic interrupt coalescing
    [SCSI] isci: Leave requests alone if already terminating.
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    xfs: fix a use after free in xfs_end_io_direct_write

    Linus Torvalds
     
  • We used to get the victim pinned by dentry_unhash() prior to commit
    64252c75a219 ("vfs: remove dget() from dentry_unhash()") and ->rmdir()
    and ->rename() instances relied on that; most of them don't care, but
    ones that used d_delete() themselves do. As the result, we are getting
    rmdir() oopses on NFS now.

    Just grab the reference before locking the victim and drop it explicitly
    after unlocking, same as vfs_rename_other() does.

    Signed-off-by: Al Viro
    Tested-by: Simon Kirby
    Cc: stable@kernel.org (3.0.x)
    Signed-off-by: Linus Torvalds

    Al Viro
     

14 Sep, 2011

3 commits

  • There is a window in which the ioend that we call inode_dio_wake on
    in xfs_end_io_direct_write is already free. Fix this by storing
    the inode pointer in a local variable.

    This is a fix for the regression introduced in 3.1-rc by
    "fs: move inode_dio_done to the end_io handler".

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Alex Elder

    Christoph Hellwig
     
  • Include to pickup the declarations for sha_transform
    and sha_init to quite the sparse noise:

    warning: symbol 'sha_transform' was not declared. Should it be static?
    warning: symbol 'sha_init' was not declared. Should it be static?

    Signed-off-by: H Hartley Sweeten
    Acked-by: Mandeep Singh Baines
    Signed-off-by: Linus Torvalds

    H Hartley Sweeten
     
  • In pcie_find_smpss(), we have the following statement:

    if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) ||
    dev->bus->self->pcie_type != PCI_EXP_TYPE_ROOT_PORT))

    The problem is that at least on my machine, this gets called for the
    root complex (virtual P2P bridge), and dev->bus->self is NULL since
    the parent bus for this is not itself anchor to a PCI device.

    This adds the necessary NULL check.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Jon Mason
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

13 Sep, 2011

11 commits

  • * 'acpi' of git://github.com/lenb/linux:
    acpica: ACPI_MAX_SLEEP should be 2 sec, not 20
    ACPI APEI: Add Kconfig option IRQ_WORK for GHES
    PNP: update pnp.debug usage (needs value on command line)
    APEI: Fix WHEA _OSC call

    Linus Torvalds
     
  • * 'upstream/bugfix' of git://github.com/jsgf/linux-xen:
    xen: use non-tracing preempt in xen_clocksource_read()

    Linus Torvalds
     
  • Len Brown
     
  • Linus Torvalds
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm: Remove duplicate "return" statement
    drm/nv04/crtc: Bail out if FB is not bound to crtc
    drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
    drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
    drm/nouveau: fix oops on pre-semaphore hardware
    drm/nv50/crtc: Bail out if FB is not bound to crtc
    drm/radeon/kms: fix DP detect and EDID fetch for DP bridges

    Linus Torvalds
     
  • * 'fixes' of git://git.linaro.org/people/arnd/arm-soc:
    ARM: CSR: add missing sentinels to of_device_id tables
    ARM: cns3xxx: Fix newly introduced warnings in the PCIe code
    ARM: cns3xxx: Fix compile error caused by hardware.h removed
    ARM: davinci: fix cache flush build error
    ARM: davinci: correct MDSTAT_STATE_MASK
    ARM: davinci: da850 EVM: read mac address from SPI flash
    OMAP: omap_device: fix !CONFIG_SUSPEND case in _noirq handlers
    OMAP2430: hwmod: musb: add missing terminator to omap2430_usbhsotg_addrs[]
    OMAP3: clock: indicate that gpt12_fck and wdt1_fck are in the WKUP clockdomain
    OMAP4: clock: fix compile warning
    OMAP4: clock: re-enable previous clockdomain enable/disable sequence
    OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup
    OMAP: powerdomains: Make all powerdomain target states as ON at init

    Linus Torvalds
     
  • The LTTng 2.0 kernel tracer (stand-alone module package, available at
    http://lttng.org) uses the 0xF6 ioctl range for tracer control and
    transport operations.

    Signed-off-by: Mathieu Desnoyers
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • * 'for-linus' of git://github.com/chrismason/linux:
    Btrfs: add dummy extent if dst offset excceeds file end in
    Btrfs: calc file extent num_bytes correctly in file clone
    btrfs: xattr: fix attribute removal
    Btrfs: fix wrong nbytes information of the inode
    Btrfs: fix the file extent gap when doing direct IO
    Btrfs: fix unclosed transaction handle in btrfs_cont_expand
    Btrfs: fix misuse of trans block rsv
    Btrfs: reset to appropriate block rsv after orphan operations
    Btrfs: skip locking if searching the commit root in csum lookup
    btrfs: fix warning in iput for bad-inode
    Btrfs: fix an oops when deleting snapshots

    Linus Torvalds
     
  • kmemleak is reporting that 32 bytes are being leaked by FUSE:

    unreferenced object 0xe373b270 (size 32):
    comm "fusermount", pid 1207, jiffies 4294707026 (age 2675.187s)
    hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] kmemleak_alloc+0x27/0x50
    [] kmem_cache_alloc+0xc5/0x180
    [] fuse_alloc_forget+0x1e/0x20
    [] fuse_alloc_inode+0xb0/0xd0
    [] alloc_inode+0x1c/0x80
    [] iget5_locked+0x8f/0x1a0
    [] fuse_iget+0x72/0x1a0
    [] fuse_get_root_inode+0x8a/0x90
    [] fuse_fill_super+0x3ef/0x590
    [] mount_nodev+0x3f/0x90
    [] fuse_mount+0x15/0x20
    [] mount_fs+0x1c/0xc0
    [] vfs_kern_mount+0x41/0x90
    [] do_kern_mount+0x39/0xd0
    [] do_mount+0x2e5/0x660
    [] sys_mount+0x66/0xa0

    This leak report is consistent and happens once per boot on
    3.1.0-rc5-dirty.

    This happens if a FORGET request is queued after the fuse device was
    released.

    Reported-by: Sitsofe Wheeler
    Signed-off-by: Miklos Szeredi
    Tested-by: Sitsofe Wheeler
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Commit 37fb3a30b4 ("fuse: fix flock") added in 3.1-rc4 caused flock() to
    fail with ENOSYS with the kernel ABI version 7.16 or earlier.

    Fix by falling back to testing FUSE_POSIX_LOCKS for ABI versions 7.16
    and earlier.

    Reported-by: Martin Ziegler
    Signed-off-by: Miklos Szeredi
    Tested-by: Martin Ziegler
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Arnd Bergmann
     

12 Sep, 2011

3 commits