]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: gpib: Use __user for user space pointers
authorDave Penkler <dpenkler@gmail.com>
Tue, 14 Jan 2025 16:54:01 +0000 (17:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2025 17:35:56 +0000 (18:35 +0100)
commit8e7ff4e7a2358fbbe3a5bbdb733e5cf5868cf1ff
tree67dd084bfa167d923f443e52f0cade450c5bc1ff
parent77b41a9342f610b90675a15aea87c8462b900404
staging: gpib: Use __user for user space pointers

The user buffers in copy_from_user, copy_to_user and some file ops
did not use the __user address space attribute.

This led to the following sparse warning, for example:
common/gpib_os.c:838:40: warning: incorrect type in argument 2 (different address spaces)
common/gpib_os.c:838:40:    expected void const [noderef] __user *from
common/gpib_os.c:838:40:    got void *

Add the __user address space attribute where needed.

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://lore.kernel.org/r/20250114165403.16410-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/common/gpib_os.c
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c