1. 24 Apr, 2018 31 commits
  2. 20 Apr, 2018 9 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.9.95 · eedaf21f
      Greg Kroah-Hartman authored
      eedaf21f
    • Greg Kroah-Hartman's avatar
      Revert "net: phy: micrel: Restore led_mode and clk_sel on resume" · c3ba64bb
      Greg Kroah-Hartman authored
      This reverts commit d7ba3c00 which was
      commit 79e498a9 upstream.
      
      Turns out it breaks things, so drop it.
      Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
      Cc: Leonard Crestez <leonard.crestez@nxp.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Sasha Levin <alexander.levin@microsoft.com>
      Cc: Dan Rue <dan.rue@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c3ba64bb
    • Will Deacon's avatar
      arm64: futex: Mask __user pointers prior to dereference · 1cd969fd
      Will Deacon authored
      commit 91b2d344 upstream.
      
      The arm64 futex code has some explicit dereferencing of user pointers
      where performing atomic operations in response to a futex command. This
      patch uses masking to limit any speculative futex operations to within
      the user address space.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1cd969fd
    • Phil Elwell's avatar
      lan78xx: Correctly indicate invalid OTP · 82236561
      Phil Elwell authored
      
      [ Upstream commit 4bfc3380 ]
      
      lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP
      content, but the value gets overwritten before it is returned and the
      read goes ahead anyway. Make the read conditional as it should be
      and preserve the error code.
      
      Fixes: 55d7de9d ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
      Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      82236561
    • Stefan Hajnoczi's avatar
      vhost: fix vhost_vq_access_ok() log check · 72de9891
      Stefan Hajnoczi authored
      
      [ Upstream commit d14d2b78 ]
      
      Commit d65026c6 ("vhost: validate log
      when IOTLB is enabled") introduced a regression.  The logic was
      originally:
      
        if (vq->iotlb)
            return 1;
        return A && B;
      
      After the patch the short-circuit logic for A was inverted:
      
        if (A || vq->iotlb)
            return A;
        return B;
      
      This patch fixes the regression by rewriting the checks in the obvious
      way, no longer returning A when vq->iotlb is non-NULL (which is hard to
      understand).
      
      Reported-by: syzbot+65a84dde0214b0387ccd@syzkaller.appspotmail.com
      Cc: Jason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      72de9891
    • Tejaswi Tanikella's avatar
      slip: Check if rstate is initialized before uncompressing · 0eecffb5
      Tejaswi Tanikella authored
      
      [ Upstream commit 3f01ddb9 ]
      
      On receiving a packet the state index points to the rstate which must be
      used to fill up IP and TCP headers. But if the state index points to a
      rstate which is unitialized, i.e. filled with zeros, it gets stuck in an
      infinite loop inside ip_fast_csum trying to compute the ip checsum of a
      header with zero length.
      
      89.666953:   <2> [<ffffff9dd3e94d38>] slhc_uncompress+0x464/0x468
      89.666965:   <2> [<ffffff9dd3e87d88>] ppp_receive_nonmp_frame+0x3b4/0x65c
      89.666978:   <2> [<ffffff9dd3e89dd4>] ppp_receive_frame+0x64/0x7e0
      89.666991:   <2> [<ffffff9dd3e8a708>] ppp_input+0x104/0x198
      89.667005:   <2> [<ffffff9dd3e93868>] pppopns_recv_core+0x238/0x370
      89.667027:   <2> [<ffffff9dd4428fc8>] __sk_receive_skb+0xdc/0x250
      89.667040:   <2> [<ffffff9dd3e939e4>] pppopns_recv+0x44/0x60
      89.667053:   <2> [<ffffff9dd4426848>] __sock_queue_rcv_skb+0x16c/0x24c
      89.667065:   <2> [<ffffff9dd4426954>] sock_queue_rcv_skb+0x2c/0x38
      89.667085:   <2> [<ffffff9dd44f7358>] raw_rcv+0x124/0x154
      89.667098:   <2> [<ffffff9dd44f7568>] raw_local_deliver+0x1e0/0x22c
      89.667117:   <2> [<ffffff9dd44c8ba0>] ip_local_deliver_finish+0x70/0x24c
      89.667131:   <2> [<ffffff9dd44c92f4>] ip_local_deliver+0x100/0x10c
      
      ./scripts/faddr2line vmlinux slhc_uncompress+0x464/0x468 output:
       ip_fast_csum at arch/arm64/include/asm/checksum.h:40
       (inlined by) slhc_uncompress at drivers/net/slip/slhc.c:615
      
      Adding a variable to indicate if the current rstate is initialized. If
      such a packet arrives, move to toss state.
      Signed-off-by: default avatarTejaswi Tanikella <tejaswit@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0eecffb5
    • Ka-Cheong Poon's avatar
      rds: MP-RDS may use an invalid c_path · fc89a75c
      Ka-Cheong Poon authored
      
      [ Upstream commit a43cced9 ]
      
      rds_sendmsg() calls rds_send_mprds_hash() to find a c_path to use to
      send a message.  Suppose the RDS connection is not yet up.  In
      rds_send_mprds_hash(), it does
      
      	if (conn->c_npaths == 0)
      		wait_event_interruptible(conn->c_hs_waitq,
      					 (conn->c_npaths != 0));
      
      If it is interrupted before the connection is set up,
      rds_send_mprds_hash() will return a non-zero hash value.  Hence
      rds_sendmsg() will use a non-zero c_path to send the message.  But if
      the RDS connection ends up to be non-MP capable, the message will be
      lost as only the zero c_path can be used.
      Signed-off-by: default avatarKa-Cheong Poon <ka-cheong.poon@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fc89a75c
    • Bassem Boubaker's avatar
      cdc_ether: flag the Cinterion AHS8 modem by gemalto as WWAN · 6b61154b
      Bassem Boubaker authored
      
      [ Upstream commit 53765341 ]
      
      The Cinterion AHS8 is a 3G device with one embedded WWAN interface
      using cdc_ether as a driver.
      
      The modem is controlled via AT commands through the exposed TTYs.
      
      AT+CGDCONT write command can be used to activate or deactivate a WWAN
      connection for a PDP context defined with the same command. UE
      supports one WWAN adapter.
      Signed-off-by: default avatarBassem Boubaker <bassem.boubaker@actia.fr>
      Acked-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6b61154b
    • Marek Szyprowski's avatar
      hwmon: (ina2xx) Fix access to uninitialized mutex · ebdb0d5a
      Marek Szyprowski authored
      commit 0c4c5860 upstream.
      
      Initialize data->config_lock mutex before it is used by the driver code.
      
      This fixes following warning on Odroid XU3 boards:
      
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc7-next-20180115-00001-gb75575dee3f2 #107
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c0111504>] (unwind_backtrace) from [<c010dbec>] (show_stack+0x10/0x14)
      [<c010dbec>] (show_stack) from [<c09b3f74>] (dump_stack+0x90/0xc8)
      [<c09b3f74>] (dump_stack) from [<c0179528>] (register_lock_class+0x1c0/0x59c)
      [<c0179528>] (register_lock_class) from [<c017bd1c>] (__lock_acquire+0x78/0x1850)
      [<c017bd1c>] (__lock_acquire) from [<c017de30>] (lock_acquire+0xc8/0x2b8)
      [<c017de30>] (lock_acquire) from [<c09ca59c>] (__mutex_lock+0x60/0xa0c)
      [<c09ca59c>] (__mutex_lock) from [<c09cafd0>] (mutex_lock_nested+0x1c/0x24)
      [<c09cafd0>] (mutex_lock_nested) from [<c068b0d0>] (ina2xx_set_shunt+0x70/0xb0)
      [<c068b0d0>] (ina2xx_set_shunt) from [<c068b218>] (ina2xx_probe+0x88/0x1b0)
      [<c068b218>] (ina2xx_probe) from [<c0673d90>] (i2c_device_probe+0x1e0/0x2d0)
      [<c0673d90>] (i2c_device_probe) from [<c053a268>] (driver_probe_device+0x2b8/0x4a0)
      [<c053a268>] (driver_probe_device) from [<c053a54c>] (__driver_attach+0xfc/0x120)
      [<c053a54c>] (__driver_attach) from [<c05384cc>] (bus_for_each_dev+0x58/0x7c)
      [<c05384cc>] (bus_for_each_dev) from [<c0539590>] (bus_add_driver+0x174/0x250)
      [<c0539590>] (bus_add_driver) from [<c053b5e0>] (driver_register+0x78/0xf4)
      [<c053b5e0>] (driver_register) from [<c0675ef0>] (i2c_register_driver+0x38/0xa8)
      [<c0675ef0>] (i2c_register_driver) from [<c0102b40>] (do_one_initcall+0x48/0x18c)
      [<c0102b40>] (do_one_initcall) from [<c0e00df0>] (kernel_init_freeable+0x110/0x1d4)
      [<c0e00df0>] (kernel_init_freeable) from [<c09c8120>] (kernel_init+0x8/0x114)
      [<c09c8120>] (kernel_init) from [<c01010b4>] (ret_from_fork+0x14/0x20)
      
      Fixes: 5d389b12 ("hwmon: (ina2xx) Make calibration register value fixed")
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      [backport to v4.4.y/v4.9.y: context changes]
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ebdb0d5a