From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795116342; b=hY+hpv7YnResl0g39pHIEAq0B+bSF4zVAOEpyZzb9HpYRG5T2S3KYHL3fuKqjz5ZiVAo c0eoVvKA+34hHPnJ9SCbmj8Fgj6PQVnSLENlVMiiln4ZiBDGzHAxrSmK+1HLZ9dwT0mFz B0+DwzNK7/GXrlaU4puvRUDDDwHYv3VCi2n5LdoLG1SqJ5d6/piybCkZTtbA74pd9ODQA ZCZYm7CHzLfPcogdc7CPhlVFGiY5YkgvGJ0cWlRL28iQwx42TB31iWwrhAvPfD4SPpcgj PxZOQBsyC1pVMCwDrfoMyl1Fps8Q/kxLCmvogl+Mk6hFkVIHf35lvnrycN4UEMBvZ5w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795116342; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=ALLBk8MdTkFwcPZqYQO+ZVSicu8jJEanZFGqZFoBPVY=; b=xbmp+AeCwoNl4lMfBn7sFPhHcDcFLJppFKNNFZ4SH+M0Z0+JNO28X+NUdFi0gSnn1QBM iZZwQpv5IHWwmmA68zVcuPWkUoqRyBJQj1ojvGZMXcH7/T5WYdcOgEy8mZp6R9DyF/jq1 jrh8RwiF8HKsOcbeFig31VosO4UJt97N0WZlQX7X/Yl6AaqmLqtsv+ARErla8ToXRQhlr edyemyhiXfFbjgC1q6pDLBjn8+r6ryT8TwbozdxTplOcdMdIRdK5jEAuDa9FzNNCgGmqD ZGx/AOq3km/2FukhTea3dHRdF6H0+AGzMuEHULmMDf/92KSfihkB8KHiqvmQpw+bbpA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=BYv7OsYs; arc=none smtp.remote-ip=209.85.214.199 Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F327E60A262B for ; Thu, 19 Nov 2026 19:25:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F327E60A262B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=BYv7OsYs Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2f022026e60so597155ad.0 for ; Thu, 19 Nov 2026 11:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1795116341; x=1795721141; darn=vger.kernel.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=ALLBk8MdTkFwcPZqYQO+ZVSicu8jJEanZFGqZFoBPVY=; b=BYv7OsYsxwh5t8p7/0Bp+Ty/T8NLWmSWYXIktaSg0QLh2dtAIFb3imVoee12XgHoWK mUIbJT1XkyoNa7tb+YibdljLhg8xyJpSz4cIDdCeOF27j0B545vrSXDsPWORMWkYK8lL 2ud8bRh2hgMvWXbTuM+9Kmcc7s/hrRwyihUtOpStDYOfj2AtLGFx1Bu0icOsfO63qsRy ZGhxrkwNxvyV95wcfNMtY+9w7/r9tW4iBrIDYIwhqf5FSLswSImMzmz/v7CszkjOwRfu ayIbn7J6MZ6LABK9vpuCF081H5sl/Q8ZbGtbOEXMdSp6PCg6We/dTvPKV0t+kKCqx32J bOGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795116341; x=1795721141; 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=ALLBk8MdTkFwcPZqYQO+ZVSicu8jJEanZFGqZFoBPVY=; b=QxqhYRG60LzXQ9Hr0qlzJcHKpKlZW4fYCKndPG2LQ6J5LuN+3zfbzp94gzEVgSp+va IUvp8y268PrwxEdoQWpWwWat+ny8fdui+nYkCTNqOir368+iGoyYcTnEYC1CLJSAlonf 5hJ1FtNl3NG9yjZAHns2BbTW0V9Hli1CQdTQ7i39yjZW18TmdGL6MDbiRC+7IiIAKDmd uIdxrHwV3Y/9wQp54ZdKEPCH2eAs7rgHvoAN+uBB6OzpFaGXiTgxD8Q1Rik/Qlt2RLjT pYw3enj2FfrG/m3aql1KtoCb1bs8jeHcT75IdCr4pbhsE7VXbK85uH4dZvhUx2dEMgPp Yi6w== X-Forwarded-Encrypted: i=1; AL+hErHLbBbyUobUXlf4JnibjFtu7hAx/yxx5UvoUFkk37zB/xgaN2tZW3F84Znglc4LsAAuY3iOb7q7K4Ug@vger.kernel.org X-Gm-Message-State: APuU4Z/9cZBFlIjT1VZ1jLP2R27T0R0m6BDdRVkIJFcFWJfmegIBIf9Q FYOM9IJHr/GM40EpurhrwjyBgrCiL/msQdPRBON7xDZOQ9pi+3QvshI3XMhfvdsi68MPhfDQTf4 y9B4xauh+Cg== X-Received: from pleu15.prod.google.com ([2002:a17:903:41cf:b0:2ef:d860:1c85]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:fda5:b0:2ed:fb0:bfd6 with SMTP id d9443c01a7336-2f031e08699mr15736045ad.11.1795116341051; Thu, 19 Nov 2026 11:25:41 -0800 (PST) Date: Thu, 19 Nov 2026 11:25:14 -0800 In-Reply-To: <20261119192520.1983406-1-irogers@google.com> X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261119192520.1983406-1-irogers@google.com> X-Mailer: git-send-email 2.56.1.750.gf70dc682cf-goog Message-ID: <20261119192520.1983406-4-irogers@google.com> Subject: [PATCH v4 3/9] sh: sq: Add missing kobject release callback to ktype_percpu_entry From: Ian Rogers To: Danilo Krummrich , Greg Kroah-Hartman , Kees Cook , Miguel Ojeda , "Rafael J . Wysocki" Cc: Madhavan Srinivasan , Srish Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Nayna Jain , Mimi Zohar , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Nathan Chancellor , Nick Desaulniers , Viresh Kumar , Zhongqiu Han , Alexander Aring , Felix Kuehling , "=?UTF-8?q?Christian=20K=C3=B6nig?=" , Zhihao Cheng , 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 Content-Type: text/plain; charset="UTF-8" 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.") Acked-by: John Paul Adrian Glaubitz 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.1.708.g77570a6a1d-goog