1. 03 10月, 2016 1 次提交
  2. 02 10月, 2016 32 次提交
  3. 30 9月, 2016 7 次提交
    • S
      s390/con3270: fix insufficient space padding · 6cd997db
      Sascha Silbe 提交于
      con3270 contains an optimisation that reduces the amount of data to be
      transmitted to the 3270 terminal by putting a Repeat to Address (RA)
      order into the data stream. The RA order itself takes up space, so
      con3270 only uses it if there's enough space left in the line
      buffer. Otherwise it just pads out the line manually.
      
      For lines that were _just_ short enough that the RA order still fit in
      the line buffer, the line was instead padded with an insufficient
      amount of spaces. This was caused by examining the size of the
      allocated line buffer rather than the length of the string to be
      displayed.
      
      For con3270_cline_end(), we just compare against the line length. For
      con3270_update_string() however that isn't available anymore, so we
      check whether the Repeat to Address order is present.
      
      Fixes: f51320a5 ("[PATCH] s390: new 3270 driver.") (tglx/history.git)
      Tested-by: NJing Liu <liujbjl@linux.vnet.ibm.com>
      Tested-by: NYang Chen <bjcyang@linux.vnet.ibm.com>
      Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6cd997db
    • S
      s390/con3270: fix use of uninitialised data · c14f2aac
      Sascha Silbe 提交于
      con3270 contains an optimisation that reduces the amount of data to be
      transmitted to the 3270 terminal by putting a Repeat to Address (RA)
      order into the data stream. The RA order itself takes up space, so
      con3270 only uses it if there's enough space left in the line
      buffer. Otherwise it just pads out the line manually.
      
      For lines too long to include the RA order, one byte was left
      uninitialised. This was caused by an off-by-one bug in the loop that
      pads out the line. Since the buffer is allocated from a common pool,
      the single byte left uninitialised contained some previous buffer
      content. Usually this was just a space or some character (which can
      result in clutter but is otherwise harmless). Sometimes, however, it
      was a Repeat to Address order, messing up the entire screen layout and
      causing the display to send the entire buffer content on every
      keystroke.
      
      Fixes: f51320a5 ("[PATCH] s390: new 3270 driver.") (tglx/history.git)
      Reported-by: NLiu Jing <liujbjl@linux.vnet.ibm.com>
      Tested-by: NJing Liu <liujbjl@linux.vnet.ibm.com>
      Tested-by: NYang Chen <bjcyang@linux.vnet.ibm.com>
      Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c14f2aac
    • S
      s390/cio: fix accidental interrupt enabling during resume · d53c51f2
      Sebastian Ott 提交于
      Since commit 9f3d6d7a chsc_get_channel_measurement_chars is called with
      interrupts disabled during resume from hibernate. Since this function
      used spin_unlock_irq, interrupts have been enabled accidentally. Fix
      this by using the irqsave variant.
      
      Since we can't guarantee the IRQ-enablement state for all (future/
      external) callers, change the locking in related functions to prevent
      similar bugs in the future.
      
      Fixes: 9f3d6d7a ("s390/cio: update measurement characteristics")
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Reviewed-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      d53c51f2
    • G
      Revert "serial: pl011: add console matching function" · 08bf2159
      Greg Kroah-Hartman 提交于
      This reverts commit 8b8f347d as it
      causes build errors in linux-next
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Aleksey Makarov <aleksey.makarov@linaro.org>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Christopher Covington <cov@codeaurora.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      08bf2159
    • M
      tg3: Avoid NULL pointer dereference in tg3_io_error_detected() · 1b0ff898
      Milton Miller 提交于
      While the driver is probing the adapter, an error may occur before the
      netdev structure is allocated and attached to pci_dev. In this case,
      not only netdev isn't available, but the tg3 private structure is also
      not available as it is just math from the NULL pointer, so dereferences
      must be skipped.
      
      The following trace is seen when the error is triggered:
      
        [1.402247] Unable to handle kernel paging request for data at address 0x00001a99
        [1.402410] Faulting instruction address: 0xc0000000007e33f8
        [1.402450] Oops: Kernel access of bad area, sig: 11 [#1]
        [1.402481] SMP NR_CPUS=2048 NUMA PowerNV
        [1.402513] Modules linked in:
        [1.402545] CPU: 0 PID: 651 Comm: eehd Not tainted 4.4.0-36-generic #55-Ubuntu
        [1.402591] task: c000001fe4e42a20 ti: c000001fe4e88000 task.ti: c000001fe4e88000
        [1.402742] NIP: c0000000007e33f8 LR: c0000000007e3164 CTR: c000000000595ea0
        [1.402787] REGS: c000001fe4e8b790 TRAP: 0300   Not tainted  (4.4.0-36-generic)
        [1.402832] MSR: 9000000100009033 <SF,HV,EE,ME,IR,DR,RI,LE>  CR: 28000422  XER: 20000000
        [1.403058] CFAR: c000000000008468 DAR: 0000000000001a99 DSISR: 42000000 SOFTE: 1
        GPR00: c0000000007e3164 c000001fe4e8ba10 c0000000015c5e00 0000000000000000
        GPR04: 0000000000000001 0000000000000000 0000000000000039 0000000000000299
        GPR08: 0000000000000000 0000000000000001 c000001fe4e88000 0000000000000006
        GPR12: 0000000000000000 c00000000fb40000 c0000000000e6558 c000003ca1bffd00
        GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
        GPR20: 0000000000000000 0000000000000000 0000000000000000 c000000000d52768
        GPR24: c000000000d52740 0000000000000100 c000003ca1b52000 0000000000000002
        GPR28: 0000000000000900 0000000000000000 c00000000152a0c0 c000003ca1b52000
        [1.404226] NIP [c0000000007e33f8] tg3_io_error_detected+0x308/0x340
        [1.404265] LR [c0000000007e3164] tg3_io_error_detected+0x74/0x340
      
      This patch avoids the NULL pointer dereference by moving the access after
      the netdev NULL pointer check on tg3_io_error_detected(). Also, we add a
      check for netdev being NULL on tg3_io_resume() [suggested by Michael Chan].
      
      Fixes: 0486a063 ("tg3: prevent ifup/ifdown during PCI error recovery")
      Fixes: dfc8f370 ("net/tg3: Release IRQs on permanent error")
      Tested-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: NMilton Miller <miltonm@us.ibm.com>
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Acked-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b0ff898
    • P
      spi: sc18is602: Change gpiod_set_value to gpiod_set_value_cansleep · 76cce7e3
      Phil Reid 提交于
      To avoid warning when using i2c gpio expander change call to the
      cansleep variant. There should be no issue with sleeping in the
      drivers probe function.
      Signed-off-by: NPhil Reid <preid@electromag.com.au>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      76cce7e3
    • M
      spi: pxa2xx: Fix build error because of missing header · 089bd46d
      Mika Westerberg 提交于
      Kbuild test robot reports:
      
        drivers/spi/spi-pxa2xx.c: In function ‘setup_cs’:
        drivers/spi/spi-pxa2xx.c:1190:20: error: implicit declaration of function ‘desc_to_gpio’
        ...
      
      Reason for this is the fact that those functions are declared in
      linux/gpio/consumer.h which is not included in the driver. Fix this by
      including it.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      089bd46d