From: Dan Carpenter <dan.carpenter@linaro.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [bug report] xfrm: always fail xfrm_dev_{state,policy}_flush_secctx_check()
Date: Fri, 6 Feb 2026 16:41:42 +0300 [thread overview]
Message-ID: <aYXvliWTCzC9IIVS@stanley.mountain> (raw)
In-Reply-To: <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
[ Smatch checking is paused while we raise funding. #SadFace
https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ]
Hello Tetsuo Handa,
Commit 638361ad7ab2 ("xfrm: always fail
xfrm_dev_{state,policy}_flush_secctx_check()") from Feb 2, 2026
(linux-next), leads to the following Smatch static checker warning:
net/xfrm/xfrm_state.c:898 xfrm_dev_state_flush_secctx_check()
warn: was '== (-1)' instead of '='
net/xfrm/xfrm_state.c
888 int i, err = 0;
889
890 for (i = 0; i <= net->xfrm.state_hmask; i++) {
891 struct xfrm_state *x;
892 struct xfrm_dev_offload *xso;
893
894 hlist_for_each_entry(x, net->xfrm.state_bydst+i, bydst) {
895 xso = &x->xso;
896
897 if (xso->dev == dev &&
--> 898 (err = -EPERM) != 0) {
^
= vs == bug.
899 pr_info("%s: LSM policy is rejecting this operation.\n", __func__);
900 dump_stack();
901 xfrm_audit_state_delete(x, 0, task_valid);
902 return err;
903 }
904 }
905 }
906
907 return err;
908 }
regards,
dan carpenter
next prev parent reply other threads:[~2026-02-06 13:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
2026-02-06 13:38 ` [bug report] net: ethtool: Introduce per-PHY DUMP operations Dan Carpenter
2026-02-06 17:04 ` Maxime Chevallier
2026-02-09 7:09 ` Dan Carpenter
2026-02-09 8:09 ` Maxime Chevallier
2026-02-09 13:10 ` Andrew Lunn
2026-02-10 10:37 ` Dan Carpenter
2026-02-06 13:38 ` [bug report] net: wwan: Add Qualcomm BAM-DMUX WWAN network driver Dan Carpenter
2026-02-06 15:12 ` Stephan Gerhold
2026-02-06 15:23 ` Dan Carpenter
2026-02-06 13:39 ` [bug report] net: ethernet: ti: am65-cpsw: enable bc/mc storm prevention support Dan Carpenter
2026-02-06 13:41 ` Dan Carpenter [this message]
2026-02-06 14:05 ` [bug report] xfrm: always fail xfrm_dev_{state,policy}_flush_secctx_check() Tetsuo Handa
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=aYXvliWTCzC9IIVS@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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