On 11/7/26 13:11, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] dpll: broken NLM_F_ECHO in dpll_pin_event_send() [1]
--
commit 1d6bef1472d6edb1fb63ca2b725c77cbbc70a8da
Author: Ivan Vecera <[email protected]>
dpll: take domain locks around driver callbacks
This commit acquires the object's domain lock around driver callbacks in
netlink requests, dumps, and notifications.
diff --git a/drivers/dpll/dpll_netlink.c b/drivers/dpll/dpll_netlink.c
index e5380d95f238b..1b4e3a0166a74 100644
--- a/drivers/dpll/dpll_netlink.c
+++ b/drivers/dpll/dpll_netlink.c
[ ... ]
@@ -941,27 +955,39 @@ dpll_pin_event_send(enum dpll_cmd event, struct dpll_pin
*pin)
int dpll_pin_create_ntf(struct dpll_pin *pin, u64 src_clock_id)
{
+ int ret;
+
+ mutex_lock(&pin->domain->lock);
dpll_pin_notify(pin, src_clock_id, DPLL_PIN_CREATED);
- return dpll_pin_event_send(DPLL_CMD_PIN_CREATE_NTF, pin);
+ ret = dpll_pin_event_send(DPLL_CMD_PIN_CREATE_NTF, pin);
+ mutex_unlock(&pin->domain->lock);
+
+ return ret;
}
[Severity: Medium]
This problem wasn't introduced by this patch, but does dpll_pin_event_send()
break NLM_F_ECHO on pin SET requests [1]?
drivers/dpll/dpll_netlink.c:dpll_pin_event_send() {
...
hdr = genlmsg_put(msg, 0, 0, &dpll_nl_family, 0, event);
...
genlmsg_end(msg, hdr);
genlmsg_multicast(&dpll_nl_family, msg, 0, 0, GFP_KERNEL);
...
}
When a user-space SET request triggers a pin change notification,
dpll_pin_event_send() is called without the request's genl_info context.
Passing a portid of 0 to genlmsg_put() and calling genlmsg_multicast()
instead of genl_notify() drops the originating socket information, so user
space never receives the requested NLM_F_ECHO notification.
[1] https://sashiko.dev/#/bug/linux-14884b2c-eeea-47fd-87fe-40bc535d32cc
No. The DPLL family has never supported NLM_F_ECHO, so nothing is
broken here. Echo is an optional per-family feature:
Documentation/userspace-api/netlink/intro.rst says "this feature is not
universally implemented". Most genetlink families (devlink, ethtool,
netdev, nl80211) also send their notifications with genlmsg_multicast()
and no echo. A SET request with NLM_F_ECHO is still ACKed normally.
Adding echo support would be a new feature for net-next, not a fix, and
it is unrelated to this series.
Thanks,
Ivan