1. 17 Jul, 2014 29 commits
  2. 09 Jul, 2014 11 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.10.48 · d93efdcd
      Greg Kroah-Hartman authored
      d93efdcd
    • Hugh Dickins's avatar
      mm: fix crashes from mbind() merging vmas · f76d0efe
      Hugh Dickins authored
      commit d05f0cdc upstream.
      
      In v2.6.34 commit 9d8cebd4 ("mm: fix mbind vma merge problem")
      introduced vma merging to mbind(), but it should have also changed the
      convention of passing start vma from queue_pages_range() (formerly
      check_range()) to new_vma_page(): vma merging may have already freed
      that structure, resulting in BUG at mm/mempolicy.c:1738 and probably
      worse crashes.
      
      Fixes: 9d8cebd4 ("mm: fix mbind vma merge problem")
      Reported-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Tested-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      f76d0efe
    • Naoya Horiguchi's avatar
      hugetlb: fix copy_hugetlb_page_range() to handle migration/hwpoisoned entry · 9b576da0
      Naoya Horiguchi authored
      commit 4a705fef upstream.
      
      There's a race between fork() and hugepage migration, as a result we try
      to "dereference" a swap entry as a normal pte, causing kernel panic.
      The cause of the problem is that copy_hugetlb_page_range() can't handle
      "swap entry" family (migration entry and hwpoisoned entry) so let's fix
      it.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      9b576da0
    • Mikulas Patocka's avatar
      sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue · c78d5ed4
      Mikulas Patocka authored
      commit fd1232b2 upstream.
      
      This patch fixes I/O errors with the sym53c8xx_2 driver when the disk
      returns QUEUE FULL status.
      
      When the controller encounters an error (including QUEUE FULL or BUSY
      status), it aborts all not yet submitted requests in the function
      sym_dequeue_from_squeue.
      
      This function aborts them with DID_SOFT_ERROR.
      
      If the disk has full tag queue, the request that caused the overflow is
      aborted with QUEUE FULL status (and the scsi midlayer properly retries
      it until it is accepted by the disk), but the sym53c8xx_2 driver aborts
      the following requests with DID_SOFT_ERROR --- for them, the midlayer
      does just a few retries and then signals the error up to sd.
      
      The result is that disk returning QUEUE FULL causes request failures.
      
      The error was reproduced on 53c895 with COMPAQ BD03685A24 disk
      (rebranded ST336607LC) with command queue 48 or 64 tags.  The disk has
      64 tags, but under some access patterns it return QUEUE FULL when there
      are less than 64 pending tags.  The SCSI specification allows returning
      QUEUE FULL anytime and it is up to the host to retry.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c78d5ed4
    • Zhichuang SUN's avatar
      drivers/video/fbdev/fb-puv3.c: Add header files for function unifb_mmap · d9d5de8b
      Zhichuang SUN authored
      commit fbc6c4a1 upstream.
      
      Function unifb_mmap calls functions which are defined in linux/mm.h
      and asm/pgtable.h
      
      The related error (for unicore32 with unicore32_defconfig):
      	CC      drivers/video/fbdev/fb-puv3.o
      	drivers/video/fbdev/fb-puv3.c: In function 'unifb_mmap':
      	drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
      				      function 'vm_iomap_memory'
      	drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
      				      function 'pgprot_noncached'
      Signed-off-by: default avatarZhichuang Sun <sunzc522@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Joe Perches <joe@perches.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: linux-fbdev@vger.kernel.org
      Acked-by: default avatarXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d9d5de8b
    • Chen Gang's avatar
      arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error · fc252cbd
      Chen Gang authored
      commit 1ff38c56 upstream.
      
      Need include "asm/pgtable.h" to include "asm-generic/pgtable-nopmd.h",
      so can let 'pmd_t' defined. The related error with allmodconfig:
      
          CC      arch/unicore32/mm/alignment.o
        In file included from arch/unicore32/mm/alignment.c:24:
        arch/unicore32/include/asm/tlbflush.h:135: error: expected .). before .*. token
        arch/unicore32/include/asm/tlbflush.h:154: error: expected .). before .*. token
        In file included from arch/unicore32/mm/alignment.c:27:
        arch/unicore32/mm/mm.h:15: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token
        arch/unicore32/mm/mm.h:20: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token
        arch/unicore32/mm/mm.h:25: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token
        make[1]: *** [arch/unicore32/mm/alignment.o] Error 1
        make: *** [arch/unicore32/mm] Error 2
      Signed-off-by: default avatarChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: default avatarXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: default avatarXuetao Guan <gxt@mprc.pku.edu.cn>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fc252cbd
    • Sander Eikelenboom's avatar
      ALSA: usb-audio: Prevent printk ratelimiting from spamming kernel log while DEBUG not defined · 7b938dbb
      Sander Eikelenboom authored
      commit b7a77235 upstream.
      
      This (widely used) construction:
      
      if(printk_ratelimit())
      	dev_dbg()
      
      Causes the ratelimiting to spam the kernel log with the "callbacks suppressed"
      message below, even while the dev_dbg it is supposed to rate limit wouldn't
      print anything because DEBUG is not defined for this device.
      
      [  533.803964] retire_playback_urb: 852 callbacks suppressed
      [  538.807930] retire_playback_urb: 852 callbacks suppressed
      [  543.811897] retire_playback_urb: 852 callbacks suppressed
      [  548.815745] retire_playback_urb: 852 callbacks suppressed
      [  553.819826] retire_playback_urb: 852 callbacks suppressed
      
      So use dev_dbg_ratelimited() instead of this construction.
      Signed-off-by: default avatarSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7b938dbb
    • Tim Gardner's avatar
      ALSA: usb-audio: Suppress repetitive debug messages from retire_playback_urb() · 24ec54ee
      Tim Gardner authored
      commit a5065eb6 upstream.
      
      BugLink: http://bugs.launchpad.net/bugs/1305133
      
      Malfunctioning or slow devices can cause a flood of dmesg SPAM.
      
      I've ignored checkpatch.pl complaints about the use of printk_ratelimit() in favour
      of prior art in sound/usb/pcm.c.
      
      WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit
      +	if (printk_ratelimit() &&
      
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Eldad Zack <eldad@fogrefinery.com>
      Cc: Daniel Mack <zonque@gmail.com>
      Cc: Clemens Ladisch <clemens@ladisch.de>
      Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      24ec54ee
    • James Hogan's avatar
      serial: 8250_dw: Fix LCR workaround regression · d791a3e3
      James Hogan authored
      commit 6979f8d2 upstream.
      
      Commit c49436b6 (serial: 8250_dw: Improve unwritable LCR workaround)
      caused a regression. It added a check that the LCR was written properly
      to detect and workaround the busy quirk, but the behaviour of bit 5
      (UART_LCR_SPAR) differs between IP versions 3.00a and 3.14c per the
      docs. On older versions this caused the check to fail and it would
      repeatedly force idle and rewrite the LCR register, causing delays and
      preventing any input from serial being received.
      
      This is fixed by masking out UART_LCR_SPAR before making the comparison.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Tim Kryger <tim.kryger@linaro.org>
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Cc: Matt Porter <matt.porter@linaro.org>
      Cc: Markus Mayer <markus.mayer@linaro.org>
      Tested-by: default avatarTim Kryger <tim.kryger@linaro.org>
      Tested-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Tested-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d791a3e3
    • Tim Kryger's avatar
      serial: 8250_dw: Improve unwritable LCR workaround · 6d5e7933
      Tim Kryger authored
      commit c49436b6 upstream.
      
      When configured with UART_16550_COMPATIBLE=NO or in versions prior to
      the introduction of this option, the Designware UART will ignore writes
      to the LCR if the UART is busy.  The current workaround saves a copy of
      the last written LCR and re-writes it in the ISR for a special interrupt
      that is raised when a write was ignored.
      
      Unfortunately, interrupts are typically disabled prior to performing a
      sequence of register writes that include the LCR so the point at which
      the retry occurs is too late.  An example is serial8250_do_set_termios()
      where an ignored LCR write results in the baud divisor not being set and
      instead a garbage character is sent out the transmitter.
      
      Furthermore, since serial_port_out() offers no way to indicate failure,
      a serious effort must be made to ensure that the LCR is actually updated
      before returning back to the caller.  This is difficult, however, as a
      UART that was busy during the first attempt is likely to still be busy
      when a subsequent attempt is made unless some extra action is taken.
      
      This updated workaround reads back the LCR after each write to confirm
      that the new value was accepted by the hardware.  Should the hardware
      ignore a write, the TX/RX FIFOs are cleared and the receive buffer read
      before attempting to rewrite the LCR out of the hope that doing so will
      force the UART into an idle state.  While this may seem unnecessarily
      aggressive, writes to the LCR are used to change the baud rate, parity,
      stop bit, or data length so the data that may be lost is likely not
      important.  Admittedly, this is far from ideal but it seems to be the
      best that can be done given the hardware limitations.
      
      Lastly, the revised workaround doesn't touch the LCR in the ISR, so it
      avoids the possibility of a "serial8250: too much work for irq" lock up.
      This problem is rare in real situations but can be reproduced easily by
      wiring up two UARTs and running the following commands.
      
        # stty -F /dev/ttyS1 echo
        # stty -F /dev/ttyS2 echo
        # cat /dev/ttyS1 &
        [1] 375
        # echo asdf > /dev/ttyS1
        asdf
      
        [   27.700000] serial8250: too much work for irq96
        [   27.700000] serial8250: too much work for irq96
        [   27.710000] serial8250: too much work for irq96
        [   27.710000] serial8250: too much work for irq96
        [   27.720000] serial8250: too much work for irq96
        [   27.720000] serial8250: too much work for irq96
        [   27.730000] serial8250: too much work for irq96
        [   27.730000] serial8250: too much work for irq96
        [   27.740000] serial8250: too much work for irq96
      Signed-off-by: default avatarTim Kryger <tim.kryger@linaro.org>
      Reviewed-by: default avatarMatt Porter <matt.porter@linaro.org>
      Reviewed-by: default avatarMarkus Mayer <markus.mayer@linaro.org>
      Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      [wangnan: backport to 3.10.43:
        - adjust context
        - remove unneeded local var]
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6d5e7933
    • Tim Kryger's avatar
      serial: 8250_dw: Report CTS asserted for auto flow · b1338609
      Tim Kryger authored
      commit 33acbb82 upstream.
      
      When a serial port is configured for RTS/CTS flow control, serial core
      will disable the transmitter if it observes CTS is de-asserted. This is
      perfectly reasonable and appropriate when the UART lacks the ability to
      automatically perform CTS flow control.
      
      However, if the UART hardware can manage flow control automatically, it
      is important that software not get involved.  When the DesignWare UART
      enables 16C750 style auto-RTS/CTS it stops generating interrupts for
      changes in CTS state so software mostly stays out of the way.  However,
      it does report the true state of CTS in the MSR so software may notice
      it is de-asserted and respond by improperly disabling the transmitter.
      Once this happens the transmitter will be blocked forever.
      
      To avoid this situation, we simply lie to the 8250 and serial core by
      reporting that CTS is asserted whenever auto-RTS/CTS mode is enabled.
      Signed-off-by: default avatarTim Kryger <tim.kryger@linaro.org>
      Reviewed-by: default avatarMatt Porter <matt.porter@linaro.org>
      Reviewed-by: default avatarMarkus Mayer <markus.mayer@linaro.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b1338609