diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-27 22:03:31 +0200 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-07-28 10:11:11 -0700 |
| commit | 737a3b535247226f6e1a7988fd9d6e63e7d6fc71 (patch) | |
| tree | f6e9c1fc6d78612f3c7154532ccc4a038c0cec33 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 9952f3882ecba709092379b71e02b09762b26f96 (diff) | |
nvmet-tcp: Do not WARN on remotely-controlled oversized SGL allocations
When fuzzing the nvme target code, I tripped a kernel warning in
nvmet_tcp_map_data() because the length passed into the allocator is
controlled by the remote initiator.
A remote initiator that sends a command with an SGL claiming a huge
number, can create a scatterlist and iovec allocation of over 1 million
entries, which causes the backing kmalloc call to exceed MAX_PAGE_ORDER
and then the page allocator will trip on a WARN_ON_ONCE_GFP() message:
WARNING: mm/page_alloc.c:5280 __alloc_frozen_pages_noprof
Workqueue: nvmet_tcp_wq nvmet_tcp_io_work
...
sgl_alloc_order
nvmet_tcp_map_data
nvmet_tcp_try_recv_pdu
As it's never good to trip a kernel warning remotely due to many systems
having panic-on-warn enabled, let's silence it by just add GFP_NOWARN to
the allocation flags.
Assisted-by: gkh_clanker_2000
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
