From patchwork Mon Jan 30 18:02:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18224 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0E840BDC71 for ; Mon, 30 Jan 2023 18:02:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6C6CB625D8; Mon, 30 Jan 2023 19:02:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1675101770; bh=9MZvYK1i/Afi5dutkzSJME9jxiYHly0SP0Fi3oVw/Y8=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nTOCdmu85sPdEwENyFD7HdXZiP+8Glc5TX1FqtK6nr9f9k8zSuIwblq35apaMjRuR d+Lf1e4VEr45TjvkWDPziERZeLbFdw1am8+B+nnjMpr1Uu7U8EBaHQSeshqKXg3tag g5oo9ANXyA6Z34lx2q6m2SegKWsK6Dy4+r5YK1AwyHjj93l/x6Zx+jJ2sRIddPxolL MTUqC1dV7+U7I8dOnYssPtgH7WXLtetWGQkVgyHPBTfqpA8s+YJGM68kaSsHd5lu7i va37bUw0F7d7waLbzI0d1epx7xPtRvjro9KDORCuq+tmOhhtSxd5YNcd38MOQgkvfO KggHbmyrBBg+Q== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 542D760482 for ; Mon, 30 Jan 2023 19:02:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="VZ+mvMfi"; dkim-atps=neutral Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BBC9E8B8; Mon, 30 Jan 2023 19:02:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1675101767; bh=9MZvYK1i/Afi5dutkzSJME9jxiYHly0SP0Fi3oVw/Y8=; h=From:To:Cc:Subject:Date:From; b=VZ+mvMfi4a+lUccuXvPx+ZuAbWNf6gsATAk4f9v08/BW56J8BfheJHu3K4mcDvYdD YgsNlSVJ/OOZoR/kg5Wjd0nKozI/wV+TY8vaFG4MPNgJxbzAzNju4Qtrg8XxGVnzcC QegpaKX6hBnAqX/cIaLskQhDmhx8ljZ7wPWjCuPo= To: libcamera devel Date: Mon, 30 Jan 2023 18:02:42 +0000 Message-Id: <20230130180244.2150205-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] Camera/Request reliability X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" While supporting the development of Adam Pigg's Harbour-Pinhole application, it was clear that it's too easy to submit incorrect requests to libcamera - resulting in somewhat undefined behaviour and then rather confusing crashes and assertions internally. These two patches add protection to the submission of Requests objects to a Camera. Kieran Bingham (2): libcamera: camera: Ensure queued requests are prepared libcamera: request: A request canary include/libcamera/internal/request.h | 2 ++ include/libcamera/request.h | 4 +++ src/libcamera/camera.cpp | 10 ++++++ src/libcamera/request.cpp | 54 ++++++++++++++++++++++++++-- 4 files changed, 68 insertions(+), 2 deletions(-)