aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-05-18 14:06:31 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-06-10 18:54:23 +0100
commitea37ee3a1561355fa94dbf574305c568fc23d560 (patch)
tree7d545bec9ae26fa0fa4b899e35aeb60b904f864c /sound
parent51c6aad4190b47a91f1f164fb4ab7999f886ce2c (diff)
media: v4l2-ioctl.c: fix incorrect error path
If allocating array_buf fails, or copying data from userspace into that buffer fails, then just free memory and return the error. Don't attempt to call video_put_user() since there is no point, and it would copy back data on error even if INFO_FL_ALWAYS_COPY wasn't set. So if writing the array back to userspace fails, then don't go to out_array_args, instead just continue with the regular code that just returns the error unless 'always_copy' is set. Update the VIDIOC_G/S/TRY_EXT_CTRLS ioctls to set the ALWAYS_COPY flag since they now need it. Before this worked due to this buggy code, but now that that is fixed these ioctls need to set this flag explicitly. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions

Privacy Policy