aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/lists.py
diff options
context:
space:
mode:
authorNeilBrown <[email protected]>2021-02-25 17:22:29 -0800
committerLinus Torvalds <[email protected]>2021-02-26 09:41:05 -0800
commit3d2fc4c082448e9c05792f9b2a11c1d5db408b85 (patch)
treec5a868257f23c4819b85b10fd5e09f46f3b50b31 /scripts/gdb/linux/lists.py
parentb3656d8227f4c45812c6b40815d8f4e446ed372a (diff)
x86: fix seq_file iteration for pat/memtype.c
The memtype seq_file iterator allocates a buffer in the ->start and ->next functions and frees it in the ->show function. The preferred handling for such resources is to free them in the subsequent ->next or ->stop function call. Since Commit 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") there is no guarantee that ->show will be called after ->next, so this function can now leak memory. So move the freeing of the buffer to ->next and ->stop. Link: https://lkml.kernel.org/r/161248539022.21478.13874455485854739066.stgit@noble1 Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") Signed-off-by: NeilBrown <[email protected]> Cc: Xin Long <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Marcelo Ricardo Leitner <[email protected]> Cc: Neil Horman <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Vlad Yasevich <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions