diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2016-09-08 13:48:05 +0200 |
---|---|---|
committer | Kees Cook <[email protected]> | 2016-09-08 14:58:00 -0700 |
commit | 4407de74df18ed405cc5998990004c813ccfdbde (patch) | |
tree | 757205808fa294bbf533099aa991ebaff20d06cb /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | d71f058617564750261b673ea9b3352382b9cde4 (diff) |
pstore/ramoops: fixup driver removal
A basic rmmod ramoops segfaults. Let's see why.
Since commit 34f0ec82e0a9 ("pstore: Correct the max_dump_cnt clearing of
ramoops") sets ->max_dump_cnt to zero before looping over ->przs but we
didn't use it before that either.
And since commit ee1d267423a1 ("pstore: add pstore unregister") we free
that memory on rmmod.
But even then, we looped until a NULL pointer or ERR. I don't see where
it is ensured that the last member is NULL. Let's try this instead:
simply error recovery and free. Clean up in error case where resources
were allocated. And then, in the free path, rely on ->max_dump_cnt in
the free path.
Cc: Anton Vorontsov <[email protected]>
Cc: Colin Cross <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Namhyung Kim <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Cc: [email protected] # 4.4.x-
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions