26 Aug, 2011

8 commits

  • entry_32.S contained a hardcoded alternative instruction entry, and the
    format changed in commit 59e97e4d6fbc ("x86: Make alternative
    instruction pointers relative").

    Replace the hardcoded entry with the altinstruction_entry macro. This
    fixes the 32-bit boot with CONFIG_X86_INVD_BUG=y.

    Reported-and-tested-by: Arnaud Lacombe
    Signed-off-by: Andy Lutomirski
    Cc: Peter Anvin
    Cc: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     
  • While removing custom rendezvous code and switching to stop_machine,
    commit 192d8857427d ("x86, mtrr: use stop_machine APIs for doing MTRR
    rendezvous") completely dropped mtrr setting code on !CONFIG_SMP
    breaking MTRR settting on UP.

    Fix it by removing the incorrect CONFIG_SMP.

    Signed-off-by: Tejun Heo
    Reported-by: Anders Eriksson
    Tested-and-acked-by: Suresh Siddha
    Acked-by: H. Peter Anvin
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Purely in-memory filesystems do not use the inode hash as the dcache
    tells us if an entry already exists. As a result, they do not call
    unlock_new_inode, and thus directory inodes do not get put into a
    different lockdep class for i_sem.

    We need the different lockdep classes, because the locking order for
    i_mutex is different for directory inodes and regular inodes. Directory
    inodes can do "readdir()", which takes i_mutex *before* possibly taking
    mm->mmap_sem (due to a page fault while copying the directory entry to
    user space).

    In contrast, regular inodes can be mmap'ed, which takes mm->mmap_sem
    before accessing i_mutex.

    The two cases can never happen for the same inode, so no real deadlock
    can occur, but without the different lockdep classes, lockdep cannot
    understand that. As a result, if CONFIG_DEBUG_LOCK_ALLOC is set, this
    can lead to false positives from lockdep like below:

    find/645 is trying to acquire lock:
    (&mm->mmap_sem){++++++}, at: [] might_fault+0x5c/0xac

    but task is already holding lock:
    (&sb->s_type->i_mutex_key#15){+.+.+.}, at: []
    vfs_readdir+0x5b/0xb4

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (&sb->s_type->i_mutex_key#15){+.+.+.}:
    [] lock_acquire+0xbf/0x103
    [] __mutex_lock_common+0x4c/0x361
    [] mutex_lock_nested+0x40/0x45
    [] hugetlbfs_file_mmap+0x82/0x110
    [] mmap_region+0x258/0x432
    [] do_mmap_pgoff+0x2ac/0x306
    [] sys_mmap_pgoff+0x118/0x16a
    [] sys_mmap+0x22/0x24
    [] system_call_fastpath+0x16/0x1b

    -> #0 (&mm->mmap_sem){++++++}:
    [] __lock_acquire+0xa1a/0xcf7
    [] lock_acquire+0xbf/0x103
    [] might_fault+0x89/0xac
    [] filldir+0x6f/0xc7
    [] dcache_readdir+0x67/0x205
    [] vfs_readdir+0x7b/0xb4
    [] sys_getdents+0x7e/0xd1
    [] system_call_fastpath+0x16/0x1b

    This patch moves the directory vs file lockdep annotation into a helper
    function that can be called by in-memory filesystems and has hugetlbfs
    call it.

    Signed-off-by: Josh Boyer
    Acked-by: Peter Zijlstra
    Signed-off-by: Linus Torvalds

    Josh Boyer
     
  • * 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback:
    squeeze max-pause area and drop pass-good area

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/cpupowerutils:
    cpupower: use man(1) when calling "cpupower help subcommand"
    cpupower: make NLS truly optional
    cpupower: fix Makefile typo
    cpupower: Make monitor command -c/--cpu aware
    cpupower: Better detect offlined CPUs
    cpupower: Do not show an empty Idle_Stats monitor if no idle driver is available
    cpupower: mperf monitor - Use TSC to calculate max frequency if possible
    cpupower: avoid using symlinks

    Linus Torvalds
     
  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
    hwmon: (i5k_amb) Drop i5k_channel_pci_id
    hwmon: (ntc_thermistor) Simplify if sequence

    Linus Torvalds
     
  • * '3.1-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (21 commits)
    target: Convert acl_node_lock to be IRQ-disabling
    target: Make locking in transport_deregister_session() IRQ safe
    tcm_fc: init/exit functions should not be protected by "#ifdef MODULE"
    target: Print subpage too for unhandled MODE SENSE pages
    iscsi-target: Fix iscsit_allocate_se_cmd_for_tmr failure path bugs
    iscsi-target: Implement iSCSI target IPv6 address printing.
    target: Fix task SGL chaining breakage with transport_allocate_data_tasks
    target: Fix task count > 1 handling breakage and use max_sector page alignment
    target: Add missing DATA_SG_IO transport_cmd_get_valid_sectors check
    target: Fix SYNCHRONIZE_CACHE zero LBA + range breakage
    target: Remove duplicate task completions in transport_emulate_control_cdb
    target: Fix WRITE_SAME usage with transport_get_size
    target: Add WRITE_SAME (10) parsing and refactor passthrough checks
    target: Fix write payload exception handling with ->new_cmd_map
    iscsi-target: forever loop bug in iscsit_attach_ooo_cmdsn()
    iscsi-target: remove duplicate return
    target: Convert target_core_rd.c to use use BUG_ON
    iscsi-target: Fix leak on failure in iscsi_copy_param_list()
    target: Use ERR_CAST inlined function
    target: Make standard INQUIRY return 'not connected' for tpg_virt_lun0
    ...

    Linus Torvalds
     
  • I ran into a couple of programs which broke with the new Linux 3.0
    version. Some of those were binary only. I tried to use LD_PRELOAD to
    work around it, but it was quite difficult and in one case impossible
    because of a mix of 32bit and 64bit executables.

    For example, all kind of management software from HP doesnt work, unless
    we pretend to run a 2.6 kernel.

    $ uname -a
    Linux svivoipvnx001 3.0.0-08107-g97cd98f #1062 SMP Fri Aug 12 18:11:45 CEST 2011 i686 i686 i386 GNU/Linux

    $ hpacucli ctrl all show

    Error: No controllers detected.

    $ rpm -qf /usr/sbin/hpacucli
    hpacucli-8.75-12.0

    Another notable case is that Python now reports "linux3" from
    sys.platform(); which in turn can break things that were checking
    sys.platform() == "linux2":

    https://bugzilla.mozilla.org/show_bug.cgi?id=664564

    It seems pretty clear to me though it's a bug in the apps that are using
    '==' instead of .startswith(), but this allows us to unbreak broken
    programs.

    This patch adds a UNAME26 personality that makes the kernel report a
    2.6.40+x version number instead. The x is the x in 3.x.

    I know this is somewhat ugly, but I didn't find a better workaround, and
    compatibility to existing programs is important.

    Some programs also read /proc/sys/kernel/osrelease. This can be worked
    around in user space with mount --bind (and a mount namespace)

    To use:

    wget ftp://ftp.kernel.org/pub/linux/kernel/people/ak/uname26/uname26.c
    gcc -o uname26 uname26.c
    ./uname26 program

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

25 Aug, 2011

8 commits

  • In commit a144c6a6c924 ("PM: Print a warning if firmware is requested
    when tasks are frozen") we not only printed a warning if somebody tried
    to load the firmware when tasks are frozen - we also failed the load.

    But that check was done before the check for built-in firmware, and then
    when we disallowed usermode helpers during bootup (commit 288d5abec831:
    "Boot up with usermodehelper disabled"), that actually means that
    built-in modules can no longer load their firmware even if the firmware
    is built in too. Which used to work, and some people depended on it for
    the R100 driver.

    So move the test for usermodehelper_is_disabled() down, to after
    checking the built-in firmware.

    This should fix:

    https://bugzilla.kernel.org/show_bug.cgi?id=40952

    Reported-by: James Cloos
    Bisected-by: Elimar Riesebieter
    Cc: Michel Dänzer
    Cc: Rafael Wysocki
    Cc: Greg Kroah-Hartman
    Cc: Valdis Kletnieks
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-31-rc3/i2c-fixes' of git://git.fluff.org/bjdooks/linux:
    i2c-nomadik: fix kerneldoc warning
    Revert "i2c-omap: fix static suspend vs. runtime suspend"
    i2c-nomadik: Do not use _interruptible_ variant call

    Linus Torvalds
     
  • There was a missing struct item in the kerneldoc, add it and fix
    another pretty-printing formatting issue with a missing space.

    Signed-off-by: Linus Walleij
    Signed-off-by: Ben Dooks

    Linus Walleij
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: wiimote: Add status and return request handlers
    HID: wiimote: Add drm request
    HID: wiimote: Register led class devices
    HID: wiimote: Correctly call HID open/close callbacks
    HID: wiimote: Simplify synchronization
    HID: usbhid: Add support for SiGma Micro chip
    HID: add support for new revision of Apple aluminum keyboard

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: ad714x - read the interrupt status registers in a row
    Input: ad714x - use DMA-safe buffers for spi_write()
    Input: ad714x - fix endianness issues
    Input: ad714xx-spi - force SPI bus into the default 8-bit mode
    Input: ep93xx_keypad - add missing include of linux/module.h
    Input: tnetv107x-ts - add missing include of linux/module.h
    Input: max11801_ts - correct license statement
    Input: atmel_mxt_ts - report pressure information from the driver
    Input: bcm5974 - Add support for newer MacBookPro8,2
    Input: wacom - report id 3 returns 4 bytes of data
    Input: wacom - add WAC_MSG_RETRIES define
    Input: wacom - add support for the Wacom Bamboo Pen (CTL-660/K)
    Input: tegra-kbc - correct call to input_free_device
    Input: mpu3050 - correct call to input_free_device
    Input: bcm5974 - add support for touchpads found in MacBookAir4,2
    Input: mma8450 - fix module device table type
    Input: remove CLOCK_TICK_RATE from analog joystick driver

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
    fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message
    fuse: mark pages accessed when written to
    fuse: delete dead .write_begin and .write_end aops
    fuse: fix flock
    fuse: fix non-ANSI void function notation

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc: Allow handling signals when stack is corrupted.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits)
    bridge: fix a possible net_device leak
    net: Documentation: RFC 2553bis is now RFC 3493
    atm: br2684: Fix oops due to skb->dev being NULL
    ipv6: Fix ipv6_getsockopt for IPV6_2292PKTOPTIONS
    net: netdev-features.txt update to Documentation/networking/00-INDEX
    vlan: reset headers on accel emulation path
    forcedeth: call vlan_mode only if hw supports vlans
    via-velocity: remove non-tagged packet filtering
    bonding:reset backup and inactive flag of slave
    net_sched: fix port mirror/redirect stats reporting
    sit tunnels: propagate IPv6 transport class to IPv4 Type of Service
    gianfar: reduce stack usage in gianfar_ethtool.c
    net: minor update to Documentation/networking/scaling.txt
    net: add missing entries to Documentation/networking/00-INDEX
    gianfar: prevent buggy hw rx vlan tagging
    net: sh_eth: Fix build by forgot including linux/interrupt.h
    drivers/net/can/sja1000/plx_pci.c: eliminate double free
    usbnet/cdc_ncm: Don't use stack variables for DMA
    vmxnet3: Don't enable vlan filters in promiscuous mode.
    iwlagn: sysfs couldn't find the priv pointer
    ...

    Linus Torvalds
     

24 Aug, 2011

12 commits

  • Jiri Kosina
     
  • FUSE_NOTIFY_INVAL_ENTRY didn't check the length of the write so the
    message processing could overrun and result in a "kernel BUG at
    fs/fuse/dev.c:629!"

    Reported-by: Han-Wen Nienhuys
    Signed-off-by: Miklos Szeredi
    CC: stable@kernel.org

    Miklos Szeredi
     
  • Function i5k_channel_pci_id looks like it can fail, while a better
    code design would make it more obvious that it can't. We can even get
    rid of the function.

    Signed-off-by: Jean Delvare
    Acked-by: Darrick J. Wong
    Signed-off-by: Guenter Roeck

    Jean Delvare
     
  • …/git/tip/linux-2.6-tip

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86-32, vdso: On system call restart after SYSENTER, use int $0x80
    x86, UV: Remove UV delay in starting slave cpus
    x86, olpc: Wait for last byte of EC command to be accepted

    Linus Torvalds
     
  • When we enter a 32-bit system call via SYSENTER or SYSCALL, we shuffle
    the arguments to match the int $0x80 calling convention. This was
    probably a design mistake, but it's what it is now. This causes
    errors if the system call as to be restarted.

    For SYSENTER, we have to invoke the instruction from the vdso as the
    return address is hardcoded. Accordingly, we can simply replace the
    jump in the vdso with an int $0x80 instruction and use the slower
    entry point for a post-restart.

    Suggested-by: Linus Torvalds
    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/CA%2B55aFztZ=r5wa0x26KJQxvZOaQq8s2v3u50wCyJcA-Sc4g8gQ@mail.gmail.com
    Cc:

    H. Peter Anvin
     
  • Fixes fallout due to the removal of the cast in commit aa462abe8aaf
    ("mm: fix __page_to_pfn for a const struct page argument")

    Signed-off-by: Ian Campbell
    Cc: Andrew Morton
    Acked-by: Geert Uytterhoeven
    Cc: linux-m68k@lists.linux-m68k.org
    Signed-off-by: Linus Torvalds

    Ian Campbell
     
  • This reverts commit adf6e07922255937c8bfeea777d19502b4c9a2be.

    Remove system PM methods which can race with runtime PM methods.

    Also, as of v3.1, the PM domain level code for OMAP handles device
    power state transistions automatically for devices, so drivers no
    longer need to specifically call the bus/pm_domain methods themselves.

    Signed-off-by: Kevin Hilman
    Signed-off-by: Ben Dooks

    Kevin Hilman
     
  • If there is a signal pending and wait_for_completion_interruptible_timeout
    exited because of the -ERESTARTSYS error we are unable to send any more
    i2c messages.

    So, deprecate this _interruptible_ variant call.

    Signed-off-by: Srinidhi Kasagar
    Signed-off-by: Linus Walleij
    Signed-off-by: Ben Dooks

    srinidhi kasagar
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    xfs: fix tracing builds inside the source tree
    xfs: remove subdirectories
    xfs: don't expect xfs headers to be in subdirectories

    Linus Torvalds
     
  • * git://git.infradead.org/users/cbou/battery-3.1:
    s3c-adc-battery: Fix compilation error due to missing header (module.h)
    max8997_charger: Needs module.h
    max8998_charger: Needs module.h

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon: Extended DDC Probing for Toshiba L300D Radeon Mobility X1100 HDMI-A Connector
    drm/ttm: ensure ttm for new node is bound before calling move_notify()
    drm/ttm: unbind ttm before destroying node in accel move cleanup
    drm/ttm: fix ttm_bo_add_ttm(user) failure path
    drm/radeon: Make vramlimit parameter actually work.
    drm/radeon: Explicitly print GTT/VRAM offsets on test failure.
    drm/radeon: Take IH ring into account for test size calculation.
    drm/radeon/alpha: Add Alpha support to Radeon DRM code

    Linus Torvalds
     
  • This reverts commit f3637a5f2e2eb391ff5757bc83fb5de8f9726464.

    It turns out that this breaks several drivers, one example being OMAP
    boards which use the on-board OMAP UARTs and the omap-serial driver that
    will not boot to userspace after the commit.

    Paul Walmsley reports that enabling CONFIG_DEBUG_SHIRQ reveals 'IRQ
    handler type mismatch' errors:

    IRQ handler type mismatch for IRQ 74
    current handler: serial idle
    ...

    and the reason is that setting IRQF_ONESHOT will now result in those
    interrupt handlers having different IRQF flags, and thus being
    unsharable. So the commit log in the reverted commit:

    "Since it is required for those users and
    there is no difference for others it makes sense to add this flag
    unconditionally."

    is simply not true: there may not be any difference from a "actions at
    irq time", but there is a *big* difference wrt this flag testing irq
    management (see __setup_irq() in kernel/irq/manage.c).

    One solution may be to stop verifying IRQF_ONESHOT in __setup_irq(), but
    right now the safe course of action is to revert the change. Let's
    revisit this in a later merge window.

    Reported-by: Paul Walmsley
    Cc: Sebastian Andrzej Siewior
    Requested-by: Alan Cox
    Acked-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

23 Aug, 2011

12 commits

  • Toshiba Satellite L300D with ATI Mobility Radeon X1100 sends data
    to i2c bus for a HDMI connector that is not implemented/existent
    on the notebook's board.

    Fix by applying extented DDC probing for this connector.

    Requires [PATCH] drm/radeon: Extended DDC Probing for Connectors
    with Improperly Wired DDC Lines

    Tested for kernel 2.6.38 on Toshiba Satellite L300D notebook

    BugLink: http://bugs.launchpad.net/bugs/826677

    Signed-off-by: Thomas Reim
    Acked-by: Chris Routh
    Cc:
    Reviewed-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Thomas Reim
     
  • The wiimote resets the current drm when an extension is plugged in.
    Fortunately, it also sends a status report in this situation so we just
    reset the drm on every status report to keep the drm consistent.

    Also handle return reports from the wiimote which indicate success and
    failure of requests that we've sent.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     
  • The wiimote reports data in several data reporting modes (DRM). The DRM
    request makes the wiimote send data in the requested drm.

    The DRM mode can be set explicitely or can be chosen by the driver. To let
    the driver choose the DRM mode, pass WIIPROTO_REQ_NULL placeholder to it. This
    is no valid request and is replaced with an appropriate DRM.

    Currently, the driver always sets the basic DRM_K mode, but this will be
    extended when further peripherals like accelerometer and IR are supported.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     
  • This registers 4 led devices to allow controlling the wiimote leds via standard
    LED sysfs API. It removes the four sysfs attributes so we don't have two APIs
    for one device.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     
  • Even though the bluetooth hid backend does not react on open/close callbacks, we
    should call them to be consistent with other hid drivers.

    Also the new input open/close handlers will be used in future to prepare the
    wiimote device for IR/extension input.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     
  • The new locking scheme in HID core allows us to remove a bit of synchronization.
    Since the HID layer acts synchronously we simply register input core last and
    there are no synchonization issues anymore.
    Also register sysfs files after that to simplify the code.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     
  • This was true for new TTM_PL_SYSTEM and new TTM_PL_TT cases, but wasn't
    the case on TTM_PL_SYSTEMTTM_PL_TT moves, which causes trouble on some
    paths as nouveau's move_notify() hook requires that the dma addresses be
    valid at this point.

    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Ben Skeggs
     
  • Nouveau makes the assumption that if a TTM is bound there will be a mm_node
    around for it and the backwards ordering here resulted in a use-after-free
    on some eviction paths.

    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Ben Skeggs
     
  • ttm_tt_destroy kfrees passed object, so we need to nullify
    a reference to it.

    Signed-off-by: Marcin Slusarz
    Cc: stable@kernel.org
    Reviewed-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Marcin Slusarz
     
  • Patch to add SiGma Micro-based keyboards (1c4f:0002) to hid-quirks.

    These keyboards dont seem to allow the records to be initialized, and hence a
    timeout occurs when the usbhid driver attempts to initialize them. The patch
    just adds the signature for these keyboards to the hid-quirks list with the
    setting HID_QUIRK_NO_INIT_REPORTS. This removes the 5-10 second wait for the
    timeout to occur.

    Signed-off-by: Jeremiah Matthey
    Signed-off-by: Jiri Kosina

    Jeremiah Matthey
     
  • Jan Beulich reported a possible net_device leak in bridge code after
    commit bb900b27a2f4 (bridge: allow creating bridge devices with netlink)

    Reported-by: Jan Beulich
    Signed-off-by: Eric Dumazet
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • The code really requires the current source directory to be in the
    header search path. We already do this if building with an object
    tree separate from the source, but it needs to be added manually
    if building inside the source. The cflags addition for it accidentally
    got removed when collapsing the xfs directory structure.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Dave Chinner
    Signed-off-by: Alex Elder

    Christoph Hellwig