[{"id":24393,"web_url":"https://patchwork.libcamera.org/comment/24393/","msgid":"<165990136253.1706285.7257170603231297743@Monstersaurus>","date":"2022-08-07T19:42:42","subject":"Re: [libcamera-devel] [PATCH 2/3] cam: kms_sink: Make lifetime\n\tmanagement of DRM request safer","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2022-08-07 19:00:59)\n> The drmRequest is KMSSink::processRequest() is created as a naked\n> pointer, passed to the constructor of the KMSSink::Request object that\n> stores it in a std::unique_ptr<>, and used later in the function. The\n> current implementation is safe, but could be prone to both memory leaks\n> and use-after-free bugs if modified. Improve it by replacing the naked\n> pointer with a std::unique_ptr<>.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/cam/kms_sink.cpp | 7 ++++---\n>  src/cam/kms_sink.h   | 5 +++--\n>  2 files changed, 7 insertions(+), 5 deletions(-)\n> \n> diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp\n> index 37a3bd50a2bf..16435ede6b6a 100644\n> --- a/src/cam/kms_sink.cpp\n> +++ b/src/cam/kms_sink.cpp\n> @@ -301,7 +301,8 @@ bool KMSSink::processRequest(libcamera::Request *camRequest)\n>         DRM::FrameBuffer *drmBuffer = iter->second.get();\n>  \n>         unsigned int flags = DRM::AtomicRequest::FlagAsync;\n> -       DRM::AtomicRequest *drmRequest = new DRM::AtomicRequest(&dev_);\n\nI'm a little bemused that this 'new' is removed, and now created with a\nunique_ptr - but there's no corresponding removal of a delete?\n\nWas it already leaking? or was it already cleared up by the Request in a\nway that is still compatible with the unique_ptr?\n\nAssuming this is fine,\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> +       std::unique_ptr<DRM::AtomicRequest> drmRequest =\n> +               std::make_unique<DRM::AtomicRequest>(&dev_);\n>         drmRequest->addProperty(plane_, \"FB_ID\", drmBuffer->id());\n>  \n>         if (!active_ && !queued_) {\n> @@ -324,12 +325,12 @@ bool KMSSink::processRequest(libcamera::Request *camRequest)\n>                 flags |= DRM::AtomicRequest::FlagAllowModeset;\n>         }\n>  \n> -       pending_ = std::make_unique<Request>(drmRequest, camRequest);\n> +       pending_ = std::make_unique<Request>(std::move(drmRequest), camRequest);\n>  \n>         std::lock_guard<std::mutex> lock(lock_);\n>  \n>         if (!queued_) {\n> -               int ret = drmRequest->commit(flags);\n> +               int ret = pending_->drmRequest_->commit(flags);\n>                 if (ret < 0) {\n>                         std::cerr\n>                                 << \"Failed to commit atomic request: \"\n> diff --git a/src/cam/kms_sink.h b/src/cam/kms_sink.h\n> index 4a0a872cb653..8f5f08667cea 100644\n> --- a/src/cam/kms_sink.h\n> +++ b/src/cam/kms_sink.h\n> @@ -38,8 +38,9 @@ private:\n>         class Request\n>         {\n>         public:\n> -               Request(DRM::AtomicRequest *drmRequest, libcamera::Request *camRequest)\n> -                       : drmRequest_(drmRequest), camRequest_(camRequest)\n> +               Request(std::unique_ptr<DRM::AtomicRequest> drmRequest,\n> +                       libcamera::Request *camRequest)\n> +                       : drmRequest_(std::move(drmRequest)), camRequest_(camRequest)\n>                 {\n>                 }\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A17DEBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  7 Aug 2022 19:42:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6428A63327;\n\tSun,  7 Aug 2022 21:42:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 86F7A63312\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  7 Aug 2022 21:42:45 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1D4DE749;\n\tSun,  7 Aug 2022 21:42:45 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659901367;\n\tbh=NMHd1aNq8I00p/n5wgIOuOwqKB3A5eTlPwW63cpy7GE=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=tC04jM403G6IWlT70Mi2x5LQT64ny/iEYTrhuuPRL/zJk4yd/6eY3eAeHkSPZRHAY\n\tSgNrarpx7DcF3T2Ia3G45iGb24x1w3yMJQu8XrWfz5Kwmm5dS950+FGltxAbeXaoil\n\tUZlRvrHZZT1u/N/LeTm8eP99Er6bsxQ39yT1Cu6ALWLN96Z8k4szrVZofvMfmh8gZr\n\taAek603LhA7P8y0E82F6r+f5Op9pCrkNWFqiXsU+V9Yr7hqFzoqTTAo8klxq7FTn0l\n\t1IgcwCk6O4F82u60ONOpSOQqCl3n8040YO0oQ/KDr4A8usX1PJavK4puvmYUpec97u\n\tPsg1SdV6WrqAg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659901365;\n\tbh=NMHd1aNq8I00p/n5wgIOuOwqKB3A5eTlPwW63cpy7GE=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=JPPl5FhAhMKp+UO+/S5BHdi6uHGzTw1kIK0OjlZnQOsrFmaUc02Z5QX6ePsyVWhSM\n\twBXf6DZdXbIfqGJbGcj3PBXFzqPqzXxqKJ0AuTcJfH4+i/pn1dpOKk06ThHsp8fdVc\n\t+/Ak1x4Nnyv44LCpym/Lq7tyrTnDK/pcvKU001kA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"JPPl5FhA\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220807180100.396-3-laurent.pinchart@ideasonboard.com>","References":"<20220807180100.396-1-laurent.pinchart@ideasonboard.com>\n\t<20220807180100.396-3-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Sun, 07 Aug 2022 20:42:42 +0100","Message-ID":"<165990136253.1706285.7257170603231297743@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 2/3] cam: kms_sink: Make lifetime\n\tmanagement of DRM request safer","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24394,"web_url":"https://patchwork.libcamera.org/comment/24394/","msgid":"<YvAXNsz7zMEWhYRk@pendragon.ideasonboard.com>","date":"2022-08-07T19:49:10","subject":"Re: [libcamera-devel] [PATCH 2/3] cam: kms_sink: Make lifetime\n\tmanagement of DRM request safer","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Sun, Aug 07, 2022 at 08:42:42PM +0100, Kieran Bingham wrote:\n> Quoting Laurent Pinchart via libcamera-devel (2022-08-07 19:00:59)\n> > The drmRequest is KMSSink::processRequest() is created as a naked\n> > pointer, passed to the constructor of the KMSSink::Request object that\n> > stores it in a std::unique_ptr<>, and used later in the function. The\n> > current implementation is safe, but could be prone to both memory leaks\n> > and use-after-free bugs if modified. Improve it by replacing the naked\n> > pointer with a std::unique_ptr<>.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/cam/kms_sink.cpp | 7 ++++---\n> >  src/cam/kms_sink.h   | 5 +++--\n> >  2 files changed, 7 insertions(+), 5 deletions(-)\n> > \n> > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp\n> > index 37a3bd50a2bf..16435ede6b6a 100644\n> > --- a/src/cam/kms_sink.cpp\n> > +++ b/src/cam/kms_sink.cpp\n> > @@ -301,7 +301,8 @@ bool KMSSink::processRequest(libcamera::Request *camRequest)\n> >         DRM::FrameBuffer *drmBuffer = iter->second.get();\n> >  \n> >         unsigned int flags = DRM::AtomicRequest::FlagAsync;\n> > -       DRM::AtomicRequest *drmRequest = new DRM::AtomicRequest(&dev_);\n> \n> I'm a little bemused that this 'new' is removed, and now created with a\n> unique_ptr - but there's no corresponding removal of a delete?\n> \n> Was it already leaking? or was it already cleared up by the Request in a\n> way that is still compatible with the unique_ptr?\n\nThe drmRequest was passed to the KMSSink::Request constructor:\n\n\tpending_ = std::make_unique<Request>(drmRequest, camRequest);\n\nwhich took ownership of the pointer, storing it in a\nstd::unique_ptr<DRM::AtomicRequest>. From that point onwards, there's no\nrisk of leaks. As the processRequest() function doesn't return between\nthe creating of drmRequest and the construction of the Request, there's\nthus no leak. The next patch in the series adds a return in the middle,\nwhich prompted me to write this patch to avoid a leak (in a neater way\nthat adding a manual delete in the return path introduced by 3/3).\n\n> Assuming this is fine,\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > +       std::unique_ptr<DRM::AtomicRequest> drmRequest =\n> > +               std::make_unique<DRM::AtomicRequest>(&dev_);\n> >         drmRequest->addProperty(plane_, \"FB_ID\", drmBuffer->id());\n> >  \n> >         if (!active_ && !queued_) {\n> > @@ -324,12 +325,12 @@ bool KMSSink::processRequest(libcamera::Request *camRequest)\n> >                 flags |= DRM::AtomicRequest::FlagAllowModeset;\n> >         }\n> >  \n> > -       pending_ = std::make_unique<Request>(drmRequest, camRequest);\n> > +       pending_ = std::make_unique<Request>(std::move(drmRequest), camRequest);\n> >  \n> >         std::lock_guard<std::mutex> lock(lock_);\n> >  \n> >         if (!queued_) {\n> > -               int ret = drmRequest->commit(flags);\n> > +               int ret = pending_->drmRequest_->commit(flags);\n> >                 if (ret < 0) {\n> >                         std::cerr\n> >                                 << \"Failed to commit atomic request: \"\n> > diff --git a/src/cam/kms_sink.h b/src/cam/kms_sink.h\n> > index 4a0a872cb653..8f5f08667cea 100644\n> > --- a/src/cam/kms_sink.h\n> > +++ b/src/cam/kms_sink.h\n> > @@ -38,8 +38,9 @@ private:\n> >         class Request\n> >         {\n> >         public:\n> > -               Request(DRM::AtomicRequest *drmRequest, libcamera::Request *camRequest)\n> > -                       : drmRequest_(drmRequest), camRequest_(camRequest)\n> > +               Request(std::unique_ptr<DRM::AtomicRequest> drmRequest,\n> > +                       libcamera::Request *camRequest)\n> > +                       : drmRequest_(std::move(drmRequest)), camRequest_(camRequest)\n> >                 {\n> >                 }\n> >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 02306C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  7 Aug 2022 19:49:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A7456332B;\n\tSun,  7 Aug 2022 21:49:22 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BB9CF63312\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  7 Aug 2022 21:49:20 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 282DA749;\n\tSun,  7 Aug 2022 21:49:20 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659901762;\n\tbh=EjaToGfTOwZLduCY6sO6OX4FFRt41F08fEeOd+SX424=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=nGMa/OsfZQ2kxZp+8bvl10DsR1Jpyj13lxecczRm5xSeJLzMgCCh3WRK0vlsZKIWY\n\t+ayEkj6jksQxT3VRlA8cCcdnit+fdFYGAU6OkUnaPth2+vzRTYVZqPKs3PSPOTpjoG\n\tqFykHPAipp8Peq3b3xByxw28H+NAQyxuURQ1OESXM0RrWyZMYft3FYA85XK2erKR9Q\n\t6hV3A5GeMpMdSXEIvEd7CQm9kg3DCeXR92DXZOed5ymjE9evqibm3jRbcJoBHy8SzX\n\tnLsFJxes9Ls2XJDtkyAYR0OAgsDUVu7ZJvt9gBFTmZBCUJuiUftdM+xqSnIHCOBFjF\n\tmMVdUaWWDNnPA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659901760;\n\tbh=EjaToGfTOwZLduCY6sO6OX4FFRt41F08fEeOd+SX424=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=u5LExjRWEaMDi7aYHtvFjqotp4MOPjUB/W5V9NCigxcO3jaCK+lIAA+xc1+BT5ul0\n\t0ZbMSOeyAYrp/SV7YrczD4hkED4Q/oyHahFoHEH1iYQcXOIyrfh5xObGCks/wpu57s\n\t+GIQt6aKU45uvIKt4Jp1LEkrznHMbdEZNfRSlgVg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"u5LExjRW\"; dkim-atps=neutral","Date":"Sun, 7 Aug 2022 22:49:10 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YvAXNsz7zMEWhYRk@pendragon.ideasonboard.com>","References":"<20220807180100.396-1-laurent.pinchart@ideasonboard.com>\n\t<20220807180100.396-3-laurent.pinchart@ideasonboard.com>\n\t<165990136253.1706285.7257170603231297743@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<165990136253.1706285.7257170603231297743@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH 2/3] cam: kms_sink: Make lifetime\n\tmanagement of DRM request safer","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24427,"web_url":"https://patchwork.libcamera.org/comment/24427/","msgid":"<CAOgh=Fz5gGZsd_Yzhr1ehGNgudr_q8zPyaqO9FwzfafQJ4QYgg@mail.gmail.com>","date":"2022-08-08T10:38:25","subject":"Re: [libcamera-devel] [PATCH 2/3] cam: kms_sink: Make lifetime\n\tmanagement of DRM request safer","submitter":{"id":101,"url":"https://patchwork.libcamera.org/api/people/101/","name":"Eric Curtin","email":"ecurtin@redhat.com"},"content":"On Sun, 7 Aug 2022 at 19:01, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> The drmRequest is KMSSink::processRequest() is created as a naked\n> pointer, passed to the constructor of the KMSSink::Request object that\n> stores it in a std::unique_ptr<>, and used later in the function. The\n> current implementation is safe, but could be prone to both memory leaks\n> and use-after-free bugs if modified. Improve it by replacing the naked\n> pointer with a std::unique_ptr<>.\n>\n\nLGTM, and also tested successfully.\n\nReviewed-by: Eric Curtin <ecurtin@redhat.com>\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/cam/kms_sink.cpp | 7 ++++---\n>  src/cam/kms_sink.h   | 5 +++--\n>  2 files changed, 7 insertions(+), 5 deletions(-)\n>\n> diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp\n> index 37a3bd50a2bf..16435ede6b6a 100644\n> --- a/src/cam/kms_sink.cpp\n> +++ b/src/cam/kms_sink.cpp\n> @@ -301,7 +301,8 @@ bool KMSSink::processRequest(libcamera::Request *camRequest)\n>         DRM::FrameBuffer *drmBuffer = iter->second.get();\n>\n>         unsigned int flags = DRM::AtomicRequest::FlagAsync;\n> -       DRM::AtomicRequest *drmRequest = new DRM::AtomicRequest(&dev_);\n> +       std::unique_ptr<DRM::AtomicRequest> drmRequest =\n> +               std::make_unique<DRM::AtomicRequest>(&dev_);\n>         drmRequest->addProperty(plane_, \"FB_ID\", drmBuffer->id());\n>\n>         if (!active_ && !queued_) {\n> @@ -324,12 +325,12 @@ bool KMSSink::processRequest(libcamera::Request *camRequest)\n>                 flags |= DRM::AtomicRequest::FlagAllowModeset;\n>         }\n>\n> -       pending_ = std::make_unique<Request>(drmRequest, camRequest);\n> +       pending_ = std::make_unique<Request>(std::move(drmRequest), camRequest);\n>\n>         std::lock_guard<std::mutex> lock(lock_);\n>\n>         if (!queued_) {\n> -               int ret = drmRequest->commit(flags);\n> +               int ret = pending_->drmRequest_->commit(flags);\n>                 if (ret < 0) {\n>                         std::cerr\n>                                 << \"Failed to commit atomic request: \"\n> diff --git a/src/cam/kms_sink.h b/src/cam/kms_sink.h\n> index 4a0a872cb653..8f5f08667cea 100644\n> --- a/src/cam/kms_sink.h\n> +++ b/src/cam/kms_sink.h\n> @@ -38,8 +38,9 @@ private:\n>         class Request\n>         {\n>         public:\n> -               Request(DRM::AtomicRequest *drmRequest, libcamera::Request *camRequest)\n> -                       : drmRequest_(drmRequest), camRequest_(camRequest)\n> +               Request(std::unique_ptr<DRM::AtomicRequest> drmRequest,\n> +                       libcamera::Request *camRequest)\n> +                       : drmRequest_(std::move(drmRequest)), camRequest_(camRequest)\n>                 {\n>                 }\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 98E72C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Aug 2022 10:38:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 56CB463327;\n\tMon,  8 Aug 2022 12:38:46 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 41CC263315\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Aug 2022 12:38:44 +0200 (CEST)","from mail-qt1-f199.google.com (mail-qt1-f199.google.com\n\t[209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\tus-mta-564-wURyMKHgPjy_hgWQIhfOHQ-1; Mon, 08 Aug 2022 06:38:42 -0400","by mail-qt1-f199.google.com with SMTP id\n\tk10-20020ac85fca000000b00342f51f0b13so2930964qta.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 08 Aug 2022 03:38:42 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659955126;\n\tbh=pgEJivFk/Q5SyhDGTmdf2k5tPSHe78t4OPsiFf+k+4s=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=pR0j98AC5rIC6ym3DiWjVWweJ3G5zu3eVSQYJgdd/fI4/qe1MSire/XDB9q6UWmjA\n\tlJRx150PkQ/N35y5AIOJf0b2SJnT6E9kJaV7tpzk9yPgieWXSplGTeGgFNfPYHV+vu\n\tRq1duC0aS9HeUkgz4IqJ1/kAkbpq0Owi9QlSfiKQLRWX1UXtwhayQi8kd4fFIhQhqb\n\tq5LkCKslypxRBhNlXVm1WMdIXrAuWwUnaz2UF7R6b3EsDT2jdoQlr949CKOOrX9UDi\n\tTSCmmJNTu+yjlAIjGjkyByN1+yA9tPJ1oCaGeeXwVUbQSCmmlSiyg1mOJYIxeM+/Nw\n\twZc0tWSzxlruQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1659955123;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=fUCqnVegrKf2unRuDgd05swTm/O5LQOCXyrVZOGznqk=;\n\tb=JRfsRJkDMNrG7LkTemCsM+hgVty9m1x43YVPVFHSBUTMXJta0VOJ3ufDO+4WV0PiPOoxY+\n\tXokncNsglFugHOyiM7EqB3mnVRb91k7Pv+AXVZBKS1is6KiTU7y4ICkf/ZtC4WQs4dVw7C\n\trSGBmSMDYv0jY/l5EH4WVc+WTu5yQNQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"JRfsRJkD\"; \n\tdkim-atps=neutral","X-MC-Unique":"wURyMKHgPjy_hgWQIhfOHQ-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=fUCqnVegrKf2unRuDgd05swTm/O5LQOCXyrVZOGznqk=;\n\tb=M2jpnN3sSSJgyRx+hmzQ6w0jJY5l3HCUYz/oqHCmgq96oNwDeFENT7+fcWU0wPcJT/\n\tuk8f5a1Y7FF7IZj0wfRZ+TpoUUdo2wS5X8EVYdDN07Sr5gkTrUL/f+61AXOCRtdlJBq/\n\t3XiY8ZXp0/qSIyvRLLlBQDIPpjD8gYvTrU4dDFG/Xs0sd0ZeGUyuLUTgC0oYNGwRrTUD\n\tlP+7wMGopYiTi5+I42jVwnQki1tacVzF1oBXh4zhSZBw6yKBtH+OPvt1VG8uzJR+BOml\n\tRJWelLw5kPDcdKAQE5BnXH0xGifEvtcQYpngwE9goEXOCtUsCLIx4KPQ4Y9Flaw5sIkD\n\tJNxQ==","X-Gm-Message-State":"ACgBeo3hn0aLpB0vy4VzUY0H35+TqARqnM8L3Jq4XhMM9CdUytN8wUfc\n\tTiTAXZ8Jaxk9G5X1Cy1qqhDfkzyOgT08LjuCrGcEhosu+PkqWhG/amLZtjjSKbgmd+vcdsEjuf6\n\tgcyArbTeT2gaPHBP7GHxDiUx8HdkYEEyqutcs2Ykn7SrZeOCMTQ==","X-Received":["by 2002:ac8:7d95:0:b0:31e:e0d3:60a4 with SMTP id\n\tc21-20020ac87d95000000b0031ee0d360a4mr15340767qtd.106.1659955121683; \n\tMon, 08 Aug 2022 03:38:41 -0700 (PDT)","by 2002:ac8:7d95:0:b0:31e:e0d3:60a4 with SMTP id\n\tc21-20020ac87d95000000b0031ee0d360a4mr15340756qtd.106.1659955121466;\n\tMon, 08 Aug 2022 03:38:41 -0700 (PDT)"],"X-Google-Smtp-Source":"AA6agR49iSRJ6aJuS42SIGNZpRJQOYv808MNi1qyBdo5XzU0ioOfLf0B3h35/NCEAvDoqCrtWZDIrAG1tkT1h0xhsMk=","MIME-Version":"1.0","References":"<20220807180100.396-1-laurent.pinchart@ideasonboard.com>\n\t<20220807180100.396-3-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20220807180100.396-3-laurent.pinchart@ideasonboard.com>","Date":"Mon, 8 Aug 2022 11:38:25 +0100","Message-ID":"<CAOgh=Fz5gGZsd_Yzhr1ehGNgudr_q8zPyaqO9FwzfafQJ4QYgg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 2/3] cam: kms_sink: Make lifetime\n\tmanagement of DRM request safer","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Eric Curtin via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Eric Curtin <ecurtin@redhat.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]