linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: locking/kcsan] kcsan: Use GFP_ATOMIC under spin lock
@ 2020-05-08 13:46 tip-bot2 for Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Wei Yongjun @ 2020-05-08 13:46 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Marco Elver, Wei Yongjun, Paul E. McKenney, x86, LKML

The following commit has been merged into the locking/kcsan branch of tip:

Commit-ID:     52785b6ae8eded7ac99d65c92d989b702e5b4376
Gitweb:        https://git.kernel.org/tip/52785b6ae8eded7ac99d65c92d989b702e5b4376
Author:        Wei Yongjun <weiyongjun1@huawei.com>
AuthorDate:    Fri, 17 Apr 2020 02:58:37 
Committer:     Paul E. McKenney <paulmck@kernel.org>
CommitterDate: Mon, 27 Apr 2020 11:10:10 -07:00

kcsan: Use GFP_ATOMIC under spin lock

A spin lock is held in insert_report_filterlist(), so the krealloc()
should use GFP_ATOMIC.  This commit therefore makes this change.

Reviewed-by: Marco Elver <elver@google.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/kcsan/debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c
index 1a08664..023e49c 100644
--- a/kernel/kcsan/debugfs.c
+++ b/kernel/kcsan/debugfs.c
@@ -230,7 +230,7 @@ static ssize_t insert_report_filterlist(const char *func)
 		/* initial allocation */
 		report_filterlist.addrs =
 			kmalloc_array(report_filterlist.size,
-				      sizeof(unsigned long), GFP_KERNEL);
+				      sizeof(unsigned long), GFP_ATOMIC);
 		if (report_filterlist.addrs == NULL) {
 			ret = -ENOMEM;
 			goto out;
@@ -240,7 +240,7 @@ static ssize_t insert_report_filterlist(const char *func)
 		size_t new_size = report_filterlist.size * 2;
 		unsigned long *new_addrs =
 			krealloc(report_filterlist.addrs,
-				 new_size * sizeof(unsigned long), GFP_KERNEL);
+				 new_size * sizeof(unsigned long), GFP_ATOMIC);
 
 		if (new_addrs == NULL) {
 			/* leave filterlist itself untouched */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-08 13:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 13:46 [tip: locking/kcsan] kcsan: Use GFP_ATOMIC under spin lock tip-bot2 for Wei Yongjun

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).