Skip to content

Commit

Permalink
nfc: nci: Fix kcov check in nci_rx_work()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tetsuo Handa authored and kuba-moo committed May 7, 2024
1 parent 9adcac6 commit 19e35f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/nfc/nci/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,7 @@ static void nci_rx_work(struct work_struct *work)

if (!nci_plen(skb->data)) {
kfree_skb(skb);
kcov_remote_stop();
break;
}

Expand Down

0 comments on commit 19e35f2

Please sign in to comment.