]> git.karo-electronics.de Git - karo-tx-linux.git/commit
regset: Prevent null pointer reference on readonly regsets
authorH. Peter Anvin <hpa@zytor.com>
Fri, 2 Mar 2012 18:43:48 +0000 (10:43 -0800)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:00 +0000 (15:35 -0400)
commit5800b0b508a0af7d6a0d91eeef3d159be80534ab
tree6813de8d8a8c7854ebf1340afb45381e733268cf
parent5bfc315baf02e3f3093c48af4ce7c798ea9778aa
regset: Prevent null pointer reference on readonly regsets

commit c8e252586f8d5de906385d8cf6385fee289a825e upstream.

The regset common infrastructure assumed that regsets would always
have .get and .set methods, but not necessarily .active methods.
Unfortunately people have since written regsets without .set methods.

Rather than putting in stub functions everywhere, handle regsets with
null .get or .set methods explicitly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@hack.frob.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/binfmt_elf.c
include/linux/regset.h