Files
linux/kernel
Andrii Nakryiko b63cbc490e bpf: remember meta->iter info only for initialized iters
For iter_new() functions iterator state's slot might not be yet
initialized, in which case iter_get_spi() will return -ERANGE. This is
expected and is handled properly. But for iter_next() and iter_destroy()
cases iter slot is supposed to be initialized and correct, so -ERANGE is
not possible.

Move meta->iter.{spi,frameno} initialization into iter_next/iter_destroy
handling branch to make it more explicit that valid information will be
remembered in meta->iter block for subsequent use in process_iter_next_call(),
avoiding confusingly looking -ERANGE assignment for meta->iter.spi.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin KaFai Lau <[email protected]>
2023-03-22 17:04:47 -07:00
..
2022-12-02 11:25:00 +01:00
2022-12-21 14:31:52 -08:00
…
2022-08-29 19:47:03 -04:00
2022-09-26 10:13:13 -07:00
…
…
…
…
2022-11-15 00:42:02 -08:00
…
…
2023-02-02 16:26:06 -08:00
2022-06-29 13:07:16 +02:00
2022-12-27 12:52:10 +01:00
…
…
…
2023-02-21 13:34:07 -08:00
…
…
…
…