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: <41b516cb0608011133r2332161dx4b43a845bfa74062@mail.gmail.com>
Date:	Tue, 1 Aug 2006 11:33:02 -0700
From:	"Chris Leech" <christopher.leech@...el.com>
To:	"David Miller" <davem@...emloft.net>
Cc:	dan.j.williams@...el.com, linux-kernel@...r.kernel.org,
	neilb@...e.de, galak@...nel.crashing.org, alan@...rguk.ukuu.org.uk
Subject: [PATCH] I/OAT: remove CPU hotplug lock from net_dma_rebalance

Remove the lock_cpu_hotplug()/unlock_cpu_hotplug() calls from net_dma_rebalance

The lock_cpu_hotplug()/unlock_cpu_hotplug() sequence in net_dma_rebalance
is both incorrect (as pointed out by David Miller) because lock_cpu_hotplug()
may sleep while the net_dma_event_lock spinlock is held, and unnecessary (as
pointed out by Andrew Morton) as spin_lock() disables preemption which
protects from CPU hotplug events.

Signed-off-by: Chris Leech <christopher.leech@...el.com>
---

  net/core/dev.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 4d2b516..780d770 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3429,12 +3429,9 @@ static void net_dma_rebalance(void)
        unsigned int cpu, i, n;
        struct dma_chan *chan;

-       lock_cpu_hotplug();
-
        if (net_dma_count == 0) {
                for_each_online_cpu(cpu)

rcu_assign_pointer(per_cpu(softnet_data.net_dma, cpu), NULL);
-               unlock_cpu_hotplug();
                return;
        }

@@ -3454,8 +3451,6 @@ static void net_dma_rebalance(void)
                i++;
        }
        rcu_read_unlock();
-
-       unlock_cpu_hotplug();
 }

 /**
-
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