mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Ricardo Ribalda <ribalda@chromium.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/5] media: uvcvideo: Annotate lock requirements for uvc_ctrl_set
Date: Mon, 2 Dec 2024 15:44:43 +0100	[thread overview]
Message-ID: <34084caa-13a4-40c3-aa81-ba17513add45@redhat.com> (raw)
In-Reply-To: <20241202-uvc-fix-async-v5-3-6658c1fe312b@chromium.org>

Hi,

On 2-Dec-24 3:24 PM, Ricardo Ribalda wrote:
> Make it explicit that the function is always called with ctrl_mutex
> being held.
> 
> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>  drivers/media/usb/uvc/uvc_ctrl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index af1e38f5c6e9..576e3854be91 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -1980,6 +1980,8 @@ int uvc_ctrl_set(struct uvc_fh *handle,
>  	s32 max;
>  	int ret;
>  
> +	lockdep_assert_held(&chain->ctrl_mutex);
> +
>  	if (__uvc_query_v4l2_class(chain, xctrl->id, 0) >= 0)
>  		return -EACCES;
>  
> 


  reply	other threads:[~2024-12-02 14:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 14:24 [PATCH v5 0/5] media: uvcvideo: Two +1 fixes for async controls Ricardo Ribalda
2024-12-02 14:24 ` [PATCH v5 1/5] media: uvcvideo: Only save async fh if success Ricardo Ribalda
2024-12-02 14:33   ` Hans de Goede
2024-12-03 20:21   ` Laurent Pinchart
2024-12-02 14:24 ` [PATCH v5 2/5] media: uvcvideo: Remove dangling pointers Ricardo Ribalda
2024-12-02 14:44   ` Hans de Goede
2024-12-02 14:49     ` Ricardo Ribalda
2024-12-02 14:56       ` Hans de Goede
2024-12-03 20:35   ` Laurent Pinchart
2024-12-03 21:21     ` Ricardo Ribalda
2024-12-02 14:24 ` [PATCH v5 3/5] media: uvcvideo: Annotate lock requirements for uvc_ctrl_set Ricardo Ribalda
2024-12-02 14:44   ` Hans de Goede [this message]
2024-12-02 14:24 ` [PATCH v5 4/5] media: uvcvideo: Remove redundant NULL assignment Ricardo Ribalda
2024-12-02 14:44   ` Hans de Goede
2024-12-03 20:27     ` Laurent Pinchart
2024-12-02 14:24 ` [PATCH v5 5/5] media: uvcvideo: Flush the control cache when we get an event Ricardo Ribalda
2024-12-02 14:45   ` Hans de Goede
2024-12-03 20:37     ` Laurent Pinchart
2024-12-03 21:10       ` Ricardo Ribalda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34084caa-13a4-40c3-aa81-ba17513add45@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=guennadi.liakhovetski@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®