Re: [PATCH 2/2] x86/uaccess: Fix casting in put_user
From: Dave Hansen
Date: Tue Aug 25 2026 - 17:08:41 EST
On 8/25/26 13:02, Ricardo Ribalda wrote:
> Recent versions of smatch preserved the address space qualifiers with
> typeof()[1].
>
> This fix has discovered an invalid casting in put_user.
>
> This patch fixes tens of smatch errors like the following:
> drivers/media/usb/uvc/uvc_v4l2.c:1112:13: warning: incorrect type in argument 2 (different address spaces)
> drivers/media/usb/uvc/uvc_v4l2.c:1112:13: expected void const *from
> drivers/media/usb/uvc/uvc_v4l2.c:1112:13: got unsigned int __user *
Could we beef up the changelog here a bit, please?
What _is_ the invalid casting?
What is the fix?
Why does it work?