public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tadeusz.struk@intel.com
Cc: netdev@vger.kernel.org, linux-crypto@vger.kernel.org,
	herbert@gondor.apana.org.au
Subject: Re: [PATCH net-next] crypto: algif - explicitly mark end of data
Date: Wed, 01 Apr 2015 15:32:02 -0400 (EDT)	[thread overview]
Message-ID: <20150401.153202.1090532458862532893.davem@davemloft.net> (raw)
In-Reply-To: <20150330212543.7133.97653.stgit@tstruk-mobl1>

From: Tadeusz Struk <tadeusz.struk@intel.com>
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'.

      reply	other threads:[~2015-04-01 19:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 21:25 [PATCH net-next] crypto: algif - explicitly mark end of data Tadeusz Struk
2015-04-01 19:32 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150401.153202.1090532458862532893.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tadeusz.struk@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox