* + radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null.patch added to -mm tree
@ 2017-10-10 20:54 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-10-10 20:54 UTC (permalink / raw)
To: richard.weiyang, mawilcox, mm-commits
The patch titled
Subject: radix-tree: get_slot_offset() returns invalid offset when parent is NULL
has been added to the -mm tree. Its filename is
radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Wei Yang <richard.weiyang@gmail.com>
Subject: radix-tree: get_slot_offset() returns invalid offset when parent is NULL
Needs new changelog. And maybe a -stable backport?
Link: http://lkml.kernel.org/r/20171010025201.5895-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/radix-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN lib/radix-tree.c~radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null lib/radix-tree.c
--- a/lib/radix-tree.c~radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null
+++ a/lib/radix-tree.c
@@ -119,7 +119,7 @@ bool is_sibling_entry(const struct radix
static inline unsigned long
get_slot_offset(const struct radix_tree_node *parent, void __rcu **slot)
{
- return slot - parent->slots;
+ return parent ? (slot - parent->slots):0;
}
static unsigned int radix_tree_descend(const struct radix_tree_node *parent,
_
Patches currently in -mm which might be from richard.weiyang@gmail.com are
radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null.patch
mm-page_alloc-return-0-in-case-this-node-has-no-page-within-the-zone.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-10 20:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 20:54 + radix-tree-get_slot_offset-returns-invalid-offset-when-parent-is-null.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).