linux-next: manual merge of the net-next tree with the net tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/packet/af_packet.c

between commit:

  468479e6043c ("packet: avoid out of bounds read in round robin fanout")

from the net tree and commit:

  3b3a5b0aab5b ("packet: rollover huge flows before small flows")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc net/packet/af_packet.c
index fe1610ddeacf,20e8c40da90d..000000000000
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@@ -1272,6 -1326,30 +1326,20 @@@ static void packet_sock_destruct(struc
  	sk_refcnt_debug_dec(sk);
  }
  
 -static int fanout_rr_next(struct packet_fanout *f, unsigned int num)
 -{
 -	int x = atomic_read(&f->rr_cur) + 1;
 -
 -	if (x >= num)
 -		x = 0;
 -
 -	return x;
 -}
 -
+ static bool fanout_flow_is_huge(struct packet_sock *po, struct sk_buff *skb)
+ {
+ 	u32 rxhash;
+ 	int i, count = 0;
+ 
+ 	rxhash = skb_get_hash(skb);
+ 	for (i = 0; i < ROLLOVER_HLEN; i++)
+ 		if (po->rollover->history[i] == rxhash)
+ 			count++;
+ 
+ 	po->rollover->history[prandom_u32() % ROLLOVER_HLEN] = rxhash;
+ 	return count > (ROLLOVER_HLEN >> 1);
+ }
+ 
  static unsigned int fanout_demux_hash(struct packet_fanout *f,
  				      struct sk_buff *skb,
  				      unsigned int num)

Attachment: pgpdQ58ETejMZ.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux