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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri,  1 Aug 2008 14:49:48 -0700
From:	Chris Larson <clarson@...sta.com>
To:	netdev@...r.kernel.org
Cc:	Chris Larson <clarson@...sta.com>
Subject: [PATCH 1/2] net: in the first call to neigh_seq_next, call neigh_get_first, not neigh_get_idx.

neigh_seq_next won't be called both with *pos > 0 && v == SEQ_START_TOKEN,
so there's no point calling neigh_get_idx when we're on the start token,
just call neigh_get_first directly.

Signed-off-by: Chris Larson <clarson@...sta.com>
---
 net/core/neighbour.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index f62c8af..a57de75 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2385,7 +2385,7 @@ void *neigh_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 	void *rc;
 
 	if (v == SEQ_START_TOKEN) {
-		rc = neigh_get_idx(seq, pos);
+		rc = neigh_get_first(seq);
 		goto out;
 	}
 
-- 
1.5.5.1.147.g867f

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists