Patch "media: v4l2-subdev: Fix a 64bit bug" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: v4l2-subdev: Fix a 64bit bug

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-v4l2-subdev-fix-a-64bit-bug.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 60de0085943170a49611583a1aeb08a1b781cb0c
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Fri Nov 3 10:39:24 2023 +0300

    media: v4l2-subdev: Fix a 64bit bug
    
    [ Upstream commit 5d33213fac5929a2e7766c88d78779fd443b0fe8 ]
    
    The problem is this line here from subdev_do_ioctl().
    
            client_cap->capabilities &= ~V4L2_SUBDEV_CLIENT_CAP_STREAMS;
    
    The "client_cap->capabilities" variable is a u64.  The AND operation
    is supposed to clear out the V4L2_SUBDEV_CLIENT_CAP_STREAMS flag.  But
    because it's a 32 bit variable it accidentally clears out the high 32
    bits as well.
    
    Currently we only use the first bit and none of the upper bits so this
    doesn't affect runtime behavior.
    
    Fixes: f57fa2959244 ("media: v4l2-subdev: Add new ioctl for client capabilities")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
index 4a195b68f28f6..b383c2fe0cf35 100644
--- a/include/uapi/linux/v4l2-subdev.h
+++ b/include/uapi/linux/v4l2-subdev.h
@@ -239,7 +239,7 @@ struct v4l2_subdev_routing {
  * set (which is the default), the 'stream' fields will be forced to 0 by the
  * kernel.
  */
- #define V4L2_SUBDEV_CLIENT_CAP_STREAMS		(1U << 0)
+ #define V4L2_SUBDEV_CLIENT_CAP_STREAMS		(1ULL << 0)
 
 /**
  * struct v4l2_subdev_client_capability - Capabilities of the client accessing



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux