Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 3 Sep 2021 22:27:32 +0000 (15:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:30 +0000 (17:25 +0200)
commit367becefb8a1b4512d6ec4d6dc7e84006f8ac773
treef2a6c9a1c20dbaebf9d932f00e8e0fb672369363
parent1864e820a5ac4747845247497d9daf8d87c9c8c4
Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg

commit 81be03e026dc0c16dc1c64e088b2a53b73caa895 upstream.

This makes use of bt_skb_sendmmsg instead using memcpy_from_msg which
is not considered safe to be used when lock_sock is held.

Also make rfcomm_dlc_send handle skb with fragments and queue them all
atomically.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/sock.c