From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3082960A3803 for ; Tue, 27 Oct 2026 22:39:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=bGIyTuyL; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=e5K4I8SG DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Unsubscribe-Post:List-Owner; bh=dyn1SIhRTdrMDg40LJE9mdzJtJbU+r8dhLRzhIqONfk=; b=bGIyTuyLPMT7aR9edFF3F8FlC5 hO3X89C5MRDFOZGTj6LdQTEiOvl6ESEaJFxjpH6bP9wipc4JxeAOBo4Uaz4bLeZ7Tr+kjmyllOdr9 zbMPGS0z5v1DvR2ySmoIE3sQp3oyUSgOf8wFewCHhkemiDt4uwYJ7QoMb4iA/GwigxR/puSRaXfrD rHQ/J+0mhccxWU1odM/T4T4X7Onch7thVI8jn3gB7l4CFsvjriYsXUVZ/8znzacIVFHZlZk5rigQR 9a0iz23jnOF43cG4dGkNvIIVMqEdx1rI4+G9cD+ZSGA8oy1YY2fnUZnVflbPvr0O1Y8jmqqL3qVag R1hT9XGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLppD-00000005r31-3KeW; Tue, 27 Oct 2026 22:39:23 +0000 Received: from mail-pf1-x447.google.com ([2607:f8b0:4864:20::447]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLppA-00000005r15-11Mz for linux-mtd@lists.infradead.org; Tue, 27 Oct 2026 22:39:21 +0000 Received: by mail-pf1-x447.google.com with SMTP id d2e1a72fcca58-8a05c820ecbso551609b3a.0 for ; Tue, 27 Oct 2026 15:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1793140759; x=1793745559; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=beIsynJTUoVVYUibNrHvS9xq2J3rMWzpCblr3XGPomY=; b=e5K4I8SGRpYK5h94UVW/DT/zE3HLiyLweGry/KVexJjvNhp/CbBPerTaI+9geNRDEw hqaf3IgrJlKpcp3/2oFOZWNuGP2GBbkfi6fj9no5EQyYq3PvVozhA1teEYmnN4LkKt/o 4XfVsMSFdt36N//qXm16MqKHaEvvfyLc+hj8i5rl2h5zgKOp8POwvyvhNba3NojbLxtg n8ZBY2myRFKX7Pcgcazo/kwcUMdP47HhVCRXj01U7G5aHfTwOTkjTtnSrirg1APFxm5T ADO/WjmhZsIfV2I0Y2yFZf7KaZ+dnclh5iT+Nxc/VmfEM0oBGdLbifjvWqiXI/2QWtPC 4npA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793140759; x=1793745559; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=beIsynJTUoVVYUibNrHvS9xq2J3rMWzpCblr3XGPomY=; b=LKUNkZFDwpZ4G+V3uBvnd/ERNmxSxulOhg9btv5D0H7HB87VaNAKANwguec4hUtV/L 7X3wdw6TMqBV0luWwUC7Et1p1iulUGxZFJY+3TX1oYDOULQKhkvUn/MlI054NVNoRvV4 +K/iwTN0phRlwEM6XQRgrRFeOb3+E8H2KCKYhVSeJCvDl2xujcFPsOxKL5YL7c5nD8v6 huRYj9vH1GZUYr5UlEWqtmkhzmQOgqbUofroerFtM467+7p2i7SaLTUClm6H38OMjd1H zxAy1LKcDGAtd/4um9yfQztI09T7+wYUMuL3OZ1LTFcqM4YqbRbsDvnpvCy6Rky1SZFa e92A== X-Forwarded-Encrypted: i=1; AKwUvBzQNACaS0sb3oknZmZL8QPcUq0H2lKKIbC4INrDHtyyvbnvxu2crrTno7Se7ZFwhSLjVVXmImizgyg=@lists.infradead.org X-Gm-Message-State: AFq9FYK1OkX+kXnmNwUXG4NBNxdzbfFOv265OiyIJfJW4UrNis3beisN W+SRbFfXSpFNA8OueBGI5g9H0NoYc4oOj8ZiY8waRX9PGl+ZLVHCJQOHda/2ULLqnSc7TOB859O 2FI3J/LaEjQ== X-Received: from pfbdw21.prod.google.com ([2002:a05:6a00:3695:b0:89f:827e:eb47]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:4293:b0:876:194e:b8fe with SMTP id d2e1a72fcca58-8a6e70e832amr492696b3a.26.1793140758450; Tue, 27 Oct 2026 15:39:18 -0700 (PDT) Date: Tue, 27 Oct 2026 15:38:38 -0700 In-Reply-To: <20261027223847.652884-1-irogers@google.com> X-Archived-By: Mime-Version: 1.0 References: <20261027223847.652884-1-irogers@google.com> X-Mailer: git-send-email 2.56.0.313.g2479322e68-goog Message-ID: <20261027223847.652884-4-irogers@google.com> Subject: [PATCH v2 3/9] sh: sq: Add missing kobject release callback to ktype_percpu_entry From: Ian Rogers To: Kees Cook , Greg Kroah-Hartman , Miguel Ojeda , "Rafael J . Wysocki" , Danilo Krummrich Cc: Nathan Chancellor , Nick Desaulniers , Miguel Ojeda , "=?UTF-8?q?Christian=20K=C3=B6nig?=" , Zhihao Cheng , Zhongqiu Han , Sumanth Korikkar , Bill Wendling , Justin Stitt , driver-core@lists.linux.dev, llvm@lists.linux.dev, linux-hardening@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-s390@vger.kernel.org, gfs2@lists.linux.dev, xen-devel@lists.xenproject.org, linux-mtd@lists.infradead.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ian Rogers , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Paul Mundt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261027_153920_286331_BA10D0D0 X-CRM114-Status: GOOD ( 10.73 ) X-Spam-Score: -9.5 (---------) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 In sq_dev_add(), sq_kobject[cpu] is dynamically allocated with kzalloc_obj() and initialized with ktype_percpu_entry. When sq_dev_remove() calls kobject_put(kobj), the kobject is never freed because ktype_percpu_entry lacks a .release callback. Provide a sq_kobj_release() callback that calls kfree(kobj). Fixes: d7c30c682a27 ("sh: Store Queue API rework.") Signed-off-by: Ian Rogers --- arch/sh/kernel/cpu/sh4/sq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 908a8e09113b..f33864958487 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -331,7 +331,13 @@ static const struct sysfs_ops sq_sysfs_ops = { .store = sq_sysfs_store, }; +static void sq_kobj_release(struct kobject *kobj) +{ + kfree(kobj); +} + static struct kobj_type ktype_percpu_entry = { + .release = sq_kobj_release, .sysfs_ops = &sq_sysfs_ops, .default_groups = sq_sysfs_groups, }; -- 2.56.0.313.g2479322e68-goog ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/