Skip to content
  1. Mar 16, 2022
    • Eric Dumazet's avatar
      sctp: fix kernel-infoleak for SCTP sockets · bbf59d7a
      Eric Dumazet authored
      [ Upstream commit 633593a8 ]
      
      syzbot reported a kernel infoleak [1] of 4 bytes.
      
      After analysis, it turned out r->idiag_expires is not initialized
      if inet_sctp_diag_fill() calls inet_diag_msg_common_fill()
      
      Make sure to clear idiag_timer/idiag_retrans/idiag_expires
      and let inet_diag_msg_sctpasoc_fill() fill them again if needed.
      
      [1]
      
      BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
      BUG: KMSAN: kernel-infoleak in copyout lib/iov_iter.c:154 [inline]
      BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x6ef/0x25a0 lib/iov_iter.c:668
       instrument_copy_to_user include/linux/instrumented.h:121 [inline]
       copyout lib/iov_iter.c:154 [inline]
       _copy_to_iter+0x6ef/0x25a0 lib/iov_iter.c:668
       copy_to_iter include/linux/uio.h:162 [inline]
       simple_copy_to_iter+0xf3/0x140 net/core/datagram.c:519
       __skb_datagram_iter+0x2d5/0x11b0 net/core/datagram.c:425
       skb_copy_datagram_iter+0xdc/0x270 net/core/datagram.c:533
       skb_copy_datagram_msg include/linux/skbuff.h:3696 [inline]
       netlink_recvmsg+0x669/0x1c80 net/netlink/af_netlink.c:1977
       sock_recvmsg_nosec net/socket.c:948 [inline]
       sock_recvmsg net/socket.c:966 [inline]
       __sys_recvfrom+0x795/0xa10 net/socket.c:2097
       __do_sys_recvfrom net/socket.c:2115 [inline]
       __se_sys_recvfrom net/socket.c:2111 [inline]
       __x64_sys_recvfrom+0x19d/0x210 net/socket.c:2111
       do_syscall_x64 arch/x86/entry/common.c:51 [inline]
       do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Uninit was created at:
       slab_post_alloc_hook mm/slab.h:737 [inline]
       slab_alloc_node mm/slub.c:3247 [inline]
       __kmalloc_node_track_caller+0xe0c/0x1510 mm/slub.c:4975
       kmalloc_reserve net/core/skbuff.c:354 [inline]
       __alloc_skb+0x545/0xf90 net/core/skbuff.c:426
       alloc_skb include/linux/skbuff.h:1158 [inline]
       netlink_dump+0x3e5/0x16c0 net/netlink/af_netlink.c:2248
       __netlink_dump_start+0xcf8/0xe90 net/netlink/af_netlink.c:2373
       netlink_dump_start include/linux/netlink.h:254 [inline]
       inet_diag_handler_cmd+0x2e7/0x400 net/ipv4/inet_diag.c:1341
       sock_diag_rcv_msg+0x24a/0x620
       netlink_rcv_skb+0x40c/0x7e0 net/netlink/af_netlink.c:2494
       sock_diag_rcv+0x63/0x80 net/core/sock_diag.c:277
       netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
       netlink_unicast+0x1093/0x1360 net/netlink/af_netlink.c:1343
       netlink_sendmsg+0x14d9/0x1720 net/netlink/af_netlink.c:1919
       sock_sendmsg_nosec net/socket.c:705 [inline]
       sock_sendmsg net/socket.c:725 [inline]
       sock_write_iter+0x594/0x690 net/socket.c:1061
       do_iter_readv_writev+0xa7f/0xc70
       do_iter_write+0x52c/0x1500 fs/read_write.c:851
       vfs_writev fs/read_write.c:924 [inline]
       do_writev+0x645/0xe00 fs/read_write.c:967
       __do_sys_writev fs/read_write.c:1040 [inline]
       __se_sys_writev fs/read_write.c:1037 [inline]
       __x64_sys_writev+0xe5/0x120 fs/read_write.c:1037
       do_syscall_x64 arch/x86/entry/common.c:51 [inline]
       do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Bytes 68-71 of 2508 are uninitialized
      Memory access of size 2508 starts at ffff888114f9b000
      Data copied to user address 00007f7fe09ff2e0
      
      CPU: 1 PID: 3478 Comm: syz-executor306 Not tainted 5.17.0-rc4-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      
      Fixes: 8f840e47
      
       ("sctp: add the sctp_diag.c file")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Reviewed-by: default avatarXin Long <lucien.xin@gmail.com>
      Link: https://lore.kernel.org/r/20220310001145.297371-1-eric.dumazet@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      bbf59d7a
    • Clément Léger's avatar
      net: phy: DP83822: clear MISR2 register to disable interrupts · e9343719
      Clément Léger authored
      [ Upstream commit 37c9d66c ]
      
      MISR1 was cleared twice but the original author intention was probably
      to clear MISR1 & MISR2 to completely disable interrupts. Fix it to
      clear MISR2.
      
      Fixes: 87461f7a
      
       ("net: phy: DP83822 initial driver submission")
      Signed-off-by: default avatarClément Léger <clement.leger@bootlin.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20220309142228.761153-1-clement.leger@bootlin.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      e9343719
    • Miaoqian Lin's avatar
      gianfar: ethtool: Fix refcount leak in gfar_get_ts_info · f7b3b520
      Miaoqian Lin authored
      [ Upstream commit 2ac5b58e ]
      
      The of_find_compatible_node() function returns a node pointer with
      refcount incremented, We should use of_node_put() on it when done
      Add the missing of_node_put() to release the refcount.
      
      Fixes: 7349a74e
      
       ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
      Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
      Reviewed-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Reviewed-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Link: https://lore.kernel.org/r/20220310015313.14938-1-linmq006@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      f7b3b520
    • Mark Featherston's avatar
      gpio: ts4900: Do not set DAT and OE together · 54fd6b2e
      Mark Featherston authored
      [ Upstream commit 03fe0035 ]
      
      This works around an issue with the hardware where both OE and
      DAT are exposed in the same register. If both are updated
      simultaneously, the harware makes no guarantees that OE or DAT
      will actually change in any given order and may result in a
      glitch of a few ns on a GPIO pin when changing direction and value
      in a single write.
      
      Setting direction to input now only affects OE bit. Setting
      direction to output updates DAT first, then OE.
      
      Fixes: 9c668632
      
       ("gpio: add Technologic I2C-FPGA gpio support")
      Signed-off-by: default avatarMark Featherston <mark@embeddedTS.com>
      Signed-off-by: default avatarKris Bahnsen <kris@embeddedTS.com>
      Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      54fd6b2e
    • Guillaume Nault's avatar
      selftests: pmtu.sh: Kill tcpdump processes launched by subshell. · 82b298e0
      Guillaume Nault authored
      [ Upstream commit 18dfc667 ]
      
      The cleanup() function takes care of killing processes launched by the
      test functions. It relies on variables like ${tcpdump_pids} to get the
      relevant PIDs. But tests are run in their own subshell, so updated
      *_pids values are invisible to other shells. Therefore cleanup() never
      sees any process to kill:
      
      $ ./tools/testing/selftests/net/pmtu.sh -t pmtu_ipv4_exception
      TEST: ipv4: PMTU exceptions                                         [ OK ]
      TEST: ipv4: PMTU exceptions - nexthop objects                       [ OK ]
      
      $ pgrep -af tcpdump
      6084 tcpdump -s 0 -i veth_A-R1 -w pmtu_ipv4_exception_veth_A-R1.pcap
      6085 tcpdump -s 0 -i veth_R1-A -w pmtu_ipv4_exception_veth_R1-A.pcap
      6086 tcpdump -s 0 -i veth_R1-B -w pmtu_ipv4_exception_veth_R1-B.pcap
      6087 tcpdump -s 0 -i veth_B-R1 -w pmtu_ipv4_exception_veth_B-R1.pcap
      6088 tcpdump -s 0 -i veth_A-R2 -w pmtu_ipv4_exception_veth_A-R2.pcap
      6089 tcpdump -s 0 -i veth_R2-A -w pmtu_ipv4_exception_veth_R2-A.pcap
      6090 tcpdump -s 0 -i veth_R2-B -w pmtu_ipv4_exception_veth_R2-B.pcap
      6091 tcpdump -s 0 -i veth_B-R2 -w pmtu_ipv4_exception_veth_B-R2.pcap
      6228 tcpdump -s 0 -i veth_A-R1 -w pmtu_ipv4_exception_veth_A-R1.pcap
      6229 tcpdump -s 0 -i veth_R1-A -w pmtu_ipv4_exception_veth_R1-A.pcap
      6230 tcpdump -s 0 -i veth_R1-B -w pmtu_ipv4_exception_veth_R1-B.pcap
      6231 tcpdump -s 0 -i veth_B-R1 -w pmtu_ipv4_exception_veth_B-R1.pcap
      6232 tcpdump -s 0 -i veth_A-R2 -w pmtu_ipv4_exception_veth_A-R2.pcap
      6233 tcpdump -s 0 -i veth_R2-A -w pmtu_ipv4_exception_veth_R2-A.pcap
      6234 tcpdump -s 0 -i veth_R2-B -w pmtu_ipv4_exception_veth_R2-B.pcap
      6235 tcpdump -s 0 -i veth_B-R2 -w pmtu_ipv4_exception_veth_B-R2.pcap
      
      Fix this by running cleanup() in the context of the test subshell.
      Now that each test cleans the environment after completion, there's no
      need for calling cleanup() again when the next test starts. So let's
      drop it from the setup() function. This is okay because cleanup() is
      also called when pmtu.sh starts, so even the first test starts in a
      clean environment.
      
      Also, use tcpdump's immediate mode. Otherwise it might not have time to
      process buffered packets, resulting in missing packets or even empty
      pcap files for short tests.
      
      Note: PAUSE_ON_FAIL is still evaluated before cleanup(), so one can
      still inspect the test environment upon failure when using -p.
      
      Fixes: a92a0a7b
      
       ("selftests: pmtu: Simplify cleanup and namespace names")
      Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
      Reviewed-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      82b298e0
    • Pavel Skripkin's avatar
      NFC: port100: fix use-after-free in port100_send_complete · cd2a5c0d
      Pavel Skripkin authored
      [ Upstream commit f80cfe2f
      
       ]
      
      Syzbot reported UAF in port100_send_complete(). The root case is in
      missing usb_kill_urb() calls on error handling path of ->probe function.
      
      port100_send_complete() accesses devm allocated memory which will be
      freed on probe failure. We should kill this urbs before returning an
      error from probe function to prevent reported use-after-free
      
      Fail log:
      
      BUG: KASAN: use-after-free in port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935
      Read of size 1 at addr ffff88801bb59540 by task ksoftirqd/2/26
      ...
      Call Trace:
       <TASK>
       __dump_stack lib/dump_stack.c:88 [inline]
       dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
       print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255
       __kasan_report mm/kasan/report.c:442 [inline]
       kasan_report.cold+0x83/0xdf mm/kasan/report.c:459
       port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935
       __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670
      
      ...
      
      Allocated by task 1255:
       kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
       kasan_set_track mm/kasan/common.c:45 [inline]
       set_alloc_info mm/kasan/common.c:436 [inline]
       ____kasan_kmalloc mm/kasan/common.c:515 [inline]
       ____kasan_kmalloc mm/kasan/common.c:474 [inline]
       __kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:524
       alloc_dr drivers/base/devres.c:116 [inline]
       devm_kmalloc+0x96/0x1d0 drivers/base/devres.c:823
       devm_kzalloc include/linux/device.h:209 [inline]
       port100_probe+0x8a/0x1320 drivers/nfc/port100.c:1502
      
      Freed by task 1255:
       kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
       kasan_set_track+0x21/0x30 mm/kasan/common.c:45
       kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370
       ____kasan_slab_free mm/kasan/common.c:366 [inline]
       ____kasan_slab_free+0xff/0x140 mm/kasan/common.c:328
       kasan_slab_free include/linux/kasan.h:236 [inline]
       __cache_free mm/slab.c:3437 [inline]
       kfree+0xf8/0x2b0 mm/slab.c:3794
       release_nodes+0x112/0x1a0 drivers/base/devres.c:501
       devres_release_all+0x114/0x190 drivers/base/devres.c:530
       really_probe+0x626/0xcc0 drivers/base/dd.c:670
      
      Reported-and-tested-by: default avatar <syzbot+16bcb127fb73baeecb14@syzkaller.appspotmail.com>
      Fixes: 0347a6ab
      
       ("NFC: port100: Commands mechanism implementation")
      Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
      Link: https://lore.kernel.org/r/20220308185007.6987-1-paskripkin@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      cd2a5c0d
    • Moshe Shemesh's avatar
      net/mlx5: Fix a race on command flush flow · 1a401792
      Moshe Shemesh authored
      [ Upstream commit 063bd355 ]
      
      Fix a refcount use after free warning due to a race on command entry.
      Such race occurs when one of the commands releases its last refcount and
      frees its index and entry while another process running command flush
      flow takes refcount to this command entry. The process which handles
      commands flush may see this command as needed to be flushed if the other
      process released its refcount but didn't release the index yet. Fix it
      by adding the needed spin lock.
      
      It fixes the following warning trace:
      
      refcount_t: addition on 0; use-after-free.
      WARNING: CPU: 11 PID: 540311 at lib/refcount.c:25 refcount_warn_saturate+0x80/0xe0
      ...
      RIP: 0010:refcount_warn_saturate+0x80/0xe0
      ...
      Call Trace:
       <TASK>
       mlx5_cmd_trigger_completions+0x293/0x340 [mlx5_core]
       mlx5_cmd_flush+0x3a/0xf0 [mlx5_core]
       enter_error_state+0x44/0x80 [mlx5_core]
       mlx5_fw_fatal_reporter_err_work+0x37/0xe0 [mlx5_core]
       process_one_work+0x1be/0x390
       worker_thread+0x4d/0x3d0
       ? rescuer_thread+0x350/0x350
       kthread+0x141/0x160
       ? set_kthread_struct+0x40/0x40
       ret_from_fork+0x1f/0x30
       </TASK>
      
      Fixes: 50b2412b
      
       ("net/mlx5: Avoid possible free of command entry while timeout comp handler")
      Signed-off-by: default avatarMoshe Shemesh <moshe@nvidia.com>
      Reviewed-by: default avatarEran Ben Elisha <eranbe@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      1a401792
    • Mohammad Kabat's avatar
      net/mlx5: Fix size field in bufferx_reg struct · 6102e2e5
      Mohammad Kabat authored
      [ Upstream commit ac77998b ]
      
      According to HW spec the field "size" should be 16 bits
      in bufferx register.
      
      Fixes: e281682b
      
       ("net/mlx5_core: HW data structs/types definitions cleanup")
      Signed-off-by: default avatarMohammad Kabat <mohammadkab@nvidia.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      6102e2e5
    • Duoming Zhou's avatar
      ax25: Fix NULL pointer dereference in ax25_kill_by_device · 0a64aea5
      Duoming Zhou authored
      [ Upstream commit 71171ac8 ]
      
      When two ax25 devices attempted to establish connection, the requester use ax25_create(),
      ax25_bind() and ax25_connect() to initiate connection. The receiver use ax25_rcv() to
      accept connection and use ax25_create_cb() in ax25_rcv() to create ax25_cb, but the
      ax25_cb->sk is NULL. When the receiver is detaching, a NULL pointer dereference bug
      caused by sock_hold(sk) in ax25_kill_by_device() will happen. The corresponding
      fail log is shown below:
      
      ===============================================================
      BUG: KASAN: null-ptr-deref in ax25_device_event+0xfd/0x290
      Call Trace:
      ...
      ax25_device_event+0xfd/0x290
      raw_notifier_call_chain+0x5e/0x70
      dev_close_many+0x174/0x220
      unregister_netdevice_many+0x1f7/0xa60
      unregister_netdevice_queue+0x12f/0x170
      unregister_netdev+0x13/0x20
      mkiss_close+0xcd/0x140
      tty_ldisc_release+0xc0/0x220
      tty_release_struct+0x17/0xa0
      tty_release+0x62d/0x670
      ...
      
      This patch add condition check in ax25_kill_by_device(). If s->sk is
      NULL, it will goto if branch to kill device.
      
      Fixes: 4e0f718d
      
       ("ax25: improve the incomplete fix to avoid UAF and NPD bugs")
      Reported-by: default avatarThomas Osterried <thomas@osterried.de>
      Signed-off-by: default avatarDuoming Zhou <duoming@zju.edu.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      0a64aea5
    • 蒋家盛's avatar
      net: ethernet: lpc_eth: Handle error for clk_enable · 45bfd0a9
      蒋家盛 authored
      [ Upstream commit 2169b792 ]
      
      As the potential failure of the clk_enable(),
      it should be better to check it and return error
      if fails.
      
      Fixes: b7370112
      
       ("lpc32xx: Added ethernet driver")
      Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      45bfd0a9
    • 蒋家盛's avatar
      net: ethernet: ti: cpts: Handle error for clk_enable · e84d37af
      蒋家盛 authored
      [ Upstream commit 6babfc6e ]
      
      As the potential failure of the clk_enable(),
      it should be better to check it and return error
      if fails.
      
      Fixes: 8a2c9a5a
      
       ("net: ethernet: ti: cpts: rework initialization/deinitialization")
      Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      e84d37af
    • Miaoqian Lin's avatar
      ethernet: Fix error handling in xemaclite_of_probe · 8ee065a7
      Miaoqian Lin authored
      [ Upstream commit b19ab4b3 ]
      
      This node pointer is returned by of_parse_phandle() with refcount
      incremented in this function. Calling of_node_put() to avoid the
      refcount leak. As the remove function do.
      
      Fixes: 5cdaaa12
      
       ("net: emaclite: adding MDIO and phy lib support")
      Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20220308024751.2320-1-linmq006@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      8ee065a7
    • Joel Stanley's avatar
      ARM: dts: aspeed: Fix AST2600 quad spi group · 4c0b769d
      Joel Stanley authored
      [ Upstream commit 2f6edb6b ]
      
      Requesting quad mode for the FMC resulted in an error:
      
        &fmc {
               status = "okay";
       +       pinctrl-names = "default";
       +       pinctrl-0 = <&pinctrl_fwqspi_default>'
      
      [    0.742963] aspeed-g6-pinctrl 1e6e2000.syscon:pinctrl: invalid function FWQSPID in map table
      
      
      This is because the quad mode pins are a group of pins, not a function.
      
      After applying this patch we can request the pins and the QSPI data
      lines are muxed:
      
       # cat /sys/kernel/debug/pinctrl/1e6e2000.syscon\:pinctrl-aspeed-g6-pinctrl/pinmux-pins |grep 1e620000.spi
       pin 196 (AE12): device 1e620000.spi function FWSPID group FWQSPID
       pin 197 (AF12): device 1e620000.spi function FWSPID group FWQSPID
       pin 240 (Y1): device 1e620000.spi function FWSPID group FWQSPID
       pin 241 (Y2): device 1e620000.spi function FWSPID group FWQSPID
       pin 242 (Y3): device 1e620000.spi function FWSPID group FWQSPID
       pin 243 (Y4): device 1e620000.spi function FWSPID group FWQSPID
      
      Fixes: f510f04c
      
       ("ARM: dts: aspeed: Add AST2600 pinmux nodes")
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Reviewed-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Link: https://lore.kernel.org/r/20220304011010.974863-1-joel@jms.id.au
      Link: https://lore.kernel.org/r/20220304011010.974863-1-joel@jms.id.au'
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      4c0b769d
    • Jernej Skrabec's avatar
      drm/sun4i: mixer: Fix P010 and P210 format numbers · 7db2bc08
      Jernej Skrabec authored
      [ Upstream commit 9470c29f ]
      
      It turns out that DE3 manual has inverted YUV and YVU format numbers for
      P010 and P210. Invert them.
      
      This was tested by playing video decoded to P010 and additionally
      confirmed by looking at BSP driver source.
      
      Fixes: 169ca4b3
      
       ("drm/sun4i: Add separate DE3 VI layer formats")
      Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220228181436.1424550-1-jernej.skrabec@gmail.com
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      7db2bc08
    • Tom Rix's avatar
      qed: return status of qed_iov_get_link · 7f8f5641
      Tom Rix authored
      [ Upstream commit d9dc0c84 ]
      
      Clang static analysis reports this issue
      qed_sriov.c:4727:19: warning: Assigned value is
        garbage or undefined
        ivi->max_tx_rate = tx_rate ? tx_rate : link.speed;
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      link is only sometimes set by the call to qed_iov_get_link()
      qed_iov_get_link fails without setting link or returning
      status.  So change the decl to return status.
      
      Fixes: 73390ac9
      
       ("qed*: support ndo_get_vf_config")
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      7f8f5641
    • Jia-Ju Bai's avatar
      net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare() · f59e7860
      Jia-Ju Bai authored
      [ Upstream commit e0058f0f ]
      
      The function dma_alloc_coherent() in qed_vf_hw_prepare() can fail, so
      its return value should be checked.
      
      Fixes: 1408cc1f
      
       ("qed: Introduce VFs")
      Reported-by: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      f59e7860
    • Xie Yongji's avatar
      virtio-blk: Don't use MAX_DISCARD_SEGMENTS if max_discard_seg is zero · 45d470e4
      Xie Yongji authored
      [ Upstream commit dacc73ed ]
      
      Currently the value of max_discard_segment will be set to
      MAX_DISCARD_SEGMENTS (256) with no basis in hardware if device
      set 0 to max_discard_seg in configuration space. It's incorrect
      since the device might not be able to handle such large descriptors.
      To fix it, let's follow max_segments restrictions in this case.
      
      Fixes: 1f23816b
      
       ("virtio_blk: add discard and write zeroes support")
      Signed-off-by: default avatarXie Yongji <xieyongji@bytedance.com>
      Link: https://lore.kernel.org/r/20220304100058.116-1-xieyongji@bytedance.com
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      45d470e4
    • Pali Rohár's avatar
      arm64: dts: armada-3720-turris-mox: Add missing ethernet0 alias · 278b2c7d
      Pali Rohár authored
      [ Upstream commit a0e897d1 ]
      
      U-Boot uses ethernet* aliases for setting MAC addresses. Therefore define
      also alias for ethernet0.
      
      Fixes: 7109d817
      
       ("arm64: dts: marvell: add DTS for Turris Mox")
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      278b2c7d
    • Taniya Das's avatar
      clk: qcom: gdsc: Add support to update GDSC transition delay · f62922b6
      Taniya Das authored
      [ Upstream commit 4e7c4d36 ]
      
      GDSCs have multiple transition delays which are used for the GDSC FSM
      states. Older targets/designs required these values to be updated from
      gdsc code to certain default values for the FSM state to work as
      expected. But on the newer targets/designs the values updated from the
      GDSC driver can hamper the FSM state to not work as expected.
      
      On SC7180 we observe black screens because the gdsc is being
      enabled/disabled very rapidly and the GDSC FSM state does not work as
      expected. This is due to the fact that the GDSC reset value is being
      updated from SW.
      
      Thus add support to update the transition delay from the clock
      controller gdscs as required.
      
      Fixes: 45dd0e55
      
       ("clk: qcom: Add support for GDSCs)
      Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
      Link: https://lore.kernel.org/r/20220223185606.3941-1-tdas@codeaurora.org
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      f62922b6
  2. Mar 11, 2022