From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Matthew Wilcox <willy@infradead.org>,
Nicholas Piggin <npiggin@gmail.com>,
Uladzislau Rezki <urezki@gmail.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>
Subject: [PATCH 3/5] mm/vmalloc: Initialize VA's list node after unlink
Date: Tue, 7 Jun 2022 11:34:47 +0200 [thread overview]
Message-ID: <20220607093449.3100-4-urezki@gmail.com> (raw)
In-Reply-To: <20220607093449.3100-1-urezki@gmail.com>
A vmap_area can travel between different places. For example
attached/detached to/from different rb-trees. In order to
prevent fancy bugs, initialize a VA's list node after it is
removed from the list, so it pairs with VA's rb_node which
is also initialized.
There is no functional change as a result of this patch.
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 745e89eb6ca1..82771e555273 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -978,7 +978,7 @@ __unlink_va(struct vmap_area *va, struct rb_root *root, bool augment)
else
rb_erase(&va->rb_node, root);
- list_del(&va->list);
+ list_del_init(&va->list);
RB_CLEAR_NODE(&va->rb_node);
}
--
2.30.2
next prev parent reply other threads:[~2022-06-07 9:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 9:34 [PATCH 0/5] Reduce a vmalloc internal lock contention preparation work Uladzislau Rezki (Sony)
2022-06-07 9:34 ` [PATCH 1/5] mm/vmalloc: Make link_va()/unlink_va() common to different rb_root Uladzislau Rezki (Sony)
2022-06-08 3:45 ` Baoquan He
2022-06-07 9:34 ` [PATCH 2/5] mm/vmalloc: Extend __alloc_vmap_area() with extra arguments Uladzislau Rezki (Sony)
2022-06-07 9:49 ` Christoph Hellwig
2022-06-07 13:02 ` Uladzislau Rezki
2022-06-10 8:18 ` Christoph Hellwig
2022-06-08 3:46 ` Baoquan He
2022-06-07 9:34 ` Uladzislau Rezki (Sony) [this message]
2022-06-08 3:19 ` [PATCH 3/5] mm/vmalloc: Initialize VA's list node after unlink Baoquan He
2022-06-09 12:36 ` Uladzislau Rezki
2022-06-09 13:30 ` Baoquan He
2022-06-09 13:53 ` Uladzislau Rezki
2022-06-07 9:34 ` [PATCH 4/5] mm/vmalloc: Extend __find_vmap_area() with one more argument Uladzislau Rezki (Sony)
2022-06-07 9:47 ` Christoph Hellwig
2022-06-07 13:03 ` Uladzislau Rezki
2022-06-08 3:47 ` Baoquan He
2022-06-07 9:34 ` [PATCH 5/5] lib/test_vmalloc: Switch to prandom_u32() Uladzislau Rezki (Sony)
2022-06-07 22:35 ` [PATCH 0/5] Reduce a vmalloc internal lock contention preparation work Andrew Morton
2022-06-08 10:05 ` Uladzislau Rezki
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=20220607093449.3100-4-urezki@gmail.com \
--to=urezki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@gmail.com \
--cc=oleksiy.avramchenko@sony.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.