[PATCH 0/3] Fix some seq_file users that were recently broken

From: NeilBrown
Date: Thu Feb 04 2021 - 19:47:28 EST


A recent change to seq_file broke some users which were using seq_file
in a non-"standard" way ... though the "standard" isn't documented, so
they can be excused. The result is a possible leak - of memory in one
case, of references to a 'transport' in the other.

These three patches:
1/ document and explain the problem
2/ fix the problem user in x86
3/ fix the problem user in net/sctp

I suspect the patches should each go through the relevant subsystems,
but I'm including akpm as the original went through him.

Thanks,
NeilBrown

---

NeilBrown (3):
seq_file: document how per-entry resources are managed.
x86: fix seq_file iteration for pat/memtype.c
net: fix iteration for sctp transport seq_files

Documentation/filesystems/seq_file.rst | 6 ++++++
arch/x86/mm/pat/memtype.c | 4 ++--
net/sctp/proc.c | 16 ++++++++++++----
3 files changed, 20 insertions(+), 6 deletions(-)

--
Signature