[PATCH] check put_user fail in do_signal when enable OABI_COMPACT

Jamie Lokier jamie at shareable.org
Wed Oct 28 15:32:34 EDT 2009


Jean Pihet wrote:
>  				usp = (u32 __user *)regs->ARM_sp;
>  
> -				put_user(regs->ARM_pc, usp);
> -				regs->ARM_pc = KERN_RESTART_CODE;
> +				if (put_user(regs->ARM_pc, usp) == 0) {
> +					regs->ARM_pc = KERN_RESTART_CODE;
> +				} else {
> +					regs->ARM_sp += 4;
> +					force_sigsegv(0, current);
> +				}
>  #endif
>  			}
>  		}

This one looks good to me.

-- Jamie



More information about the linux-arm-kernel mailing list