From nobody Tue Sep 29 06:58:49 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 F311038DC7A for ; Tue, 11 Aug 2026 08:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786436273; cv=none; b=HxII/AOMFNk3K6pe7q9oeZ8Ng6Jp7h1tm+8GCzo+NFsumsaDb3CQ9Gsn5dWRWibdXrZkRWQoKjfM5nNy0VuLKIHkyqPYtu2UahG5L4dthFe0sZW1s8fb/EjYGUGMHNSq9yYPOT8b6iyZKxrrXDvhCeHktZs6BUF9qHlinNp2UtQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786436273; c=relaxed/simple; bh=VWoU3kYu6Enu/C3C9dvucrxCQ31b2Igki1S++KonUtI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WJWsEjlocbSjWzFYZWywJANBIhdeRgOxgo8d/PXYg0RZ6dy1VPb2r2tMI6JnFJVuGUlP1kWP3Y/lAMd/vTeFh/e52wXyYd1B2pxipyJtgWikhQccvBcYp6DTINkwkgHksQxv0Rzc0jQIV32LpKg2AwSp7d0skYPvVLaL/rMt0l0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Khc7f3Wn; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Khc7f3Wn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786436270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gaV5QP/NsJbM4wjflGwqwaTTkxADS7lu2K0ni/6g9I4=; b=Khc7f3WnH/F5CwEn63y1NW/n0FLn0uqwa9sTFu67xHu7oM2rEWrS/yFWeECWNRBfC6XvaG /4k29gLQSVQnYUAQKkgacNkwBlPDK4+XeO7S2R1GatjMFEvC8oPm60YrwGGrugsTBX49mw MAfFJyIxm7KvWUMA0ycbLr9U4xM2Mkc= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-RJ8XsgtXPkyxOAP32cIZFg-1; Tue, 11 Aug 2026 04:17:49 -0400 X-MC-Unique: RJ8XsgtXPkyxOAP32cIZFg-1 X-Mimecast-MFC-AGG-ID: RJ8XsgtXPkyxOAP32cIZFg_1786436268 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A78A9195604D; Tue, 11 Aug 2026 08:17:47 +0000 (UTC) Received: from thuth-p1g4.redhat.corp (headnet03.pony-001.prod.iad2.dc.redhat.com [10.2.32.114]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6B1D718005BB; Tue, 11 Aug 2026 08:17:44 +0000 (UTC) From: Thomas Huth To: Andrey Ryabinin Cc: Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH] kasan: Fix kerneldoc comments in include/linux/kasan.h Date: Tue, 11 Aug 2026 10:17:43 +0200 Message-ID: <20260811081743.1209714-1-thuth@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" From: Thomas Huth To fix warnings when generating kerneldocs for this header, let's make sure that all parameters are properly documented. And while we're at it, provide a better name for the struct kmem_cache parameter than the simple "s". Signed-off-by: Thomas Huth --- Should we maybe also include this file from Documentation/dev-tools/kasan.= rst with a ".. kernel-doc:: include/linux/kasan.h" statement? =20 include/linux/kasan.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/linux/kasan.h b/include/linux/kasan.h index bf233bde68c7e..479315d333e74 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h @@ -183,6 +183,7 @@ bool __kasan_slab_pre_free(struct kmem_cache *s, void *= object, unsigned long ip); /** * kasan_slab_pre_free - Check whether freeing a slab object is safe. + * @kcache: Cache the object belongs to. * @object: Object to be freed. * * This function checks whether freeing the given object is safe. It may @@ -192,11 +193,11 @@ bool __kasan_slab_pre_free(struct kmem_cache *s, void= *object, * * @Return true if freeing the object is unsafe; false otherwise. */ -static __always_inline bool kasan_slab_pre_free(struct kmem_cache *s, +static __always_inline bool kasan_slab_pre_free(struct kmem_cache *kcache, void *object) { if (kasan_enabled()) - return __kasan_slab_pre_free(s, object, _RET_IP_); + return __kasan_slab_pre_free(kcache, object, _RET_IP_); return false; } =20 @@ -204,9 +205,11 @@ bool __kasan_slab_free(struct kmem_cache *s, void *obj= ect, bool init, bool still_accessible, bool no_quarantine); /** * kasan_slab_free - Poison, initialize, and quarantine a slab object. + * @kcache: Cache the object belongs to. * @object: Object to be freed. * @init: Whether to initialize the object. * @still_accessible: Whether the object contents are still accessible. + * @no_quarantine: Whether to take ownership of the object to quarantine i= t. * * This function informs that a slab object has been freed and is not * supposed to be accessed anymore, except when @still_accessible is set @@ -226,14 +229,14 @@ bool __kasan_slab_free(struct kmem_cache *s, void *ob= ject, bool init, * * @Return true if KASAN took ownership of the object; false otherwise. */ -static __always_inline bool kasan_slab_free(struct kmem_cache *s, +static __always_inline bool kasan_slab_free(struct kmem_cache *kcache, void *object, bool init, bool still_accessible, bool no_quarantine) { if (kasan_enabled()) - return __kasan_slab_free(s, object, init, still_accessible, - no_quarantine); + return __kasan_slab_free(kcache, object, init, + still_accessible, no_quarantine); return false; } =20 --=20 2.55.0