Skip to content

Commit cf2719a

Browse files
eknoesgregkh
authored andcommitted
Bluetooth: virtio_bt: Use skb_put to set length
[ Upstream commit 160fbcf ] 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: afd2daa ("Bluetooth: Add support for virtio transport driver") Signed-off-by: Soenke Huster <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 8278a87 commit cf2719a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bluetooth/virtio_bt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static void virtbt_rx_work(struct work_struct *work)
219219
if (!skb)
220220
return;
221221

222-
skb->len = len;
222+
skb_put(skb, len);
223223
virtbt_rx_handle(vbt, skb);
224224

225225
if (virtbt_add_inbuf(vbt) < 0)

0 commit comments

Comments
 (0)