21 Dec, 2011

9 commits

  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (31 commits)
    Revert "[media] af9015: limit I2C access to keep FW happy"
    [media] s5p-fimc: Fix camera input configuration in subdev operations
    [media] m5mols: Fix logic in sanity check
    [media] ati_remote: switch to single-byte scancodes
    [media] V4L: mt9m111: fix uninitialised mutex
    [media] V4L: omap1_camera: fix missing include
    [media] V4L: mt9t112: use after free in mt9t112_probe()
    [media] V4L: soc-camera: fix compiler warnings on 64-bit platforms
    [media] s5p_mfc_enc: fix s/H264/H263/ typo
    [media] omap_vout: Fix compile error in 3.1
    [media] au0828: add missing models 72101, 72201 & 72261 to the model matrix
    [media] au0828: add missing USB ID 2040:7213
    [media] au0828: add missing USB ID 2040:7260
    [media] [trivial] omap24xxcam-dma: Fix logical test
    [media] omap_vout: fix crash if no driver for a display
    [media] media: video: s5p-tv: fix build break
    [media] omap3isp: fix compilation of ispvideo.c
    [media] m5mols: Fix set_fmt to return proper pixel format code
    [media] s5p-fimc: Use correct fourcc for RGB565 colour format
    [media] s5p-fimc: Fail driver probing when sensor configuration is wrong
    ...

    Linus Torvalds
     
  • binary_sysctl() calls sysctl_getname() which allocates from names_cache
    slab usin __getname()

    The matching function to free the name is __putname(), and not putname()
    which should be used only to match getname() allocations.

    This is because when auditing is enabled, putname() calls audit_putname
    *instead* (not in addition) to __putname(). Then, if a syscall is in
    progress, audit_putname does not release the name - instead, it expects
    the name to get released when the syscall completes, but that will happen
    only if audit_getname() was called previously, i.e. if the name was
    allocated with getname() rather than the naked __getname(). So,
    __getname() followed by putname() ends up leaking memory.

    Signed-off-by: Michel Lespinasse
    Acked-by: Al Viro
    Cc: Christoph Hellwig
    Cc: Eric Paris
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     
  • Static storage is not required for the struct vmap_area in
    __get_vm_area_node.

    Removing "static" to store this variable on the stack instead.

    Signed-off-by: Kautuk Consul
    Acked-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kautuk Consul
     
  • If the BMC gets reset, it will return 0x80 response errors.

    In less than a week
    # grep "Error 80 on cmd 22" /var/log/kernel |wc -l
    378681

    In this case, it is probably a good idea to restore the IPMI settings.

    Signed-off-by: Corey Minyard
    Tested-by: Arkadiusz Miśkiewicz
    Reported-by: Arkadiusz Miśkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Corey Minyard
     
  • An integer overflow will happen on 64bit archs if task's sum of rss,
    swapents and nr_ptes exceeds (2^31)/1000 value. This was introduced by
    commit

    f755a04 oom: use pte pages in OOM score

    where the oom score computation was divided into several steps and it's no
    longer computed as one expression in unsigned long(rss, swapents, nr_pte
    are unsigned long), where the result value assigned to points(int) is in
    range(1..1000). So there could be an int overflow while computing

    176 points *= 1000;

    and points may have negative value. Meaning the oom score for a mem hog task
    will be one.

    196 if (points
    Acked-by: KOSAKI Motohiro
    Acked-by: Oleg Nesterov
    Acked-by: David Rientjes
    Cc: [2.6.36+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frantisek Hrbata
     
  • If the request is to create non-root group and we fail to meet it, we
    should leave the root unchanged.

    Signed-off-by: Hillf Danton
    Acked-by: Hugh Dickins
    Acked-by: KAMEZAWA Hiroyuki
    Acked-by: Michal Hocko
    Cc: Balbir Singh
    Cc: David Rientjes
    Cc: Andrea Arcangeli
    Cc: Johannes Weiner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hillf Danton
     
  • There is a potential integer overflow in nilfs_ioctl_clean_segments().
    When a large argv[n].v_nmembs is passed from the userspace, the subsequent
    call to vmalloc() will allocate a buffer smaller than expected, which
    leads to out-of-bound access in nilfs_ioctl_move_blocks() and
    lfs_clean_segments().

    The following check does not prevent the overflow because nsegs is also
    controlled by the userspace and could be very large.

    if (argv[n].v_nmembs > nsegs * nilfs->ns_blocks_per_segment)
    goto out_free;

    This patch clamps argv[n].v_nmembs to UINT_MAX / argv[n].v_size, and
    returns -EINVAL when overflow.

    Signed-off-by: Haogang Chen
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haogang Chen
     
  • commit 828b1c50ae ("nilfs2: add compat ioctl") incidentally broke all
    other NILFS compat ioctls. Make them work again.

    Signed-off-by: Thomas Meyer
    Signed-off-by: Ryusuke Konishi
    Tested-by: Ryusuke Konishi
    Cc: [3.0+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Meyer
     
  • Kernels where MAX_NUMNODES > BITS_PER_LONG may temporarily see an empty
    nodemask in a tsk's mempolicy if its previous nodemask is remapped onto a
    new set of allowed cpuset nodes where the two nodemasks, as a result of
    the remap, are now disjoint.

    c0ff7453bb5c ("cpuset,mm: fix no node to alloc memory when changing
    cpuset's mems") adds get_mems_allowed() to prevent the set of allowed
    nodes from changing for a thread. This causes any update to a set of
    allowed nodes to stall until put_mems_allowed() is called.

    This stall is unncessary, however, if at least one node remains unchanged
    in the update to the set of allowed nodes. This was addressed by
    89e8a244b97e ("cpusets: avoid looping when storing to mems_allowed if one
    node remains set"), but it's still possible that an empty nodemask may be
    read from a mempolicy because the old nodemask may be remapped to the new
    nodemask during rebind. To prevent this, only avoid the stall if there is
    no mempolicy for the thread being changed.

    This is a temporary solution until all reads from mempolicy nodemasks can
    be guaranteed to not be empty without the get_mems_allowed()
    synchronization.

    Also moves the check for nodemask intersection inside task_lock() so that
    tsk->mems_allowed cannot change. This ensures that nothing can set this
    tsk's mems_allowed out from under us and also protects tsk->mempolicy.

    Reported-by: Miao Xie
    Signed-off-by: David Rientjes
    Cc: KOSAKI Motohiro
    Cc: Paul Menage
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

20 Dec, 2011

6 commits


19 Dec, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (22 commits)
    [SCSI] fcoe: fix fcoe in a DCB environment by adding DCB notifiers to set skb priority
    [SCSI] bnx2i: Fixed kernel panic caused by unprotected task->sc->request deref
    [SCSI] qla4xxx: check for failed conn setup
    [SCSI] qla4xxx: a small loop fix
    [SCSI] qla4xxx: fix flash/ddb support
    [SCSI] zfcp: return early from slave_destroy if slave_alloc returned early
    [SCSI] fcoe: Fix preempt count leak in fcoe_filter_frames()
    [SCSI] qla2xxx: Update version number to 8.03.07.12-k.
    [SCSI] qla2xxx: Submit all chained IOCBs for passthrough commands on request queue 0.
    [SCSI] qla2xxx: Correct fc_host port_state display.
    [SCSI] qla2xxx: Disable generating pause frames when firmware hang detected for ISP82xx.
    [SCSI] qla2xxx: Clear mailbox busy flag during premature mailbox completion for ISP82xx.
    [SCSI] qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx firmware hang.
    [SCSI] qla2xxx: Display IPE error message for ISP82xx.
    [SCSI] qla2xxx: Return the correct value for a mailbox command if 82xx is in reset recovery.
    [SCSI] qla2xxx: Enable Minidump by default with default capture mask 0x1f.
    [SCSI] qla2xxx: Stop unconditional completion of mailbox commands issued in interrupt mode during firmware hang.
    [SCSI] qla2xxx: Revert back the request queue mapping to request queue 0.
    [SCSI] qla2xxx: Don't call alloc_fw_dump for ISP82XX.
    [SCSI] qla2xxx: Check for SCSI status on underruns.
    ...

    Linus Torvalds
     
  • * 'for-linus/i2c-32-rc6' of git://git.fluff.org/bjdooks/linux:
    i2c-eg20t: correct the driver init order of pch_i2c_probe()
    I2C: OMAP: fix FIFO usage for OMAP4
    i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio
    i2c: i2c-s3c2410: Add a cpu_relax() to busy wait for bus idle

    Linus Torvalds
     
  • I noticed that hotplug of one setup does not work with recent change in
    pci tree.

    After checking the bridge conf setup, I noticed that the bridges get
    assigned but do not get enabled.

    The reason is the following commit, while simply ignores bridge
    resources when enabling a pci device:

    | commit bbef98ab0f019f1b0c25c1acdf1683c68933d41b
    | Author: Ram Pai
    | Date: Sun Nov 6 10:33:10 2011 +0800
    |
    | PCI: defer enablement of SRIOV BARS
    |...
    | NOTE: Note, there is subtle change in the pci_enable_device() API. Any
    | driver that depends on SRIOV BARS to be enabled in pci_enable_device()
    | can fail.

    Put back bridge resource and ROM resource checking to fix the problem.

    That should fix regression like BIOS does not assign correct resource to
    bridge.

    Discussion can be found at:
    http://www.spinics.net/lists/linux-pci/msg12874.html

    Signed-off-by: Yinghai Lu
    Acked-by: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     

18 Dec, 2011

6 commits


17 Dec, 2011

16 commits

  • Linus Torvalds
     
  • This reverts commit eb1711bb94991e93669c5a1b5f84f11be2d51ea1.

    It blows up the i915 seqno tracking, resulting in the

    BUG_ON(seqno == 0);

    in i915_wait_request() triggering, which will cause lock-ups.

    See for example
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/903010
    https://lkml.org/lkml/2011/12/14/395

    Reported-requested-and-tested-by: Dirk Hohndel
    Reported-by: Richard Eames
    Reported-by: Rocko Requin
    Acked-by: Daniel Vetter
    Cc: Dave Airlie
    Cc: Chris Wilson
    Cc: Keith Packard
    Cc: Eric Anholt
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc32: Be less strict in matching %lo part of relocation.
    sbus: convert drivers/sbus/char/* to use module_platform_driver()
    bbc_i2c: Remove unneeded err variable
    sparc: Use kmemdup rather than duplicating its implementation

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    ipv6: Check dest prefix length on original route not copied one in rt6_alloc_cow().
    sch_gred: should not use GFP_KERNEL while holding a spinlock
    ipip, sit: copy parms.name after register_netdevice
    ipv6: Fix for adding multicast route for loopback device automatically.
    ssb: fix init regression with SoCs
    rtl8192{ce,cu,de,se}: avoid problems because of possible ERFOFF -> ERFSLEEP transition
    mac80211: fix another race in aggregation start
    fsl_pq_mdio: Clean up tbi address configuration
    ppp: fix pptp double release_sock in pptp_bind()
    net/fec: fix the use of pdev->id
    ath9k: fix check for antenna diversity support
    batman-adv: delete global entry in case of roaming
    batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
    Bluetooth: Correct version check in hci_setup
    btusb: fix a memory leak in btusb_send_frame()
    Bluetooth: bnep: Fix module reference
    Bluetooth: cmtp: Fix module reference
    Bluetooth: btmrvl: support Marvell Bluetooth device SD8797

    Linus Torvalds
     
  • …inux/kernel/git/mason/linux-btrfs

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: unplug every once and a while
    Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code
    Btrfs: only set cache_generation if we setup the block group
    Btrfs: don't panic if orphan item already exists
    Btrfs: fix leaked space in truncate
    Btrfs: fix how we do delalloc reservations and how we free reservations on error
    Btrfs: deal with enospc from dirtying inodes properly
    Btrfs: fix num_workers_starting bug and other bugs in async thread
    BTRFS: Establish i_ops before calling d_instantiate
    Btrfs: add a cond_resched() into the worker loop
    Btrfs: fix ctime update of on-disk inode
    btrfs: keep orphans for subvolume deletion
    Btrfs: fix inaccurate available space on raid0 profile
    Btrfs: fix wrong disk space information of the files
    Btrfs: fix wrong i_size when truncating a file to a larger size
    Btrfs: fix btrfs_end_bio to deal with write errors to a single mirror

    * 'for-linus-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    btrfs: lower the dirty balance poll interval

    Linus Torvalds
     
  • * 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux:
    drm/i915/dp: Dither down to 6bpc if it makes the mode fit
    drm/i915: enable semaphores on per-device defaults
    drm/i915: don't set unpin_work if vblank_get fails
    drm/i915: By default, enable RC6 on IVB and SNB when reasonable
    iommu: Export intel_iommu_enabled to signal when iommu is in use
    drm/i915/sdvo: Include LVDS panels for the IS_DIGITAL check
    drm/i915: prevent division by zero when asking for chipset power
    drm/i915: add PCH info to i915_capabilities
    drm/i915: set the right SDVO transcoder for CPT
    drm/i915: no-lvds quirk for ASUS AT5NM10T-I
    drm/i915: Treat pre-gen4 backlight duty cycle value consistently
    drm/i915: Hook up Ivybridge eDP
    drm/i915: add multi-threaded forcewake support

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: HDA: Use LPIB Position fix for Intel SCH Poulsbo
    ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
    ALSA: HDA: Set position fix to LPIB for an Atom/Poulsbo based device
    ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails
    ASoC: WM8958: correctly show firmware magic on mismatch
    ASoC: mxs: Add appropriate MODULE_ALIAS()
    ASoC: mxs: Add missing MODULE_LICENSE("GPL")
    ASoC: Fix WM8996 24.576MHz clock operation
    ASoC: Include linux/module.h for smdk2443_wm9710
    ASoC: Fix a typo in jive_wm8750
    ASoC: Fix build dependency for SND_SOC_JZ4740_CODEC
    ASoC: Include linux/io.h for jz4740 codec

    Linus Torvalds
     
  • * 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
    gpio: Fix DA9052 GPIO build errors.
    gpio: mpc8xxx: don't allow input-only pins to be output for MPC5121
    gpio-ml-ioh: Add the irq_disable/irq_enable hooks for ml-ioh irq chip
    gpio-ml-ioh: fix a bug in the interrupt handler
    gpio: pl061: drop extra check for NULL platform_data

    Linus Torvalds
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: OMAP: rx51: fix USB
    ARM: OMAP: mcbsp: Fix possible memory corruption
    arm/imx: fix power button on imx51 babbage board
    ARM: imx: fix cpufreq build errors
    ARM: mx5: add __initconst for fec pdata
    MXC PWM: should active during DOZE/WAIT/DBG mode
    ARM: EXYNOS: Fix build error without CONFIG_LOCAL_TIMERS
    ARM: EXYNOS: Fix for stall in case of cpu hotplug or sleep
    ARM: S5PV210: Set 1000ns as PWM backlight period on SMDKV210
    ARM: SAMSUNG: remove duplicated header include

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-block:
    block: don't kick empty queue in blk_drain_queue()
    block/swim3: Locking fixes
    loop: Fix discard_alignment default setting
    cfq-iosched: fix cfq_cic_link() race confition
    cfq-iosched: free cic_index if blkio_alloc_blkg_stats fails
    cciss: fix flush cache transfer length
    cciss: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler
    loop: fix loop block driver discard and encryption comment
    block: initialize request_queue's numa node during

    Linus Torvalds
     
  • Tests show that the original large intervals can easily make the dirty
    limit exceeded on 100 concurrent dd's. So adapt to as large as the
    next check point selected by the dirty throttling algorithm.

    Signed-off-by: Wu Fengguang
    Signed-off-by: Chris Mason

    Wu Fengguang
     
  • Some active adaptors (VGA usually) only have two lanes at 2.7GHz.
    That's a maximum pixel clock of 144MHz at 8bpc, but 192MHz at 6bpc.

    Fixes Asus UX31 panel being black at startup due to no valid modes since
    dc22ee6fc18ce0f15424e753e8473c306ece95c1.

    v2: Rebased to current code, resulting in the fix applying to EDP panels as
    well. Also changed from spatio-temporal to just spatial dithering on
    pre-ironlake, to be conssitent (and less visual flicker)

    Signed-off-by: Adam Jackson
    Signed-off-by: Eric Anholt
    Tested-by: Eric Anholt
    Tested-by: Dirk Hohndel
    Signed-off-by: Keith Packard

    Adam Jackson
     
  • This adds a default setting for semaphores parameter, and enables
    semaphores by default on IVB.

    For now, as semaphores interaction with VTd causes random issues on
    SNB, we do not enable them by default. But they can still be enabled
    via the semaphores=1 kernel parameter.

    v2: enables semaphores on SNB when IO remapping is disabled, with base
    on Keith Packard patch.

    CC: Daniel Vetter
    CC: Ben Widawsky
    CC: Keith Packard
    CC: Jesse Barnes
    CC: Chris Wilson
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42696
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40564
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38862
    Reviewed-by: Chris Wilson
    Reviewed-by: Daniel Vetter
    Signed-off-by: Eugeni Dodonov
    Signed-off-by: Keith Packard

    Eugeni Dodonov
     
  • This fixes a race where we may try to finish a page flip and decrement
    the refcount even if our vblank_get failed and we ended up with a
    spurious flip pending interrupt.

    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=34211.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Keith Packard

    Jesse Barnes
     
  • RC6 should always work on IVB, and should work on SNB whenever IO
    remapping is disabled. RC6 never works on Ironlake. Make the default
    value for the parameter follow these guidelines. Setting the value
    to either 0 or 1 will force the specified behavior.

    Signed-off-by: Keith Packard
    Reviewed-by: Kenneth Graunke
    Reviewed-by: Eugeni Dodonov
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38567
    Cc: Ted Phelps
    Cc: Peter
    Cc: Lukas Hejtmanek
    Cc: Andrew Lutomirski

    Keith Packard
     
  • In i915 driver, we do not enable either rc6 or semaphores on SNB when dmar
    is enabled. The new 'intel_iommu_enabled' variable signals when the
    iommu code is in operation.

    Cc: Ted Phelps
    Cc: Peter
    Cc: Lukas Hejtmanek
    Cc: Andrew Lutomirski
    CC: Daniel Vetter
    Cc: Eugeni Dodonov
    Signed-off-by: Keith Packard

    Eugeni Dodonov