diff mbox series

[net,v3] nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()

Message ID 20240521153444.535399-1-ryasuoka@redhat.com (mailing list archive)
State Accepted
Commit 6671e352497ca4bb07a96c48e03907065ff77d8a
Delegated to: Netdev Maintainers
Headers show
Series [net,v3] nfc: nci: Fix handling of zero-length payload packets in nci_rx_work() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 906 this patch: 906
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 1 blamed authors not CCed: jeremy@jcline.org; 1 maintainers not CCed: jeremy@jcline.org
netdev/build_clang success Errors and warnings before: 909 this patch: 909
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 910 this patch: 910
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 3 this patch: 3
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-05-21--21-00 (tests: 1039)

Commit Message

Ryosuke Yasuoka May 21, 2024, 3:34 p.m. UTC
When nci_rx_work() receives a zero-length payload packet, it should not
discard the packet and exit the loop. Instead, it should continue
processing subsequent packets.

Fixes: d24b03535e5e ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet")
Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
---
v3
- Remove inappropriate Reported-by tag

v2
- Fix commit msg to be clearer to say
- Remove inappropriate Closes tag

 net/nfc/nci/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Simon Horman May 21, 2024, 3:54 p.m. UTC | #1
On Wed, May 22, 2024 at 12:34:42AM +0900, Ryosuke Yasuoka wrote:
> When nci_rx_work() receives a zero-length payload packet, it should not
> discard the packet and exit the loop. Instead, it should continue
> processing subsequent packets.
> 
> Fixes: d24b03535e5e ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet")
> Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
> ---
> v3
> - Remove inappropriate Reported-by tag
> 
> v2
> - Fix commit msg to be clearer to say
> - Remove inappropriate Closes tag

Reviewed-by: Simon Horman <horms@kernel.org>
Krzysztof Kozlowski May 21, 2024, 4:42 p.m. UTC | #2
On 21/05/2024 17:34, Ryosuke Yasuoka wrote:
> When nci_rx_work() receives a zero-length payload packet, it should not
> discard the packet and exit the loop. Instead, it should continue
> processing subsequent packets.
> 
> Fixes: d24b03535e5e ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet")
> Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
> ---
> v3

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
patchwork-bot+netdevbpf@kernel.org May 23, 2024, 10:50 a.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 22 May 2024 00:34:42 +0900 you wrote:
> When nci_rx_work() receives a zero-length payload packet, it should not
> discard the packet and exit the loop. Instead, it should continue
> processing subsequent packets.
> 
> Fixes: d24b03535e5e ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet")
> Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
> 
> [...]

Here is the summary with links:
  - [net,v3] nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()
    https://git.kernel.org/netdev/net/c/6671e352497c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 7a9897fbf4f4..f456a5911e7d 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -1531,8 +1531,7 @@  static void nci_rx_work(struct work_struct *work)
 
 		if (!nci_valid_size(skb)) {
 			kfree_skb(skb);
-			kcov_remote_stop();
-			break;
+			continue;
 		}
 
 		/* Process frame */