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: <1233936169-5243-1-git-send-email-anemo@mba.ocn.ne.jp>
Date:	Sat,  7 Feb 2009 01:02:49 +0900
From:	Atsushi Nemoto <anemo@....ocn.ne.jp>
To:	Dan Williams <dan.j.williams@...el.com>
Cc:	Maciej Sosnowski <maciej.sosnowski@...el.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] net_dma: call dmaengine_get only if NET_DMA enabled

The commit 649274d993212e7c23c0cb734572c2311c200872 ("net_dma:
acquire/release dma channels on ifup/ifdown") added unconditional call
of dmaengine_get() to net_dma.  The API should be called only if
NET_DMA was enabled.

Signed-off-by: Atsushi Nemoto <anemo@....ocn.ne.jp>
---
 net/core/dev.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 5379b0c..3d510d4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1087,10 +1087,12 @@ int dev_open(struct net_device *dev)
 		 */
 		dev->flags |= IFF_UP;
 
+#ifdef CONFIG_NET_DMA
 		/*
 		 *	Enable NET_DMA
 		 */
 		dmaengine_get();
+#endif
 
 		/*
 		 *	Initialize multicasting status
@@ -1169,10 +1171,12 @@ int dev_close(struct net_device *dev)
 	 */
 	call_netdevice_notifiers(NETDEV_DOWN, dev);
 
+#ifdef CONFIG_NET_DMA
 	/*
 	 *	Shutdown NET_DMA
 	 */
 	dmaengine_put();
+#endif
 
 	return 0;
 }
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ