diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-10 21:48:12 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-10 21:48:12 +0100 |
commit | 092f6239108d3c612f5e1c67d9cd0cc80461fc91 (patch) | |
tree | 547d9591bd3d7243c066ae112f3844595c0d550c /kernel | |
parent | Merge tag '6.2-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd (diff) | |
parent | xtensa: drop unused members of struct thread_struct (diff) | |
download | linux-092f6239108d3c612f5e1c67d9cd0cc80461fc91.tar.xz linux-092f6239108d3c612f5e1c67d9cd0cc80461fc91.zip |
Merge tag 'xtensa-20230110' of https://github.com/jcmvbkbc/linux-xtensa
Pull xtensa fixes from Max Filippov:
- fix xtensa allmodconfig build broken by the kcsan test
- drop unused members of struct thread_struct
* tag 'xtensa-20230110' of https://github.com/jcmvbkbc/linux-xtensa:
xtensa: drop unused members of struct thread_struct
kcsan: test: don't put the expect array on the stack
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kcsan/kcsan_test.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c index dcec1b743c69..a60c561724be 100644 --- a/kernel/kcsan/kcsan_test.c +++ b/kernel/kcsan/kcsan_test.c @@ -159,7 +159,7 @@ static bool __report_matches(const struct expect_report *r) const bool is_assert = (r->access[0].type | r->access[1].type) & KCSAN_ACCESS_ASSERT; bool ret = false; unsigned long flags; - typeof(observed.lines) expect; + typeof(*observed.lines) *expect; const char *end; char *cur; int i; @@ -168,6 +168,10 @@ static bool __report_matches(const struct expect_report *r) if (!report_available()) return false; + expect = kmalloc(sizeof(observed.lines), GFP_KERNEL); + if (WARN_ON(!expect)) + return false; + /* Generate expected report contents. */ /* Title */ @@ -253,6 +257,7 @@ static bool __report_matches(const struct expect_report *r) strstr(observed.lines[2], expect[1]))); out: spin_unlock_irqrestore(&observed.lock, flags); + kfree(expect); return ret; } |