1. 06 3月, 2017 1 次提交
    • D
      HID: chicony: Add support for another ASUS Zen AiO keyboard · f2f10b7e
      Daniel Drake 提交于
      Add support for media keys on the keyboard that comes with the
      Asus V221ID and ZN241IC All In One computers.
      
      The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP.
      
      This device is not visibly branded as Chicony, and the USB Vendor ID
      suggests that it is a JESS device. However this seems like the right place
      to put it: the usage codes are identical to the currently supported
      devices, and this driver already supports the ASUS AIO keyboard AK1D.
      Signed-off-by: NDaniel Drake <drake@endlessm.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f2f10b7e
  2. 22 2月, 2017 1 次提交
  3. 20 2月, 2017 2 次提交
    • A
      Fix missing sanity check in /dev/sg · 137d01df
      Al Viro 提交于
      What happens is that a write to /dev/sg is given a request with non-zero
      ->iovec_count combined with zero ->dxfer_len.  Or with ->dxferp pointing
      to an array full of empty iovecs.
      
      Having write permission to /dev/sg shouldn't be equivalent to the
      ability to trigger BUG_ON() while holding spinlocks...
      
      Found by Dmitry Vyukov and syzkaller.
      
      [ The BUG_ON() got changed to a WARN_ON_ONCE(), but this fixes the
        underlying issue.  - Linus ]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Reported-by: NDmitry Vyukov <dvyukov@google.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      137d01df
    • J
      scsi: don't BUG_ON() empty DMA transfers · fd3fc0b4
      Johannes Thumshirn 提交于
      Don't crash the machine just because of an empty transfer. Use WARN_ON()
      combined with returning an error.
      
      Found by Dmitry Vyukov and syzkaller.
      
      [ Changed to "WARN_ON_ONCE()". Al has a patch that should fix the root
        cause, but a BUG_ON() is not acceptable in any case, and a WARN_ON()
        might still be a cause of excessive log spamming.
      
        NOTE! If this warning ever triggers, we may end up leaking resources,
        since this doesn't bother to try to clean the command up. So this
        WARN_ON_ONCE() triggering does imply real problems. But BUG_ON() is
        much worse.
      
        People really need to stop using BUG_ON() for "this shouldn't ever
        happen". It makes pretty much any bug worse.     - Linus ]
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reported-by: NDmitry Vyukov <dvyukov@google.com>
      Cc: James Bottomley <jejb@linux.vnet.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd3fc0b4
  4. 19 2月, 2017 1 次提交
  5. 18 2月, 2017 2 次提交
    • P
      vxlan: fix oops in dev_fill_metadata_dst · 22f0708a
      Paolo Abeni 提交于
      Since the commit 0c1d70af ("net: use dst_cache for vxlan device")
      vxlan_fill_metadata_dst() calls vxlan_get_route() passing a NULL
      dst_cache pointer, so the latter should explicitly check for
      valid dst_cache ptr. Unfortunately the commit d71785ff ("net: add
      dst_cache to ovs vxlan lwtunnel") removed said check.
      
      As a result is possible to trigger a null pointer access calling
      vxlan_fill_metadata_dst(), e.g. with:
      
      ovs-vsctl add-br ovs-br0
      ovs-vsctl add-port ovs-br0 vxlan0 -- set interface vxlan0 \
      	type=vxlan options:remote_ip=192.168.1.1 \
      	options:key=1234 options:dst_port=4789 ofport_request=10
      ip address add dev ovs-br0 172.16.1.2/24
      ovs-vsctl set Bridge ovs-br0 ipfix=@i -- --id=@i create IPFIX \
      	targets=\"172.16.1.1:1234\" sampling=1
      iperf -c 172.16.1.1 -u -l 1000 -b 10M -t 1 -p 1234
      
      This commit addresses the issue passing to vxlan_get_route() the
      dst_cache already available into the lwt info processed by
      vxlan_fill_metadata_dst().
      
      Fixes: d71785ff ("net: add dst_cache to ovs vxlan lwtunnel")
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22f0708a
    • D
      dpaa_eth: small leak on error · 785f3577
      Dan Carpenter 提交于
      This should be >= instead of > here.  It means that we don't increment
      the free count enough so it becomes off by one.
      
      Fixes: 9ad1a374 ("dpaa_eth: add support for DPAA Ethernet")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      785f3577
  6. 17 2月, 2017 6 次提交
  7. 16 2月, 2017 6 次提交
    • M
      hwmon: (sht15) Add device tree support · 2f1736ff
      Marco Franchi 提交于
      Allow the driver to work with device tree support.
      
      Based on initial patch submission from Peter Fox.
      
      Tested on a imx7d-sdb board connected to a SHT15 board via Mikro Bus.
      Signed-off-by: NMarco Franchi <marco.franchi@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      2f1736ff
    • Y
      EDAC, mce_amd: Print IPID and Syndrome on a separate line · 75bf2f64
      Yazen Ghannam 提交于
      Currently, the IPID and Syndrome are printed on the same line as the
      Address. There are cases when we can have a valid Syndrome but not a
      valid Address.
      
      For example, the MCA_SYND register can be used to hold more detailed
      error info that the hardware folks can use. It's not just DRAM ECC
      syndromes. There are some error types that aren't related to memory that
      may have valid syndromes, like some errors related to links in the Data
      Fabric, etc.
      
      In these cases, the IPID and Syndrome are not printed at the same log
      level as the rest of the stanza, so users won't see them on the console.
      
      Console:
        [Hardware Error]: CPU:16 (17:1:0) MC22_STATUS[Over|CE|MiscV|-|-|-|-|SyndV|-]: 0xd82000000002080b
        [Hardware Error]: Power, Interrupts, etc. Extended Error Code: 2
      
      Dmesg:
        [Hardware Error]: CPU:16 (17:1:0) MC22_STATUS[Over|CE|MiscV|-|-|-|-|SyndV|-]: 0xd82000000002080b
        , Syndrome: 0x000000010b404000, IPID: 0x0001002e00000002
        [Hardware Error]: Power, Interrupts, etc. Extended Error Code: 2
      
      Print the IPID first and on a new line. The IPID should always be
      printed on SMCA systems. The Syndrome will then be printed with the IPID
      and at the same log level when valid:
      
        [Hardware Error]: CPU:16 (17:1:0) MC22_STATUS[Over|CE|MiscV|-|-|-|-|SyndV|-]: 0xd82000000002080b
        [Hardware Error]: IPID: 0x0001002e00000002, Syndrome: 0x000000010b404000
        [Hardware Error]: Power, Interrupts, etc. Extended Error Code: 2
      Signed-off-by: NYazen Ghannam <Yazen.Ghannam@amd.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Link: http://lkml.kernel.org/r/1487192182-2474-1-git-send-email-Yazen.Ghannam@amd.comSigned-off-by: NBorislav Petkov <bp@suse.de>
      75bf2f64
    • T
      ibmvnic: Fix endian errors in error reporting output · 75224c93
      Thomas Falcon 提交于
      Error reports received from firmware were not being converted from
      big endian values, leading to bogus error codes reported on little
      endian systems.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75224c93
    • T
      ibmvnic: Fix endian error when requesting device capabilities · 28f4d165
      Thomas Falcon 提交于
      When a vNIC client driver requests a faulty device setting, the
      server returns an acceptable value for the client to request.
      This 64 bit value was incorrectly being swapped as a 32 bit value,
      resulting in loss of data. This patch corrects that by using
      the 64 bit swap function.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28f4d165
    • A
      net: xilinx_emaclite: fix freezes due to unordered I/O · acf138f1
      Anssi Hannula 提交于
      The xilinx_emaclite uses __raw_writel and __raw_readl for register
      accesses. Those functions do not imply any kind of memory barriers and
      they may be reordered.
      
      The driver does not seem to take that into account, though, and the
      driver does not satisfy the ordering requirements of the hardware.
      For clear examples, see xemaclite_mdio_write() and xemaclite_mdio_read()
      which try to set MDIO address before initiating the transaction.
      
      I'm seeing system freezes with the driver with GCC 5.4 and current
      Linux kernels on Zynq-7000 SoC immediately when trying to use the
      interface.
      
      In commit 123c1407 ("net: emaclite: Do not use microblaze and ppc
      IO functions") the driver was switched from non-generic
      in_be32/out_be32 (memory barriers, big endian) to
      __raw_readl/__raw_writel (no memory barriers, native endian), so
      apparently the device follows system endianness and the driver was
      originally written with the assumption of memory barriers.
      
      Rather than try to hunt for each case of missing barrier, just switch
      the driver to use iowrite32/ioread32/iowrite32be/ioread32be depending
      on endianness instead.
      
      Tested on little-endian Zynq-7000 ARM SoC FPGA.
      Signed-off-by: NAnssi Hannula <anssi.hannula@bitwise.fi>
      Fixes: 123c1407 ("net: emaclite: Do not use microblaze and ppc IO
      functions")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acf138f1
    • A
      net: xilinx_emaclite: fix receive buffer overflow · cd224553
      Anssi Hannula 提交于
      xilinx_emaclite looks at the received data to try to determine the
      Ethernet packet length but does not properly clamp it if
      proto_type == ETH_P_IP or 1500 < proto_type <= 1518, causing a buffer
      overflow and a panic via skb_panic() as the length exceeds the allocated
      skb size.
      
      Fix those cases.
      
      Also add an additional unconditional check with WARN_ON() at the end.
      Signed-off-by: NAnssi Hannula <anssi.hannula@bitwise.fi>
      Fixes: bb81b2dd ("net: add Xilinx emac lite device driver")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd224553
  8. 15 2月, 2017 8 次提交
  9. 14 2月, 2017 6 次提交
  10. 13 2月, 2017 1 次提交
  11. 12 2月, 2017 3 次提交
  12. 11 2月, 2017 3 次提交
    • G
      hwmon: (it87) Add support for IT8792E · e531ffc0
      Guenter Roeck 提交于
      The chip is similar to IT8732E, but supports only three fans
      and pwm outputs instead of four (the driver currently does not
      support the 4th fan and pwm output of IT8732E).
      
      Note that the chip ID is 0x8733, not 0x8792 as one would expect.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      e531ffc0
    • G
      hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers · 4c7b8ca1
      Guenter Roeck 提交于
      In IT8620E, after setting pwm control to manual, it was observed that
      pwm values for fan 4..6 have reversed results (writing 0 results in fans
      running at full speed, writing 255 results in fans turned off).
      
      With the new PWM control, pwm polarity for pwm control 4..6 is specified
      in its pwm control registers. Those registers are overwritten when setting
      the pwm mode or the temperature mapping. Do not touch bit 2..6 of pwm
      control registers on register writes to fix the problem.
      
      Cc: stable@vger.kernel.org # 4.9+
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      4c7b8ca1
    • G
      hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628 · d66777ca
      Guenter Roeck 提交于
      pwm4 is enabled if bit 2 of GPIO control register 4 is disabled,
      not when it is enabled. Since the check is for the skip condition,
      it is reversed. This applies to both IT8620 and IT8628.
      
      Fixes: 36c4d98a ("hwmon: (it87) Add support for all pwm channels ...")
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      d66777ca