1LIST_SAFE_RESET_NEXT(9)           Data Types           LIST_SAFE_RESET_NEXT(9)
2
3
4

NAME

6       list_safe_reset_next - reset a stale list_for_each_entry_safe loop
7

SYNOPSIS

9       list_safe_reset_next(pos, n, member);
10

ARGUMENTS

12       pos
13           the loop cursor used in the list_for_each_entry_safe loop
14
15       n
16           temporary storage used in list_for_each_entry_safe
17
18       member
19           the name of the list_struct within the struct.
20

DESCRIPTION

22       list_safe_reset_next is not safe to use in general if the list may be
23       modified concurrently (eg. the lock is dropped in the loop body). An
24       exception to this is if the cursor element (pos) is pinned in the list,
25       and list_safe_reset_next is called after re-taking the lock and before
26       completing the current iteration of the loop body.
27
29Kernel Hackers Manual 2.6.         June 2019           LIST_SAFE_RESET_NEXT(9)
Impressum