]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Bluetooth: L2CAP: convert to getsockopt_iter
authorBreno Leitao <leitao@debian.org>
Tue, 12 May 2026 11:12:20 +0000 (04:12 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 11 Jun 2026 18:24:39 +0000 (14:24 -0400)
commitbf01627cc04b70c04a6d68eda06f836fed3078bc
tree0db369cb67060a1be527e92ce977aa69bb8c852e
parent69092990519b882127be93d5c412a737eb9f2578
Bluetooth: L2CAP: convert to getsockopt_iter

Convert L2CAP socket's getsockopt implementation to use the new
getsockopt_iter callback with sockopt_t.

Key changes:
- Replace (char __user *optval, int __user *optlen) with sockopt_t *sopt
- Use sopt->optlen for buffer length (input)
- Use copy_to_iter() instead of put_user()/copy_to_user()
- Add linux/uio.h for copy_to_iter()

The sockopt_t parameter is named sopt rather than opt to avoid
collision with the existing local u32 opt used by L2CAP_LM. The same
naming is reused for the new u32 helper in l2cap_sock_getsockopt(),
with mtu and mval helpers covering the u16 and u8 cases.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/l2cap_sock.c