]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
Bluetooth: virtio_bt: Use skb_put to set length
authorSoenke Huster <soenke.huster@eknoes.de>
Wed, 12 Oct 2022 07:45:06 +0000 (09:45 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 6 Dec 2022 13:45:34 +0000 (14:45 +0100)
commita8dfdf639fcaa383a6aba3a8ef82ad9362af3122
treed405e2c60210207fddcb95ad249f4dcaec09da8b
parentef729d8412828465cd9e11ab1e0bc3e3f35bc5a6
Bluetooth: virtio_bt: Use skb_put to set length

BugLink: https://bugs.launchpad.net/bugs/1998843
[ Upstream commit 160fbcf3bfb93c3c086427f9f4c8bc70f217e9be ]

By using skb_put we ensure that skb->tail is set
correctly. Currently, skb->tail is always zero, which
leads to errors, such as the following page fault in
rfcomm_recv_frame:

    BUG: unable to handle page fault for address: ffffed1021de29ff
    #PF: supervisor read access in kernel mode
    #PF: error_code(0x0000) - not-present page
    RIP: 0010:rfcomm_run+0x831/0x4040 (net/bluetooth/rfcomm/core.c:1751)

Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver")
Signed-off-by: Soenke Huster <soenke.huster@eknoes.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/bluetooth/virtio_bt.c