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: <1377881203.7360.15.camel@edumazet-glaptop>
Date:	Fri, 30 Aug 2013 09:46:43 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev <netdev@...r.kernel.org>
Subject: [PATCH net-next] pkt_sched: fq: prefetch() fix

From: Eric Dumazet <edumazet@...gle.com>

kbuild bot reported following m68k build error :

  net/sched/sch_fq.c: In function 'fq_dequeue':
>> net/sched/sch_fq.c:491:2: error: implicit declaration of function
'prefetch' [-Werror=implicit-function-declaration]
   cc1: some warnings being treated as errors


While we are fixing this, move this prefetch() call a bit earlier.

Reported-by: Wu Fengguang <fengguang.wu@...el.com>
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
---
 net/sched/sch_fq.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index 91ceca7..32ad015 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -46,6 +46,7 @@
 #include <linux/slab.h>
 #include <linux/rbtree.h>
 #include <linux/hash.h>
+#include <linux/prefetch.h>
 #include <net/netlink.h>
 #include <net/pkt_sched.h>
 #include <net/sock.h>
@@ -461,6 +462,7 @@ begin:
 		}
 		goto begin;
 	}
+	prefetch(&skb->end);
 	f->time_next_packet = now;
 	f->credit -= qdisc_pkt_len(skb);
 
@@ -488,7 +490,6 @@ begin:
 		}
 	}
 out:
-	prefetch(&skb->end);
 	sch->qstats.backlog -= qdisc_pkt_len(skb);
 	qdisc_bstats_update(sch, skb);
 	sch->q.qlen--;


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

Powered by Openwall GNU/*/Linux Powered by OpenVZ