kexec: return -EFAULT on copy_to_user() failures
copy_to/from_user() returns the number of bytes remaining to be copied.
It never returns a negative value. The correct return code is -EFAULT and
All the callers check for non-zero returns so that's Ok, but the return
code is passed to the user so we should fix this.
Signed-off-by: Dan Carpenter <firstname.lastname@example.org>
Cc: Hidetoshi Seto <email@example.com>
Cc: "Paul E. McKenney" <firstname.lastname@example.org>
Cc: "Eric W. Biederman" <email@example.com>
Cc: Simon Kagstrom <firstname.lastname@example.org>
Acked-by: WANG Cong <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.