diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-04-28 23:53:51 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-30 02:55:55 +0300 |
| commit | 5637fcb11c9128283db598ff398924d910c73143 (patch) | |
| tree | f3e2cbbb5a7f84d579d522b0f6e7c6ddd5c16f84 | |
| parent | 28e71cb51cdfcbc0f37ef8011a5a1c7a49423faf (diff) | |
| download | linux-5637fcb11c9128283db598ff398924d910c73143.tar.xz | |
psp: add a comment about a psp_dev add netlink notification
In psp_dev_create(), the DEV_ADD_NTF netlink notification is sent
before the device is published to the netdev via rcu_assign_pointer().
IIRC this is intentional because a single PSP device is expected
to be shared with multiple netdevs. So we are trying to default to
not having the netdev info. We can change it if someone complains
but for now just add a comment that it's intentional.
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260428205352.1247325-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | net/psp/psp_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/psp/psp_main.c b/net/psp/psp_main.c index 652ec8a9c8a4..f069117c867a 100644 --- a/net/psp/psp_main.c +++ b/net/psp/psp_main.c @@ -90,6 +90,10 @@ psp_dev_create(struct net_device *netdev, mutex_lock(&psd->lock); mutex_unlock(&psp_devs_lock); + /* notify before netdev assignment + * There's no strong reason for it, but thinking is to avoid creating + * implicit expectations about the PSP dev <> netdev relationship. + */ psp_nl_notify_dev(psd, PSP_CMD_DEV_ADD_NTF); rcu_assign_pointer(netdev->psp_dev, psd); |
