Re: [PATCH] virtio: nsm: fix raw ioctl copy error path

From: Arnd Bergmann

Date: Thu Jun 25 2026 - 01:41:18 EST


On Wed, Jun 24, 2026, at 19:35, Yousef Alhouseen wrote:
> nsm_dev_ioctl() uses a common exit path which unlocks nsm->lock.
>
> A failed copy_from_user() reaches that path before the mutex is locked.
>
> Return -EFAULT directly for that pre-lock failure.
>
> Signed-off-by: Yousef Alhouseen <alhouseenyousef@xxxxxxxxx>
> ---

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>