[CRIU] [RFC PATCH] ipc: use kernel buffer for peeking messages

Cyrill Gorcunov gorcunov at openvz.org
Tue Apr 17 10:12:05 EDT 2012


On Tue, Apr 17, 2012 at 05:51:03PM +0400, Stanislav Kinsbursky wrote:
>  
>  #ifdef CONFIG_CHECKPOINT_RESTORE
> -	if (msgflg & MSG_PEEK_ALL)
> +	if (msgflg & MSG_PEEK_ALL) {
> +		if (copy_to_user(buf, kbuf, bufsz - arrsz))
> +			return -EFAULT;

kbuf leak?

> +		kfree(kbuf);
>  		return bufsz - arrsz;
> +	}
>  #endif

	Cyrill


More information about the CRIU mailing list