mm/mempolicy.c: fix error handling in set_mempolicy and mbind.

commit cf01fb9985 upstream.

In the case that compat_get_bitmap fails we do not want to copy the
bitmap to the user as it will contain uninitialized stack data and leak
sensitive data.

Signed-off-by: Chris Salls <salls@cs.ucsb.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Chris Salls 2017-04-07 23:48:11 -07:00 • committed by Greg Kroah-Hartman
commit cddab768d1