From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, rafael@kernel.org,
nathanl@linux.ibm.com, mhocko@suse.com,
gregkh@linuxfoundation.org, david@redhat.com,
cheloha@linux.vnet.ibm.com, christophe.jaillet@wanadoo.fr,
akpm@linux-foundation.org
Subject: [merged mm-stable] drivers-base-memory-fix-an-unlikely-reference-counting-issue-in-__add_memory_block.patch removed from -mm tree
Date: Mon, 09 May 2022 21:12:29 -0700 [thread overview]
Message-ID: <20220510041230.089FBC385C2@smtp.kernel.org> (raw)
The quilt patch titled
Subject: drivers/base/memory: fix an unlikely reference counting issue in __add_memory_block()
has been removed from the -mm tree. Its filename was
drivers-base-memory-fix-an-unlikely-reference-counting-issue-in-__add_memory_block.patch
This patch was dropped because it was merged into mm-stable
------------------------------------------------------
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: drivers/base/memory: fix an unlikely reference counting issue in __add_memory_block()
__add_memory_block() calls both put_device() and device_unregister() when
storing the memory block into the xarray. This is incorrect because
xarray doesn't take an additional reference and device_unregister()
already calls put_device().
Triggering the issue looks really unlikely and its only effect should be
to log a spurious warning about a ref counted issue.
Link: https://lkml.kernel.org/r/d44c63d78affe844f020dc02ad6af29abc448fc4.1650611702.git.christophe.jaillet@wanadoo.fr
Fixes: 4fb6eabf1037 ("drivers/base/memory.c: cache memory blocks in xarray to accelerate lookup")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Scott Cheloha <cheloha@linux.vnet.ibm.com>
Cc: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/base/memory.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/drivers/base/memory.c~drivers-base-memory-fix-an-unlikely-reference-counting-issue-in-__add_memory_block
+++ a/drivers/base/memory.c
@@ -636,10 +636,9 @@ static int __add_memory_block(struct mem
}
ret = xa_err(xa_store(&memory_blocks, memory->dev.id, memory,
GFP_KERNEL));
- if (ret) {
- put_device(&memory->dev);
+ if (ret)
device_unregister(&memory->dev);
- }
+
return ret;
}
_
Patches currently in -mm which might be from christophe.jaillet@wanadoo.fr are
reply other threads:[~2022-05-10 4:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220510041230.089FBC385C2@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=cheloha@linux.vnet.ibm.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=david@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=mm-commits@vger.kernel.org \
--cc=nathanl@linux.ibm.com \
--cc=rafael@kernel.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.