Re: [PATCH net-next] crypto: algif - explicitly mark end of data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tadeusz Struk <tadeusz.struk@xxxxxxxxx>
Date: Mon, 30 Mar 2015 14:25:43 -0700

> +	int mark = 0, err = -ENOMEM;
>  
>  	lock_sock(sk);
>  	req = kmalloc(reqlen, GFP_KERNEL);
 ...
> @@ -573,10 +572,11 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
>  			kfree(sreq->tsg);
>  			sreq->tsg = tmp;
>  			tx_nents *= 2;
> +			mark = 1;
 ...
> @@ -604,6 +604,9 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
>  		iov_iter_advance(&msg->msg_iter, used);
>  	}
>  
> +	if (mark)
> +		sg_mark_end(sreq->tsg + txbufs - 1);

Please use type 'bool' and true/false for 'mark'.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux