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: <c68813736c92f28f78f1c8cc8f362e4c964f7899.1453240529.git.marcelo.leitner@gmail.com>
Date:	Tue, 19 Jan 2016 19:59:03 -0200
From:	Marcelo Ricardo Leitner <mleitner@...hat.com>
To:	netdev@...r.kernel.org
Cc:	Vlad Yasevich <vyasevich@...il.com>,
	Neil Horman <nhorman@...driver.com>,
	Xin Long <lucien.xin@...il.com>
Subject: [PATCH net] sctp: fix rcu usage on proc listing

From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>

commit 39f66a7dce32 ("sctp: apply rhashtable api to sctp procfs")
removed a rcu_read_lock() too much at sctp_remaddr_seq_show().

Fixes: 39f66a7dce32 ("sctp: apply rhashtable api to sctp procfs")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
---
 net/sctp/proc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index dfa7eeccb5373053f460f1026a58e4a2ba015a69..4fdf4387910696492ba568b1096dd12e8e7221e2 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -491,6 +491,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
 	tsp = (struct sctp_transport *)v;
 	assoc = tsp->asoc;
 
+	rcu_read_lock();
 	list_for_each_entry_rcu(tsp, &assoc->peer.transport_addr_list,
 				transports) {
 		if (tsp->dead)
@@ -543,6 +544,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
 
 		seq_printf(seq, "\n");
 	}
+	rcu_read_unlock();
 
 	return 0;
 }
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ