23 Oct, 2010

5 commits

  • IRQ and resource[] may not have correct values until
    after PCI hotplug setup occurs at pci_enable_device() time.

    The semantic match that finds this problem is as follows:

    //
    @@
    identifier x;
    identifier request ~= "pci_request.*|pci_resource.*";
    @@

    (
    * x->irq
    |
    * x->resource
    |
    * request(x, ...)
    )
    ...
    *pci_enable_device(x)
    //

    Signed-off-by: Kulikov Vasiliy
    Acked-by: Michael S. Tsirkin
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Kulikov Vasiliy
     
  • In theory (although not *yet* in practice), a driver being passed
    to platform_driver_probe might have driver.bus set to something
    other than platform_bus_type. Locking drv->driver.bus is always
    correct.

    Signed-off-by: Patrick Pannuto
    Signed-off-by: Greg Kroah-Hartman

    Patrick Pannuto
     
  • Having the ddebug_query= boot parameter it makes sense to set up
    dynamic debug as soon as possible.

    I expect sysfs files cannot be set up via an arch_initcall, because
    this one is even before fs_initcall. Therefore I splitted the
    dynamic_debug_init function into an early one and a later one providing
    /sys/../dynamic_debug/control file.

    Possibly dynamic_debug can be initialized even earlier, not sure whether
    this still makes sense then. I picked up arch_initcall as it covers
    quite a lot already.

    Dynamic debug needs to allocate memory, therefore it's not easily possible to
    set it up even before the command line gets parsed.
    Therefore the boot param query string is stored in a temp string which is
    applied when dynamic debug gets set up.

    This has been tested with ddebug_query="file ec.c +p"
    and I could retrieve pr_debug() messages early at boot during ACPI setup:
    ACPI: EC: Look up EC in DSDT
    ACPI: EC: ---> status = 0x08
    ACPI: EC: transaction start
    ACPI: EC: interrupt
    ACPI: EC: ---> status = 0x08
    ACPI: EC: status = 0x00
    ACPI: EC: transaction start
    ACPI: EC:
    Acked-by: jbaron@redhat.com
    Acked-by: Pekka Enberg
    CC: linux-acpi@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Thomas Renninger
     
  • Dynamic debug lacks the ability to enable debug messages at boot time.
    One could patch initramfs or service startup scripts to write to
    /sys/../dynamic_debug/control, but this sucks.

    This patch makes it possible to pass a query in the same format one can
    write to /sys/../dynamic_debug/control via boot param.
    When dynamic debug gets initialized, this query will automatically be
    applied.

    Signed-off-by: Thomas Renninger
    Acked-by: jbaron@redhat.com
    Acked-by: Pekka Enberg
    Signed-off-by: Greg Kroah-Hartman

    Thomas Renninger
     
  • The parsing and applying of dynamic debug strings is not only useful for
    /sys/../dynamic_debug/control write access, but can also be used for
    boot parameter parsing.
    The boot parameter is introduced in a follow up patch.

    Signed-off-by: Thomas Renninger
    Acked-by: jbaron@redhat.com
    Acked-by: Pekka Enberg
    Signed-off-by: Greg Kroah-Hartman

    Thomas Renninger
     

21 Oct, 2010

5 commits


20 Oct, 2010

7 commits

  • [Ralf: Michel's original patch only fixed N32; I replicated the same fix
    for O32.]

    Signed-off-by: Michel Thebeau
    Cc: paul.gortmaker@windriver.com
    Cc: bruce.ashfield@windriver.com
    Signed-off-by: Ralf Baechle

    Michel Thebeau
     
  • IOC3 is also being used on SGI MIPS systems but this particular driver is
    only being used on IA64 systems so linux-mips made no sense as a list. Pat
    also thinks linux-serial@vger.kernel.org is the better list.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • In this code, 0 is returned on memory allocation failure, even though other
    failures return -ENOMEM or other similar values.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression ret;
    expression x,e1,e2,e3;
    @@

    ret = 0
    ... when != ret = e1
    *x = \(kmalloc\|kcalloc\|kzalloc\)(...)
    ... when != ret = e2
    if (x == NULL) { ... when != ret = e3
    return ret;
    }
    //

    Signed-off-by: Julia Lawall
    To: Pat Gefre
    Cc: kernel-janitors@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1704/
    Signed-off-by: Ralf Baechle

    Julia Lawall
     
  • The platform specific files should be included via the platform-y
    variable.

    Signed-off-by: David Daney
    Cc: Lars-Peter Clausen
    Patchwork: https://patchwork.linux-mips.org/patch/1719/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • When running make clean, Kbuild doesn't process the .config file, so nothing
    generates a platform-y variable. We can get it to descend into the platform
    directories by setting $(obj-).

    The dec Platform file was unconditionally setting platform-, obliterating
    its previous contents and preventing some directories from being cleaned.
    This is change to an append operation '+=' to allow cavium-octeon to be
    cleaned.

    Signed-off-by: David Daney
    Cc: Sam Ravnborg
    Patchwork: https://patchwork.linux-mips.org/patch/1718/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon/kms: avivo cursor workaround applies to evergreen as well

    Linus Torvalds
     
  • kvm reloads the host's fs and gs blindly, however the underlying segment
    descriptors may be invalid due to the user modifying the ldt after loading
    them.

    Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
    of home grown unsafe versions.

    This is CVE-2010-3698.

    KVM-Stable-Tag.
    Signed-off-by: Avi Kivity
    Signed-off-by: Marcelo Tosatti

    Avi Kivity
     

19 Oct, 2010

6 commits


18 Oct, 2010

14 commits

  • Add ISA_DMA_API config item and select it when GENERIC_ISA_DMA enabled.
    This fixes build failure on allmodconfig like following:

    CC sound/isa/es18xx.o
    sound/isa/es18xx.c: In function 'snd_es18xx_playback1_prepare':
    sound/isa/es18xx.c:501:9: error: implicit declaration of function 'snd_dma_program'
    sound/isa/es18xx.c: In function 'snd_es18xx_playback_pointer':
    sound/isa/es18xx.c:818:3: error: implicit declaration of function 'snd_dma_pointer'
    make[3]: *** [sound/isa/es18xx.o] Error 1
    make[2]: *** [sound/isa/es18xx.o] Error 2
    make[1]: *** [sub-make] Error 2
    make: *** [all] Error 2

    Signed-off-by: Namhyung Kim
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1717/
    Signed-off-by: Ralf Baechle

    Namhyung Kim
     
  • CC security/integrity/ima/ima_fs.o
    In file included from linux/include/linux/fcntl.h:4:0,
    from linux/security/integrity/ima/ima_fs.c:18:
    linux/arch/mips/include/asm/fcntl.h:63:2: error: expected specifier-qualifier-list before 'off_t'
    make[3]: *** [security/integrity/ima/ima_fs.o] Error 1
    make[2]: *** [security/integrity/ima/ima_fs.o] Error 2
    make[1]: *** [sub-make] Error 2
    make: *** [all] Error 2

    Signed-off-by: Namhyung Kim
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1715/
    Signed-off-by: Ralf Baechle

    Namhyung Kim
     
  • [Ralf: I changed the patch to explicitly list all files to be deleted out
    of paranoia.]

    Signed-off-by: Wu Zhangjin
    Patchwork: http://patchwork.linux-mips.org/patch/1590/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     
  • o32 compat does the right thing, native and n32 compat do not...

    Signed-off-by: Al Viro
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1700/
    Signed-off-by: Ralf Baechle

    Al Viro
     
  • We want EFAULT, not -

    Signed-off-by: Al Viro
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1699/
    Signed-off-by: Ralf Baechle

    Al Viro
     
  • Put the original syscall number into ->regs[0] when we leave syscall
    with error. Use it in restart logics. Everything else will have
    it 0 since we pass through SAVE_SOME on all the ways in. Note that
    in places like bad_stack and inllegal_syscall we leave it 0 - it's not
    restartable.

    Signed-off-by: Al Viro
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1698/
    Signed-off-by: Ralf Baechle

    Al Viro
     
  • As it is, audit_syscall_entry() and secure_computing() get the
    bogus value (0, in fact)

    Signed-off-by: Al Viro
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1697/
    Signed-off-by: Ralf Baechle

    Al Viro
     
  • Signed-off-by: Al Viro
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/1696/
    Signed-off-by: Ralf Baechle

    Al Viro
     
  • 448cd16 ("Input: evdev - rearrange ioctl handling") broke EVIOCSABS by
    checking for the wrong direction bit.

    Signed-off-by: Daniel Mack
    Reported-by: Sven Neumann
    Tested-by: Sven Neumann
    Signed-off-by: Dmitry Torokhov

    Daniel Mack
     
  • This fixes a regression introduced by the dynamic allocation of absinfo
    for input devices. We need to bail out early for input devices which
    don't have absolute axis.

    [ 929.664303] Pid: 2989, comm: input Not tainted 2.6.36-rc8+ #14 MS-7260/MS-7260
    [ 929.664318] EIP: 0060:[] EFLAGS: 00010246 CPU: 0
    [ 929.664331] EIP is at evdev_ioctl+0x4f8/0x59f
    [ 929.664341] EAX: 00000040 EBX: 00000000 ECX: 00000006 EDX: f45a1efc
    [ 929.664355] ESI: 00000000 EDI: f45a1efc EBP: f45a1f24 ESP: f45a1eb8
    [ 929.664369] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    [ 929.664402] f470da74 f6a30e78 f462c240 00000018 bfe4a260 00000000 f45b06fc 00000000
    [ 929.664429] 000000c4 b769d000 c3544620 f470da74 f45b06fc f45b06fc f45a1f38 c107dd1f
    [ 929.664458] f4710b74 000000c4 00000000 00000000 00000000 0000029d 00000a74 f4710b74
    [ 929.664500] [] ? handle_mm_fault+0x2be/0x59a
    [ 929.664513] [] ? evdev_ioctl+0x0/0x59f
    [ 929.664524] [] ? do_vfs_ioctl+0x494/0x4d9
    [ 929.664538] [] ? up_read+0x16/0x29
    [ 929.664550] [] ? do_page_fault+0x2ff/0x32d
    [ 929.664564] [] ? do_sys_open+0xc5/0xcf
    [ 929.664575] [] ? sys_ioctl+0x41/0x61
    [ 929.664587] [] ? sysenter_do_call+0x12/0x36
    [ 929.684570] ---[ end trace 11b83e923bd8f2bb ]---

    Signed-off-by: Daniel Mack
    Signed-off-by: Dmitry Torokhov

    Daniel Mack
     
  • The i2c_imx_trx_complete() function is using
    wait_event_interruptible_timeout() to wait for the I2C controller to
    signal that it has completed an I2C bus operation. If the process that
    causes the I2C operation receives a signal, the wait will be
    interrupted, returning an error. It is better to let the I2C operation
    finished before handling the signal (i.e. returning into userspace).

    It is safe to use wait_event_timeout() instead, because the timeout
    will allow the process to exit if the I2C bus hangs. It's also better
    to allow the I2C operation to finish, because unacknowledged I2C
    operations can cause the I2C bus to hang.

    Signed-off-by: Marc Kleine-Budde
    Reviewed-by: Wolfram Sang
    Signed-off-by: Ben Dooks

    Marc Kleine-Budde
     
  • This patch is an improvement to 4bba0fd8d1c6d405df666e2573e1a1f917098be0
    which got to mainline a little early.

    Sudhakar Rajashekhara explains that at least OMAP-L138 requires MDR mode
    settings before DXR for correct behaviour, so load MDR first with
    STT cleared and later load again with STT set.

    Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

    Signed-off-by: Jon Povey
    Acked-by: Troy Kisky
    Tested-by: Sudhakar Rajashekhara
    Acked-by: Kevin Hilman
    Signed-off-by: Ben Dooks

    Jon Povey
     
  • Fixes cursor corruption in certain cases.

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • * 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: rawmidi: fix oops (use after free) when unloading a driver module

    Linus Torvalds
     

17 Oct, 2010

2 commits

  • Revert commit 54672386ccf36ffa21d1de8e75624af83f9b0eeb
    "firewire: ohci: fix up configuration of TI chips".
    It caused massive slow-down and data corruption with a TSB82AA2 based
    StarTech EC1394B2 ExpressCard and FireWire 800 harddisks.

    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/657081
    http://thread.gmane.org/gmane.linux.kernel.firewire.user/4013

    The fact that some card EEPROMs do not program these enhancements may be
    related to TSB81BA3 phy chip errata, if not to bugs of TSB82AA2 itself.
    We could re-add these configuration steps, but only conditional on a
    whitelist of cards on which these enhancements bring a proven positive
    effect.

    Reported-and-tested-by: Eric Shattow
    Cc: Clemens Ladisch
    Cc: 2.6.35
    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • When a driver module is unloaded and the last still open file is a raw
    MIDI device, the card and its devices will be actually freed in the
    snd_card_file_remove() call when that file is closed. Afterwards, rmidi
    and rmidi->card point into freed memory, so the module pointer is likely
    to be garbage.
    (This was introduced by commit 9a1b64caac82aa02cb74587ffc798e6f42c6170a.)

    Signed-off-by: Clemens Ladisch
    Reported-by: Krzysztof Foltman
    Cc: 2.6.30-2.6.35
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

16 Oct, 2010

1 commit