Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU
authorAmadeusz SÅ\82awiÅ\84ski <amadeusz.slawinski@tieto.com>
Thu, 14 Jul 2016 08:50:23 +0000 (10:50 +0200)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:13:53 +0000 (13:13 +0000)
commit7f9f36dc74e8614b9fee22b7ebbb3404c1bbadfd
tree74dcf2201b40711f19ce8423ac97dbc4d3f2816d
parent166e5083e51b45ad8a76440ee3d526f49987cdc8
Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU

commit 23bc6ab0a0912146fd674a0becc758c3162baabc upstream.

When we retrieve imtu value from userspace we should use 16 bit pointer
cast instead of 32 as it's defined that way in headers. Fixes setsockopt
calls on big-endian platforms.

Signed-off-by: Amadeusz SÅ\82awiÅ\84ski <amadeusz.slawinski@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/bluetooth/l2cap_sock.c