From patchwork Sun Oct 13 08:45:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13834007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E56ACF2579 for ; Sun, 13 Oct 2024 08:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=fL33nv/a4YTljnElPPhcNYtw4c+G05b0bzkldYz4Xvg=; b=sWCvaD5GJsnGgF3gYaSmluDKTa fekcgYCSfpMgEHqD4AU3jbNm4J88+n/a4GmzDC4v2sZqORiyyaTszUAcl4utE993Xy7rV1TuJb8+q X4rTHYEj25dG20gwiOVUjYHmC6c0CxYvqA0ME8GOxrKZsfP9jT8e2NlaRxhnzKEUlJzMYjZTru4Do pj35P3/Ry7vla4LsorziEuio/hjuL6egh0HWavttY1BPddCrWuNCdQiZkt63BYN1W4Ky16Y6tX4Av AqwfD14QNVpUdpSJ5dBdAJf+HhnFJ/f7ttgxU/9z59RP96cENibHEbOTdezHGpSezlkzXzA6FXdd5 WUJ8HgEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szuFn-00000002QEV-0Cfw; Sun, 13 Oct 2024 08:47:07 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szuEN-00000002Q5O-3pM1; Sun, 13 Oct 2024 08:45:42 +0000 Received: from umang.jain (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5DC774CE; Sun, 13 Oct 2024 10:43:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1728809037; bh=iv2LvBNSybKevxYTDoiPQp2Auu8t0c5BbX3uggsjGAA=; h=From:To:Cc:Subject:Date:From; b=g/9jpnTct+Wb2+JQATCXi8L8M5r9bOYnh9/WIh5sZFBItfXK3jPdK089nB6+ZL7kG 1/paj3aJNhjsYhjb0y2qSAume2Hs0hacc+CYTrhUrQLIRhyHONBrFIfLg/pX7yTDHY vQmS7U4EttRLm60Z73z0HlpUnEUSwYVHbPF7CbLQ= From: Umang Jain To: Greg Kroah-Hartman , Broadcom internal kernel review list Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Kieran Bingham , Dan Carpenter , Laurent Pinchart , kernel-list@raspberrypi.com, Stefan Wahren , Umang Jain Subject: [PATCH 0/2] staging: vchiq_arm: Fix drv_mgmt leak Date: Sun, 13 Oct 2024 14:15:27 +0530 Message-ID: <20241013084529.377488-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241013_014540_136832_F870DE3B X-CRM114-Status: UNSURE ( 7.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 1/2 is a drive by fix. 2/2 uses devres resouce management helper devm_kzalloc() to auto-free struct vchiq_drv_mgmt on error and .remove() paths. It might be good to aware the devres issue and following talk might give reviewers a helpful context: - https://lpc.events/event/16/contributions/1227/ - https://archive.fosdem.org/2023/schedule/event/devm_kzalloc/ I am not totally sure if these problems, causes a blockers for these patches. There are a couple of memory management issues I've spotted which can be fixed? by devres (similar to this series) but probably I will wait for initial feedback on this series. Umang Jain (2): staging: vchiq_arm: Drop blank lines staging: vchiq_arm: Use devm_kzalloc for mgmt .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)