lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1509621307-152457-1-git-send-email-weiyongjun1@huawei.com>
Date:   Thu, 2 Nov 2017 11:15:07 +0000
From:   Wei Yongjun <weiyongjun1@...wei.com>
To:     Ganesh Goudar <ganeshgr@...lsio.com>,
        Kumar Sanghvi <kumaras@...lsio.com>
CC:     Wei Yongjun <weiyongjun1@...wei.com>, <netdev@...r.kernel.org>
Subject: [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter()

Fix to return a negative error code from thecxgb4_alloc_atid()
error handling case instead of 0.

Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters")
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index abab67d..5980f30 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -1110,8 +1110,10 @@ static int cxgb4_set_hash_filter(struct net_device *dev,
 	}
 
 	atid = cxgb4_alloc_atid(t, f);
-	if (atid < 0)
+	if (atid < 0) {
+		ret = atid;
 		goto free_smt;
+	}
 
 	iconf = adapter->params.tp.ingress_config;
 	if (iconf & VNIC_F) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ