/* Note that any single message having a length smaller than or equal to the SCTP partial delivery point will be delivered in one single read call as long as the user provided buffer is large enough to hold the message.  */
static int sctp_setsockopt_partial_delivery_point(struct sock *sk, char __user *optval, unsigned int optlen)
/* Note that any single message having a length smaller than or equal to the SCTP partial delivery point will be delivered in one single read call as long as the user provided buffer is large enough to hold the message.  */
static int sctp_setsockopt_partial_delivery_point(struct sock *sk, char __user *optval, unsigned int optlen)
{
	u32 val;
	if (optlen != sizeof(u32))
		return -EINVAL;
	if (get_user(val, (int __user *)optval))
		return -EFAULT;
	if (val > (sk->sk_rcvbuf >> 1))
		return -EINVAL;
	sctp_sk(sk)->pd_point = val;
	return 0;
}