summaryrefslogtreecommitdiffstats
path: root/crypto/dh_helper.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior2016-09-08 13:48:05 +0200
committerKees Cook2016-09-08 23:58:00 +0200
commit4407de74df18ed405cc5998990004c813ccfdbde (patch)
tree757205808fa294bbf533099aa991ebaff20d06cb /crypto/dh_helper.c
parentMerge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang... (diff)
downloadkernel-qcow2-linux-4407de74df18ed405cc5998990004c813ccfdbde.tar.gz
kernel-qcow2-linux-4407de74df18ed405cc5998990004c813ccfdbde.tar.xz
kernel-qcow2-linux-4407de74df18ed405cc5998990004c813ccfdbde.zip
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 <anton@enomsg.org> Cc: Colin Cross <ccross@android.com> Cc: Kees Cook <keescook@chromium.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org # 4.4.x-
Diffstat (limited to 'crypto/dh_helper.c')
0 files changed, 0 insertions, 0 deletions