netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryder Lee <ryder.lee@mediatek.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, Sabrina Dubroca <sd@queasysnail.net>,
	<linux-mediatek@lists.infradead.org>,
	Ryder Lee <ryder.lee@mediatek.com>
Subject: [RESEND PATCH net] macsec: fix validation failed in asynchronous operation.
Date: Sat, 21 Jan 2017 16:42:07 +0800	[thread overview]
Message-ID: <1484988127-25860-1-git-send-email-ryder.lee@mediatek.com> (raw)

Add missing "macsec_skb_cb(skb)->valid = true" in callback
function macsec_decrypt_done(), this fixes packet validation
failed while decrypting asynchronously.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 drivers/net/macsec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index f83cf66..73d8d39 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -880,6 +880,9 @@ static void macsec_decrypt_done(struct crypto_async_request *base, int err)
 	aead_request_free(macsec_skb_cb(skb)->req);
 
 	rcu_read_lock_bh();
+	if (err == 0)
+		macsec_skb_cb(skb)->valid = true;
+
 	pn = ntohl(macsec_ethhdr(skb)->packet_number);
 	if (!macsec_post_decrypt(skb, &macsec->secy, pn)) {
 		rcu_read_unlock_bh();
-- 
1.9.1

             reply	other threads:[~2017-01-21  8:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21  8:42 Ryder Lee [this message]
     [not found] ` <1484988127-25860-1-git-send-email-ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-01-22 21:44   ` [RESEND PATCH net] macsec: fix validation failed in asynchronous operation David Miller
2017-01-23  1:39     ` Ryder Lee

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=1484988127-25860-1-git-send-email-ryder.lee@mediatek.com \
    --to=ryder.lee@mediatek.com \
    --cc=davem@davemloft.net \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    /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;
as well as URLs for NNTP newsgroup(s).