Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp82973lqo; Wed, 15 May 2024 08:18:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUV4ahe8fHlcciZp/PwZHzOngfTjpH+yPlujnqu/qIes9Nt5GV+1iy40Zy4sro5lx9unOcT6Ydakwzz78sAfS8dAoQQ9wNlsr/N8ZQScQ== X-Google-Smtp-Source: AGHT+IGkmcLfmoBQ0KAWrj7yIVNGek9wPoFV50HWr+TpM0wzwuHNPKtl5D5P9fIjfkkTKV0ZnIMU X-Received: by 2002:a05:6214:4b09:b0:6a0:6304:53fa with SMTP id 6a1803df08f44-6a168146569mr195112866d6.7.1715786320920; Wed, 15 May 2024 08:18:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715786320; cv=pass; d=google.com; s=arc-20160816; b=j4RjbdJipc7zQLWOSL2Gr8IAqeyY1Gsm2M4679ssUwBRgTxrySBeB7AaahtMQdUZtY Mb6YXO+ip6mAZi9IeB6opL5NaiuDqXPdwyYMVhFmtu7p4QhtO2CZILxsnTZ6HWTdjoJu U58n0L26i0Rj3jngqcuEHOKvS1Z6ti1UP0VohpSjttCSk6o7AQsMY1cbVP7N1yKs7s3z 83vrtXnbfOFabsBFSeMCrGL0W+ZJ4RiMBB+pSGphml9WwWHGXV2MF78yeeT/VhOuWtw0 tmxfE+rQHFPZItc4sHo/Tc0grdXKDURmF9oUbYUDjNiBCLk7M755eUeUa0GLnX3kVoS1 dW7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=bSTKu6LYn+5Gisp7sWtG4MHxfLZbzeoOCn381GwpTG8=; fh=vGUtlrUrThinmZOJS/nu3i6mu91nsEPeQLTv/ZbzVv4=; b=ulH1TJzDQzOUInBgnFIG9iSaWhnaDEjjQ2oaxPP8riEeVoe6cZwcHGpQKPujK7sXCk 2TOxTL/Mn7IcRP2+YhzU/edD8aFMraUMERlqfJ/UGyoUCOOScbrhXeMig5IKMwSseudw 4EtGhDoNnAJfdna0cpQdpk6Js3It8KlC5td0Qt4Eg0sj9ZPKP/8bnxX9T+Mrb9J8KZjI NZydLEWEcWVrQiF1cWruVORkWc3TpctqzYFPN5DDDCrxKu7EJrUrDNnjYxSmHIK5qNiv J6LJaqcqJJSQ2CYyWmCd7gQhA512+U/AsZU2bfjrhZVFsPOoX3Da0iCIVMbPIu1WyT8a c8EQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iX1qzmVk; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-180058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2eff69si139461136d6.495.2024.05.15.08.18.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 08:18:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iX1qzmVk; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-180058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2FCF51C21CF0 for ; Wed, 15 May 2024 15:18:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFB79155753; Wed, 15 May 2024 15:18:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iX1qzmVk" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD5CC62A02 for ; Wed, 15 May 2024 15:18:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715786315; cv=none; b=tT3NsosGqWtAmMOibpnNFVHKFMIkvh9mo0gftIad6QU6tveM+teWiF82FBBz/zMnQRoTiJ2gX+MFt/sRrUnPT9LxVlx0qy9D85KYj/vW/qOb/6vM+w5+lMYxmiEgYQoPlSH0X+73wI8PHAQV13qvZalVgdA/G5pesY2nRuwPlXA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715786315; c=relaxed/simple; bh=PO5Hrp3Nr6H/80MkjK7F9uae9kOvvMoIqj/65Dc2M7M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uN6kJcX1p69iWpDr2kxPU9+7L/rGzUZqLrljV7kb9lG+xbGfN8UnApjjoIlAtbhUojHpMDPFRIIk+kNtJu/oLl2bkEHS3yc+QpieSlC5rgCHMc2MhYhttC0CGVdrPMoGtI+4TpEABmhUH/QZyY7SHVoncQI7pp0aPeyZEm3sObo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=iX1qzmVk; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715786312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=bSTKu6LYn+5Gisp7sWtG4MHxfLZbzeoOCn381GwpTG8=; b=iX1qzmVkGFiU0ohmpdYZy9B0NO7J2F/hsf26TbKl/BUYbP8NEHfBfTQ8JLM6CDy2qCekEa 2QtJABPxK09mPIF08up+wg5PtDrEwN7PHItC6uJPo7r6oyItw5/TN9l+qfuCXsd7Q7BmK0 ANmqYYv+DWTEMkILJG2xpcZUUxkiC80= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-262-0tca9lszP4OnZp2PHp6PTA-1; Wed, 15 May 2024 11:18:24 -0400 X-MC-Unique: 0tca9lszP4OnZp2PHp6PTA-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1ec3c838579so70572445ad.1 for ; Wed, 15 May 2024 08:18:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715786302; x=1716391102; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bSTKu6LYn+5Gisp7sWtG4MHxfLZbzeoOCn381GwpTG8=; b=cnUm7yYwS3AJG0Ogb4Z9Xwc1Auk5DZ7rttJ7I/HtC8ScAX2/3oUbThccl6t50G7sjT uA0sCcSQirBBF1MF1pQ58U9wbHN9dCIdp1vnPQ8ZEbviBT10nt4meR19xCuQ++7bynqR oFfhnybzvNeUH7uxbwjSsbMcq9ROr3EL6TAvkCoaOR1HDaFS3ZCyQ22sjwciCRHXRuht ZOoQDk4PwpWMO/elHOWgQqElLvdCAJqLsKyEDPgotamnecxxHWD9uAxL3FWrZHBlHg8I cFaf5t1JnUeDdQ/hkbvzR6AEhpPmftLWmnVvdlc4VkeThbum+BussYN7t/z5i/1VNB2Y tdqg== X-Forwarded-Encrypted: i=1; AJvYcCUIYFmd3By7M8t9m+3ONL55Ulv4pB67Xvx3jJ9frcVGL8jhX8FsfySGlvZA825v7eTiGVhi6yCRWj8PujmEdUNVNpy1VKqRJjS6dYoq X-Gm-Message-State: AOJu0Yyq83DvKDZVUDWg2NVoJrnvsZtn1G3kvfaYtug8fSCWXMuXWH0y 7i440WXxcO7qevivsfi0cy4EDMFi6/Kc07cHHsUMTy2jbYOmHyb2PqmDntWuA+02oQb0mrnf6bR 0YBRAwBJOFEzAZSLuhpnwZ6mj81ccDT0Y40CQfxpA6qm0fzea++c7rMei/2HWHA== X-Received: by 2002:a17:902:c40c:b0:1eb:1663:c7f7 with SMTP id d9443c01a7336-1ef44161405mr183201975ad.43.1715786302656; Wed, 15 May 2024 08:18:22 -0700 (PDT) X-Received: by 2002:a17:902:c40c:b0:1eb:1663:c7f7 with SMTP id d9443c01a7336-1ef44161405mr183201675ad.43.1715786302246; Wed, 15 May 2024 08:18:22 -0700 (PDT) Received: from zeus.elecom ([240b:10:83a2:bd00:6e35:f2f5:2e21:ae3a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0b9d168esm119731935ad.32.2024.05.15.08.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 08:18:21 -0700 (PDT) From: Ryosuke Yasuoka To: krzk@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: Ryosuke Yasuoka , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syoshida@redhat.com Subject: [PATCH net] nfc: nci: Fix handling of zero-length payload packets in nci_rx_work() Date: Thu, 16 May 2024 00:17:07 +0900 Message-ID: <20240515151757.457353-1-ryasuoka@redhat.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When nci_rx_work() receives a zero-length payload packet, it should discard the packet without exiting the loop. Instead, it should continue processing subsequent packets. Fixes: d24b03535e5e ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet") Closes: https://lore.kernel.org/lkml/20240428134525.GW516117@kernel.org/T/ Reported-by: Ryosuke Yasuoka Signed-off-by: Ryosuke Yasuoka --- net/nfc/nci/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index b133dc55304c..f2ae8b0d81b9 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -1518,8 +1518,7 @@ static void nci_rx_work(struct work_struct *work) if (!nci_plen(skb->data)) { kfree_skb(skb); - kcov_remote_stop(); - break; + continue; } /* Process frame */ -- 2.44.0