Re: [PATCH v2 net] inetpeer: randomize RB-tree node comparison using SipHash
Eric Dumazet <[email protected]>
| Newsgroups | org.kernel.vger.netdev |
|---|---|
| Message-ID | <CANn89i+h_ThBFFDSqUDf=2NajwrnTRowjvveNTLWQU3OpgNTeA@mail.gmail.com> |
My apologies, I missed that. I will send a V3 to fix this. pw-bot: cr On Sun, Aug 16, 2026 at 2:44 PM Ido Schimmel <[email protected]> wrote: > > On Fri, Aug 14, 2026 at 06:06:16AM +0000, Eric Dumazet wrote: > > @@ -190,12 +221,13 @@ struct inet_peer *inet_getpeer(struct inet_peer_base *base, > > write_seqlock_bh(&base->lock); > > > > gc_cnt = 0; > > - p = lookup(daddr, base, seq, gc_stack, &gc_cnt, &parent, &pp); > > + p = lookup(daddr, dhash, base, seq, gc_stack, &gc_cnt, &parent, &pp); > > if (!p) { > > if ((u64)base->total < 2ULL * READ_ONCE(inet_peer_threshold)) > > p = kmem_cache_alloc(peer_cachep, GFP_ATOMIC); > > Eric, this is a leftover from v1, so the patch doesn't apply :/ > > > if (p) { > > p->daddr = *daddr; > > + p->hash = dhash; > > p->dtime = (__u32)jiffies; > > refcount_set(&p->refcnt, 1); > > atomic_set(&p->rid, 0);