* [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation
@ 2024-07-30 8:46 John Wang
2024-08-01 15:57 ` Jakub Kicinski
2024-08-02 1:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: John Wang @ 2024-07-30 8:46 UTC (permalink / raw)
To: Jeremy Kerr, Matt Johnston, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel
When executing ioctl to allocate tags, if the peer address is 0,
mctp_alloc_local_tag now replaces it with 0xff. However, during tag
dropping, this replacement is not performed, potentially causing the key
not to be dropped as expected.
Signed-off-by: John Wang <wangzhiqiang02@ieisystem.com>
---
v2:
- Change the subject from 'net' to 'net-next'
- remove the Change-Id tag
---
net/mctp/af_mctp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
index de52a9191da0..43288b408fde 100644
--- a/net/mctp/af_mctp.c
+++ b/net/mctp/af_mctp.c
@@ -486,6 +486,9 @@ static int mctp_ioctl_droptag(struct mctp_sock *msk, bool tagv2,
tag = ctl.tag & MCTP_TAG_MASK;
rc = -EINVAL;
+ if (ctl.peer_addr == MCTP_ADDR_NULL)
+ ctl.peer_addr = MCTP_ADDR_ANY;
+
spin_lock_irqsave(&net->mctp.keys_lock, flags);
hlist_for_each_entry_safe(key, tmp, &msk->keys, sklist) {
/* we do an irqsave here, even though we know the irq state,
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation
2024-07-30 8:46 [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation John Wang
@ 2024-08-01 15:57 ` Jakub Kicinski
2024-08-02 0:21 ` Jeremy Kerr
2024-08-02 1:10 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2024-08-01 15:57 UTC (permalink / raw)
To: Jeremy Kerr, Matt Johnston
Cc: John Wang, David S. Miller, Eric Dumazet, Paolo Abeni, netdev,
linux-kernel
On Tue, 30 Jul 2024 16:46:35 +0800 John Wang wrote:
> When executing ioctl to allocate tags, if the peer address is 0,
> mctp_alloc_local_tag now replaces it with 0xff. However, during tag
> dropping, this replacement is not performed, potentially causing the key
> not to be dropped as expected.
>
> Signed-off-by: John Wang <wangzhiqiang02@ieisystem.com>
Looks sane. Jeremy? Matt?
In netdev we try to review patches within 24-48 hours.
You have willingly boarded this crazy train.. :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation
2024-08-01 15:57 ` Jakub Kicinski
@ 2024-08-02 0:21 ` Jeremy Kerr
2024-08-02 1:05 ` Jakub Kicinski
0 siblings, 1 reply; 5+ messages in thread
From: Jeremy Kerr @ 2024-08-02 0:21 UTC (permalink / raw)
To: Jakub Kicinski, Matt Johnston
Cc: John Wang, David S. Miller, Eric Dumazet, Paolo Abeni, netdev,
linux-kernel
Hi Jakub and John,
> On Tue, 30 Jul 2024 16:46:35 +0800 John Wang wrote:
> > When executing ioctl to allocate tags, if the peer address is 0,
> > mctp_alloc_local_tag now replaces it with 0xff. However, during tag
> > dropping, this replacement is not performed, potentially causing
> > the key
> > not to be dropped as expected.
> >
> > Signed-off-by: John Wang <wangzhiqiang02@ieisystem.com>
>
> Looks sane. Jeremy? Matt?
All looks good to me!
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
(John had already discussed the change with us, so no surprises on my
side)
> In netdev we try to review patches within 24-48 hours.
> You have willingly boarded this crazy train.. :)
Yeah we bought express tickets to netdev town! I just saw that there
were nipa warnings on patchwork, so was waiting on a v3. If it's okay
as-is, I'm happy for a merge.
Cheers,
Jeremy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation
2024-08-02 0:21 ` Jeremy Kerr
@ 2024-08-02 1:05 ` Jakub Kicinski
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2024-08-02 1:05 UTC (permalink / raw)
To: Jeremy Kerr
Cc: Matt Johnston, John Wang, David S. Miller, Eric Dumazet,
Paolo Abeni, netdev, linux-kernel
On Fri, 02 Aug 2024 08:21:46 +0800 Jeremy Kerr wrote:
> > Looks sane. Jeremy? Matt?
>
> All looks good to me!
>
> Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Thanks!
> (John had already discussed the change with us, so no surprises on my
> side)
>
> > In netdev we try to review patches within 24-48 hours.
> > You have willingly boarded this crazy train.. :)
>
> Yeah we bought express tickets to netdev town! I just saw that there
> were nipa warnings on patchwork, so was waiting on a v3. If it's okay
> as-is, I'm happy for a merge.
It has quite a few false-positives (especially from the in-tree tools
like checkpatch and get_maintainer).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation
2024-07-30 8:46 [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation John Wang
2024-08-01 15:57 ` Jakub Kicinski
@ 2024-08-02 1:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-02 1:10 UTC (permalink / raw)
To: John Wang; +Cc: jk, matt, davem, edumazet, kuba, pabeni, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 30 Jul 2024 16:46:35 +0800 you wrote:
> When executing ioctl to allocate tags, if the peer address is 0,
> mctp_alloc_local_tag now replaces it with 0xff. However, during tag
> dropping, this replacement is not performed, potentially causing the key
> not to be dropped as expected.
>
> Signed-off-by: John Wang <wangzhiqiang02@ieisystem.com>
>
> [...]
Here is the summary with links:
- [net-next,v2] net: mctp: Consistent peer address handling in ioctl tag allocation
https://git.kernel.org/netdev/net-next/c/5fcf0801ef5c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-02 1:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30 8:46 [PATCH net-next v2] net: mctp: Consistent peer address handling in ioctl tag allocation John Wang
2024-08-01 15:57 ` Jakub Kicinski
2024-08-02 0:21 ` Jeremy Kerr
2024-08-02 1:05 ` Jakub Kicinski
2024-08-02 1:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).