From patchwork Thu Nov 10 19:01:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Bowler X-Patchwork-Id: 124983 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DA9FB1007D1 for ; Fri, 11 Nov 2011 06:02:01 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933092Ab1KJTBi (ORCPT ); Thu, 10 Nov 2011 14:01:38 -0500 Received: from dsl-67-204-24-19.acanac.net ([67.204.24.19]:40923 "EHLO mail.ellipticsemi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933082Ab1KJTBh (ORCPT ); Thu, 10 Nov 2011 14:01:37 -0500 Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76) (envelope-from ) id 1ROZsT-0005dS-Re; Thu, 10 Nov 2011 14:01:33 -0500 From: Nick Bowler To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "David S. Miller" Subject: [PATCH] ah: Don't return NET_XMIT_DROP on input. Date: Thu, 10 Nov 2011 14:01:27 -0500 Message-Id: <1320951687-21491-1-git-send-email-nbowler@elliptictech.com> X-Mailer: git-send-email 1.7.3.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When the ahash driver returns -EBUSY, AH4/6 input functions return NET_XMIT_DROP, presumably copied from the output code path. But returning transmit codes on input doesn't make a lot of sense. Since NET_XMIT_DROP is a positive int, this gets interpreted as the next header type (i.e., success). As that can only end badly, remove the check. Signed-off-by: Nick Bowler --- This appears to be another longstanding issue (since the initial ahash conversion circa 2.6.33), but there doesn't seem to be many ahash drivers in the tree that can possibly trigger it. Furthermore, most if not all of these drivers require special hardware. net/ipv4/ah4.c | 2 -- net/ipv6/ah6.c | 2 -- 2 files changed, 0 insertions(+), 4 deletions(-) diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index c7056b2..36d1440 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -369,8 +369,6 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) if (err == -EINPROGRESS) goto out; - if (err == -EBUSY) - err = NET_XMIT_DROP; goto out_free; } diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index eb71dbc..0873a21 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -581,8 +581,6 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb) if (err == -EINPROGRESS) goto out; - if (err == -EBUSY) - err = NET_XMIT_DROP; goto out_free; }