diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-10 14:48:12 -0600 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-10 14:48:12 -0600 |
commit | 092f6239108d3c612f5e1c67d9cd0cc80461fc91 (patch) | |
tree | 547d9591bd3d7243c066ae112f3844595c0d550c /kernel | |
parent | 40c18f363a0806d4f566e8a9a9bd2d7766a72cf5 (diff) | |
parent | 4414c1f5c7a375eaa108676a56e12cc8234eb647 (diff) | |
download | linux-stable-092f6239108d3c612f5e1c67d9cd0cc80461fc91.tar.gz linux-stable-092f6239108d3c612f5e1c67d9cd0cc80461fc91.tar.bz2 linux-stable-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; } |