public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Yuan Tan <yuantan098@gmail.com>
Cc: security@kernel.org, pablo@netfilter.org, fw@strlen.de,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, zhen.ni@easystack.cn,
	kadlec@netfilter.org, kees@kernel.org, tomapufckgml@gmail.com,
	dstsmallbird@foxmail.com, yifanwucs@gmail.com,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/1] netfilter: ipset: drop logically empty buckets in mtype_del
Date: Fri, 27 Mar 2026 11:36:28 +0100	[thread overview]
Message-ID: <acZdrEQ6mMpJLNH8@orbyte.nwl.cc> (raw)
In-Reply-To: <d3d1e38f2001ec225344f24e59727299f6a39a7a.1774578045.git.yifanwucs@gmail.com>

On Thu, Mar 26, 2026 at 10:50:38PM -0700, Yuan Tan wrote:
> From: Yifan Wu <yifanwucs@gmail.com>
> 
> mtype_del() counts empty slots below n->pos in k, but it only drops the
> bucket when both n->pos and k are zero. This misses buckets whose live
> entries have all been removed while n->pos still points past deleted slots.
> 
> Treat a bucket as empty when all positions below n->pos are unused and
> release it directly instead of shrinking it further.
> 
> Fixes: 8af1c6fbd923 ("netfilter: ipset: Fix forceadd evaluation path")
> Cc: stable@vger.kernel.org
> Reported-by: Juefei Pu <tomapufckgml@gmail.com>
> Reported-by: Xin Liu <dstsmallbird@foxmail.com>
> Signed-off-by: Yifan Wu <yifanwucs@gmail.com>
> Co-developed-by: Yuan Tan <yuantan098@gmail.com>
> Signed-off-by: Yuan Tan <yuantan098@gmail.com>

Reviewed-by: Phil Sutter <phil@nwl.cc>

      reply	other threads:[~2026-03-27 10:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1774578045.git.yifanwucs@gmail.com>
2026-03-27  5:50 ` [PATCH 1/1] netfilter: ipset: drop logically empty buckets in mtype_del Yuan Tan
2026-03-27 10:36   ` Phil Sutter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acZdrEQ6mMpJLNH8@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=davem@davemloft.net \
    --cc=dstsmallbird@foxmail.com \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=kadlec@netfilter.org \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=security@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tomapufckgml@gmail.com \
    --cc=yifanwucs@gmail.com \
    --cc=yuantan098@gmail.com \
    --cc=zhen.ni@easystack.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox