Skip to content

Commit 3e9abf9

Browse files
Tetsuo Handaroxanan1996
authored andcommitted
nfc: nci: Fix kcov check in nci_rx_work()
BugLink: https://bugs.launchpad.net/bugs/2072617 [ Upstream commit 19e35f2 ] Commit 7e8cdc9 ("nfc: Add KCOV annotations") added kcov_remote_start_common()/kcov_remote_stop() pair into nci_rx_work(), with an assumption that kcov_remote_stop() is called upon continue of the for loop. But commit d24b035 ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet") forgot to call kcov_remote_stop() before break of the for loop. Reported-by: syzbot <syzbot+0438378d6f157baae1a2@syzkaller.appspotmail.com> Closes: https://syzkaller.appspot.com/bug?extid=0438378d6f157baae1a2 Fixes: d24b035 ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet") Suggested-by: Andrey Konovalov <andreyknvl@gmail.com> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/6d10f829-5a0c-405a-b39a-d7266f3a1a0b@I-love.SAKURA.ne.jp Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 6671e35 ("nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent adccfb3 commit 3e9abf9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/nfc/nci/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,7 @@ static void nci_rx_work(struct work_struct *work)
15311531

15321532
if (!nci_valid_size(skb)) {
15331533
kfree_skb(skb);
1534+
kcov_remote_stop();
15341535
break;
15351536
}
15361537

0 commit comments

Comments
 (0)