From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA3D4149DF4 for ; Thu, 19 Dec 2024 09:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600440; cv=none; b=CBXdBf5frQfEkDFZDubGGD17nRCL0/m7yMlNDXKUSvj7+oIeyCqmkVMNrK4hK0n5kXBoNdM3d0TRiDVuZU/RSst9kOJa8k1iuQ8xQSZIgFM7sj/TKFLIuC5t7qrI65FGpNuz5CX5/7A7UhNC6IrZ54jb5WvfCT6ZtNvZJuMGUHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600440; c=relaxed/simple; bh=Dhmh/fHKoO/5nFfxm0OoelmdAlM5m92OiFgk6tgg+Ig=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fYGcx2C7wT+1xyruColjAzqvNZr/4/F6oHBtBkZQTdCN1yRoSYeZgDKMPIN4HVUeX2RP1bopSIKOLmP7ZxVDzFtLXCkMWMf2vp4juS3blcfX0GQnwy016XCkHVBI60s795eG1EZlE5IyMM3NV/5TrQdCmpJ/UHtHAANfRN/akFo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=EJPi4CH9; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EJPi4CH9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734600435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rtOqNn5Ah7f9AT/ohPVGIekCuIswjUxtBeWBQzFVNlU=; b=EJPi4CH9MS5ws8P92igfeTMoSp9ftHwh3I5tizvmlcIMRhQENuBNue4ajKQcreftqssd2j KdfCD9TRTvbmE8qcmQS1eXCrVfBkwLriN+snG0HzwkKzFZ10tGTKPTCmfIZE7N3+jzAclP p9mQMjrcJfbu0/zs9zpeW+gQv6LhtwU= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-245-nfyJsHyfOZq7t7B-Z9SrtQ-1; Thu, 19 Dec 2024 04:27:14 -0500 X-MC-Unique: nfyJsHyfOZq7t7B-Z9SrtQ-1 X-Mimecast-MFC-AGG-ID: nfyJsHyfOZq7t7B-Z9SrtQ Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5d0b5036394so594624a12.3 for ; Thu, 19 Dec 2024 01:27:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734600433; x=1735205233; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rtOqNn5Ah7f9AT/ohPVGIekCuIswjUxtBeWBQzFVNlU=; b=JbyN09n7nHlbv8taZuESsGF9xF8SECnY7PCnTK/VZoL1NaEvhP/g8TQkgbo+37GTi6 2xHTT3Hce3FyFh+wZ65quwa07G0xgAOqUGictCMufbEocRZ3J5Xui1akrS9nFqB6X+JL dffXHU5KetcP94SKZNnID3Tzu9D5jCnHNSEicwd9ez25a2dsExdLfj18bnJ6hS55qTW5 /+ZDApyUoWtUqzJPJ+13AvsS3h6u+gvdHbYG+fE6TThHUXCCsGvWuYjUXQspUMLAUdW3 dpMLya+tX9xJ8y9PJ5kSmBr5nbV9HhXpxaddNKzsU5z/WxqNBpiMLbmTNgCrjvNqQTSC qusQ== X-Forwarded-Encrypted: i=1; AJvYcCVlBIjb1YjDDIObHWmkYXolPnxrZWoIh69k1/RTBpMSGp+whHI0EQH/J84ItFqIqaa3863cA0RvJP+7nc0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1TC1AKNX5nsvqzK72oDcQggtV2cP+Bn/7bjSCKZcCaCyHj72F cO1MEOETNlbbuOYLp4Nu1wrtMyT5rK08MZnuDi9Clpx7HebX7yflYupuWLpD8eiFrPNIZst6y+F rs6zTXBgoK3GQbX9SzPA6oY3oVEL8S61+8bJG8wVZluaRBuRkyKS4b/Dz8QggnSCA7/aHnozy X-Gm-Gg: ASbGncvI5CVMWtwhJbHmB8+eGJ48GjKTXaoZBEShP1eDegCHmaZA6vlq0oaCh2/2/yu 8alsG+95ps73k5rTcOFT5WH8Nkl/IzvU+ahNfnzRK8IJjnjFxS3+dHmNWugEt9iYg8/XcWcoig8 DGlHupvoucnP6FtalBRELHhrjLJDvabkgCCklpjMloBTMF8yTHSbN7LSpb3KDuOToDq1I7aBwVj CxI7hWHpvDteP9pED+XXew4apGHIR+cZ/PHwi23xLL0D824H2QPFdWKw2uPxtw6J5ZBBjSBsKqE 0YDsLb/Zd5xwYOA+n1i+JNWFO0Y3+AhhGYp0KPw4VyaJ3vUEMyKeVHrQzZAXCJogbuykaOBu6K4 qMMBF24Z6NxaUA/d6khfJaW+9nkKZfso= X-Received: by 2002:a05:6402:524d:b0:5d6:37ec:60cf with SMTP id 4fb4d7f45d1cf-5d7ee3ff066mr7036926a12.27.1734600432888; Thu, 19 Dec 2024 01:27:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpY0yeTZkltgJqBoBxtx25H14dP/HivVpG6PUcBbKwyOlAVppb9zvsYEwHN/VFedwFnj7rFA== X-Received: by 2002:a05:6402:524d:b0:5d6:37ec:60cf with SMTP id 4fb4d7f45d1cf-5d7ee3ff066mr7036896a12.27.1734600432438; Thu, 19 Dec 2024 01:27:12 -0800 (PST) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d806fede4csm468671a12.63.2024.12.19.01.27.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Dec 2024 01:27:11 -0800 (PST) Message-ID: Date: Thu, 19 Dec 2024 10:27:10 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/5] media: uvcvideo: Two +1 fixes for async controls To: Laurent Pinchart Cc: Ricardo Ribalda , Mauro Carvalho Chehab , Guennadi Liakhovetski , Hans Verkuil , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20241203-uvc-fix-async-v6-0-26c867231118@chromium.org> <20241219003708.GK5518@pendragon.ideasonboard.com> Content-Language: en-US, nl From: Hans de Goede In-Reply-To: <20241219003708.GK5518@pendragon.ideasonboard.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, On 19-Dec-24 1:37 AM, Laurent Pinchart wrote: > On Mon, Dec 09, 2024 at 12:01:16PM +0100, Hans de Goede wrote: >> Hi, >> >> On 3-Dec-24 10:20 PM, Ricardo Ribalda wrote: >>> This patchset fixes two +1 bugs with the async controls for the uvc driver. >>> >>> They were found while implementing the granular PM, but I am sending >>> them as a separate patches, so they can be reviewed sooner. They fix >>> real issues in the driver that need to be taken care. >>> >>> Signed-off-by: Ricardo Ribalda >> >> Ricardo, Thank you for your patches. >> >> I have merged patches 1-4 into: >> >> https://gitlab.freedesktop.org/linux-media/users/uvc/-/commits/next/ > > At least patch 5/5 was applied incorrectly. Does that result from a > merge conflict ? Or did you apply v5 by mistake ? There doesn't seem to > be any other issue. I think I applied v5 by mistake, sorry about that. > I've rebased the uvc/next branch to fix this. Once CI passes, I'll send > a pull request. Great, thank you. Regards, Hans >>> --- >>> Changes in v6: >>> - Swap order of patches >>> - Use uvc_ctrl_set_handle again >>> - Move loaded=0 to uvc_ctrl_status_event() >>> - Link to v5: https://lore.kernel.org/r/20241202-uvc-fix-async-v5-0-6658c1fe312b@chromium.org >>> >>> Changes in v5: >>> - Move set handle to the entity_commit >>> - Replace uvc_ctrl_set_handle with get/put_handle. >>> - Add a patch to flush the cache of async controls. >>> - Link to v4: https://lore.kernel.org/r/20241129-uvc-fix-async-v4-0-f23784dba80f@chromium.org >>> >>> Changes in v4: >>> - Fix implementation of uvc_ctrl_set_handle. >>> - Link to v3: https://lore.kernel.org/r/20241129-uvc-fix-async-v3-0-ab675ce66db7@chromium.org >>> >>> Changes in v3: >>> - change again! order of patches. >>> - Introduce uvc_ctrl_set_handle. >>> - Do not change ctrl->handle if it is not NULL. >>> >>> Changes in v2: >>> - Annotate lockdep >>> - ctrl->handle != handle >>> - Change order of patches >>> - Move documentation of mutex >>> - Link to v1: https://lore.kernel.org/r/20241127-uvc-fix-async-v1-0-eb8722531b8c@chromium.org >>> >>> --- >>> Ricardo Ribalda (5): >>> media: uvcvideo: Only save async fh if success >>> media: uvcvideo: Remove redundant NULL assignment >>> media: uvcvideo: Remove dangling pointers >>> media: uvcvideo: Annotate lock requirements for uvc_ctrl_set >>> media: uvcvideo: Flush the control cache when we get an event >>> >>> drivers/media/usb/uvc/uvc_ctrl.c | 83 ++++++++++++++++++++++++++++++++++------ >>> drivers/media/usb/uvc/uvc_v4l2.c | 2 + >>> drivers/media/usb/uvc/uvcvideo.h | 9 ++++- >>> 3 files changed, 82 insertions(+), 12 deletions(-) >>> --- >>> base-commit: 291a8d98186f0a704cb954855d2ae3233971f07d >>> change-id: 20241127-uvc-fix-async-2c9d40413ad8 >