Commit 1cc6571
netdev: Enforce index cap in netdev_get_tx_queue
When requesting a TX queue at a given index, warn on out-of-bounds
referencing if the index is greater than the allocated number of
queues.
Specifically, since this function is used heavily in the networking
stack use DEBUG_NET_WARN_ON_ONCE to avoid executing a new branch on
every packet.
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Link: https://lore.kernel.org/r/20230321150725.127229-2-nnac123@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 5dd0dfd commit 1cc6571
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2484 | 2484 | | |
2485 | 2485 | | |
2486 | 2486 | | |
| 2487 | + | |
2487 | 2488 | | |
2488 | 2489 | | |
2489 | 2490 | | |
| |||
0 commit comments