From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Vlastimil Babka <vbabka@suse•cz>,
Andrew Morton <akpm@linux-foundation•org>
Cc: Andrey Konovalov <andreyknvl@gmail•com>,
Andrey Konovalov <andreyknvl@google•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the slab tree with the mm tree
Date: Mon, 27 Nov 2023 12:29:02 +1100 [thread overview]
Message-ID: <20231127122902.566de6d1@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1823 bytes --]
Hi all,
Today's linux-next merge of the slab tree got a conflict in:
mm/kasan/quarantine.c
between commit:
f644ee35cf5b ("kasan: use stack_depot_put for Generic mode")
from the mm tree and commit:
40a038d5fc11 ("KASAN: remove code paths guarded by CONFIG_SLAB")
from the slab tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc mm/kasan/quarantine.c
index 265ca2bbe2dd,138c57b836f2..000000000000
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@@ -143,22 -143,7 +143,21 @@@ static void *qlink_to_object(struct qli
static void qlink_free(struct qlist_node *qlink, struct kmem_cache *cache)
{
void *object = qlink_to_object(qlink, cache);
- struct kasan_free_meta *meta = kasan_get_free_meta(cache, object);
+ struct kasan_alloc_meta *alloc_meta = kasan_get_alloc_meta(cache, object);
+ struct kasan_free_meta *free_meta = kasan_get_free_meta(cache, object);
- unsigned long flags;
+
+ if (alloc_meta) {
+ stack_depot_put(alloc_meta->alloc_track.stack);
+ stack_depot_put(alloc_meta->aux_stack[0]);
+ stack_depot_put(alloc_meta->aux_stack[1]);
+ __memset(alloc_meta, 0, sizeof(*alloc_meta));
+ }
+
+ if (free_meta &&
+ *(u8 *)kasan_mem_to_shadow(object) == KASAN_SLAB_FREETRACK) {
+ stack_depot_put(free_meta->free_track.stack);
+ free_meta->free_track.stack = 0;
+ }
/*
* If init_on_free is enabled and KASAN's free metadata is stored in
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2023-11-27 1:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 1:29 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-16 4:27 linux-next: manual merge of the slab tree with the mm tree Stephen Rothwell
2025-01-22 3:18 ` Stephen Rothwell
2024-01-02 4:34 Stephen Rothwell
2024-01-02 4:02 Stephen Rothwell
2023-12-21 6:34 Stephen Rothwell
2023-06-19 4:03 Stephen Rothwell
2023-06-19 12:16 ` Catalin Marinas
2023-04-05 4:08 Stephen Rothwell
2023-04-05 4:10 ` Yosry Ahmed
2023-03-17 1:44 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231127122902.566de6d1@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=akpm@linux-foundation$(echo .)org \
--cc=andreyknvl@gmail$(echo .)com \
--cc=andreyknvl@google$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=vbabka@suse$(echo .)cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox