mbox series

[net,0/3] amt: fix several bugs

Message ID 20220523161708.29518-1-ap420073@gmail.com (mailing list archive)
Headers show
Series amt: fix several bugs | expand

Message

Taehee Yoo May 23, 2022, 4:17 p.m. UTC
This patchset fixes several bugs in amt module

First patch fixes typo.

Second patch fixes wrong return value of amt_update_handler().
A relay finds a tunnel if it receives an update message from the gateway.
If it can't find a tunnel, amt_update_handler() should return an error,
not success. But it always returns success.

Third patch fixes a possible memory leak in amt_rcv().
A skb would not be freed if an amt interface doesn't have a socket.

Taehee Yoo (3):
  amt: fix typo in amt
  amt: fix return value of amt_update_handler()
  amt: fix possible memory leak in amt_rcv()

 drivers/net/amt.c | 6 +++---
 include/net/amt.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Jakub Kicinski May 26, 2022, 4:47 a.m. UTC | #1
On Mon, 23 May 2022 16:17:05 +0000 Taehee Yoo wrote:
> This patchset fixes several bugs in amt module
> 
> First patch fixes typo.
> 
> Second patch fixes wrong return value of amt_update_handler().
> A relay finds a tunnel if it receives an update message from the gateway.
> If it can't find a tunnel, amt_update_handler() should return an error,
> not success. But it always returns success.
> 
> Third patch fixes a possible memory leak in amt_rcv().
> A skb would not be freed if an amt interface doesn't have a socket.

Please double check you're not missing pskb_may_pull() calls.
E.g. in amt_update_handler()? There's more.
patchwork-bot+netdevbpf@kernel.org May 26, 2022, 4:50 a.m. UTC | #2
Hello:

This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 23 May 2022 16:17:05 +0000 you wrote:
> This patchset fixes several bugs in amt module
> 
> First patch fixes typo.
> 
> Second patch fixes wrong return value of amt_update_handler().
> A relay finds a tunnel if it receives an update message from the gateway.
> If it can't find a tunnel, amt_update_handler() should return an error,
> not success. But it always returns success.
> 
> [...]

Here is the summary with links:
  - [net,1/3] amt: fix typo in amt
    https://git.kernel.org/netdev/net/c/4934609dda03
  - [net,2/3] amt: fix return value of amt_update_handler()
    https://git.kernel.org/netdev/net/c/ac1dbf55981b
  - [net,3/3] amt: fix possible memory leak in amt_rcv()
    https://git.kernel.org/netdev/net/c/1a1a0e80e005

You are awesome, thank you!
Taehee Yoo May 26, 2022, 7:48 a.m. UTC | #3
On 5/26/22 13:47, Jakub Kicinski wrote:

Hi Jakub,
Thanks a lot for your review!

 > On Mon, 23 May 2022 16:17:05 +0000 Taehee Yoo wrote:
 >> This patchset fixes several bugs in amt module
 >>
 >> First patch fixes typo.
 >>
 >> Second patch fixes wrong return value of amt_update_handler().
 >> A relay finds a tunnel if it receives an update message from the 
gateway.
 >> If it can't find a tunnel, amt_update_handler() should return an error,
 >> not success. But it always returns success.
 >>
 >> Third patch fixes a possible memory leak in amt_rcv().
 >> A skb would not be freed if an amt interface doesn't have a socket.
 >
 > Please double check you're not missing pskb_may_pull() calls.
 > E.g. in amt_update_handler()? There's more.

As you pointed, I found that I missed pskb_may_pull() calls in 
amt_multicast_data_handler() and amt_update_handler().
So, I will do some more checks and then send a patch.

Thank you so much!
Taehee Yoo