Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6661946rdb; Fri, 15 Dec 2023 05:13:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGn+26o9vIfYaJuU/LRHz9/OfYQ8RhcPZX0G9o6bjjmeFPIoqU2PNOJFzbpLvt+MaIbF9Rd X-Received: by 2002:a05:6e02:158c:b0:35d:8995:364 with SMTP id m12-20020a056e02158c00b0035d89950364mr19439379ilu.56.1702646004509; Fri, 15 Dec 2023 05:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702646004; cv=none; d=google.com; s=arc-20160816; b=lVadVBbfR3U2UWB6ms/HbP9bEfOsTlXzDAKXzm5Yak6o+hot3fdHXbVHruaz6Xgf17 KTpqXkvIqUl9nnztqU7QMhzD0yvCC8jEJIsqx8vRdwU6H8BPmP26c7HOK9Nt45E/3d23 YWrqMdvzMTD74LN0vcrxcWbV5o/ZIBt7wuQGEdfUlyhQz1S6kfEXGvdxG1v7oiQFwwS6 ZuFutpd/HkJsifjFujIq9VARFjEJXhmvxNRkmo9h/AYus94IAG+eta69WxTOJr0XlMcz 9dqYzLaOV5N79OKvkMDnT/1oUaFFTCjF/xlr0Zg2396bv08JIZbbV/qlrSInmsQFde5a 80AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=mxsSsqHad+gFwyA2IkYq3rSjkiJ/V1iQMCar1RGQyD8=; fh=MAY1Hb7py9skn/WtWv9yT+TEg9zK1YJocApCxeZ1eEg=; b=V+txgmtBsbw5QJtQFhbDsg6fRs36HcRdJEQjTRODK+4piTtrPzHARtJ6aghxZCA03l Dt34DSTgu6flJ+U4FB9zYBHmyw4ZjKgOSjUDg6sT14od24wFOexHvQmht6hx5KbMOF9B JjYW/FqAVA2wGIcgv6UsZOQa2r9yB8DD2eEzMXx3BP+bbZUe8Sicc8Hv0vHHaHBv3gur 6uj6wHhnDwnmaU5gIzmRJnNFiZthbRJZm5b/NQ/DISAgBAHWdRDAGK/Q+D3oMsyqirTD 1foae3mA7mM9cYg4/XPFvRYkQTKFpXp9oG0hGyaVQHXgcmffYqIqxwApfU8W+f9GVKLh 8Sdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kHCHb5AH; spf=pass (google.com: domain of linux-kernel+bounces-976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 13-20020a63124d000000b005c6e820b5e5si12781798pgs.781.2023.12.15.05.13.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 05:13:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kHCHb5AH; spf=pass (google.com: domain of linux-kernel+bounces-976-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2D068285B3F for ; Fri, 15 Dec 2023 13:13:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 098DA2DB75; Fri, 15 Dec 2023 13:13:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kHCHb5AH" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 453FF2D056 for ; Fri, 15 Dec 2023 13:13:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76811C433C8; Fri, 15 Dec 2023 13:13:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702645987; bh=tuoQDVEvOc4yYofLOsac9XvmYp1ao3T0xlTQ8AbQp/k=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=kHCHb5AH3+NMcS7GzCcQ6i5eMb8R4+mbVTuNYb6//iPDSHzMTaKTDfdlE6RWgnkXu fnwG/yuVs6dnGqG56LR81EJ9Kg3ZSeV700QJ7qkM/4rNvBA1YMrpZY+kMDqKTqI+Kt +4ezyU9PBP4ZSU5DFR/UnPelyeEYliBlGN4SNrVEyarjrK02gmGM4e4MCgDmFiHpsL MjB63cTsKJn2lAqLTc95QMx1F7Fph7ByU3sTprr42dduZvugZsEsmvI7yw7zKDL1WS hJHf2EK6mj4yL2Jm3+KiAYmugp7MwZqa6Vc9doz3Cg9Lu+JP0W79WLrXb1ekHpujit yvqP2FLT2uKFQ== From: Maxime Ripard To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Donald Robson Cc: frank.binns@imgtec.com, matt.coster@imgtec.com, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch In-Reply-To: <20231208163019.95913-1-donald.robson@imgtec.com> References: <20231208163019.95913-1-donald.robson@imgtec.com> Subject: Re: (subset) [PATCH] drm/imagination: Fixed oops when misusing ioctl CREATE_HWRT_DATASET Message-Id: <170264598499.449619.5534546786451480094.b4-ty@kernel.org> Date: Fri, 15 Dec 2023 14:13:04 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 On Fri, 08 Dec 2023 16:30:19 +0000, Donald Robson wrote: > While writing the matching IGT suite I discovered that it's possible to > cause a kernel oops when using DRM_IOCTL_PVR_CREATE_HWRT_DATASET when > the call to hwrt_init_common_fw_structure() fails. > > Use an unwind-type error path to avoid cleaning up the object using the > the release function before it is fully resolved. > > [...] Applied to drm/drm-misc (drm-misc-next-fixes). Thanks! Maxime