diff options
| author | Yu Kuai <[email protected]> | 2025-06-30 11:28:28 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-07-01 14:14:01 +0000 |
| commit | 0d519bb0de3bf0ac9e6f401d4910fc119062d7be (patch) | |
| tree | 953f5e9d53b326fd7c23be0a1813fad723a11282 /lib/crypto/mpi/mpicoder.c | |
| parent | ublk: don't queue request if the associated uring_cmd is canceled (diff) | |
| download | kernel-0d519bb0de3bf0ac9e6f401d4910fc119062d7be.tar.gz kernel-0d519bb0de3bf0ac9e6f401d4910fc119062d7be.zip | |
brd: fix sleeping function called from invalid context in brd_insert_page()
__xa_cmpxchg() is called with rcu_read_lock(), and it will allocate
memory if necessary.
Fix the problem by moving rcu_read_lock() after __xa_cmpxchg(), meanwhile,
it still should be held before xa_unlock(), prevent returned page to be
freed by concurrent discard.
Fixes: bbcacab2e8ee ("brd: avoid extra xarray lookups on first write")
Reported-by: [email protected]
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Yu Kuai <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpicoder.c')
0 files changed, 0 insertions, 0 deletions
