Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp307516rdb; Thu, 18 Jan 2024 04:22:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJay2Nz4SGim0/vhHOvrq7zkcVcpKW1BLsaikC02azpQNaFtkhBMUAUFrIa9V49YjUCXHy X-Received: by 2002:a05:6a20:26a5:b0:19a:1657:9f42 with SMTP id h37-20020a056a2026a500b0019a16579f42mr504409pze.74.1705580571039; Thu, 18 Jan 2024 04:22:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705580571; cv=pass; d=google.com; s=arc-20160816; b=G0SbuYUSYT3NiSsr8ufsZu4M+EKxZym9BdnRx8CqnYh94+g/dJfR+6j1nVu2QaSrOv ZfgETYkIzhxt4qGz0+dDw7pqUWEUdgvMjJWFJS+I2oQzzCti0vwyepeHU/rTFmnU/V4j PFDWUoBp9RfEvj0oCNcCYBE1uM8k4AhWdIG0cSpTZuWjow4srgyZeUd+zFP615CVmqZG jMs8LL2MTam/etwnm5cUyWGRxlrsEoWX5ntpBCmt8p1avANaaHdgH5CDYgYIKXwkTK2w ows4OSC/Dp5irk0Wmrm8FueOLkuGazidQA2MVMxnBxH+zlJPwv+KT4/U7iOBz4XzAvic iZsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:autocrypt:from:references:cc:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=sb/jhTq4Nr7m8ELZAfECpv87zpHWtRN19nvufvIDDzc=; fh=zS8GNyEKCTwzbDGvWQRPrlpN65AC2z4gTV8ptZm65DM=; b=VjraZFvD2vjtNG74jjeId1TcYTlzih+eSF4ep6i1GR4F3HnPCO/PXpC+BBUGx3MnG0 sHnGKUeGWbcVpelggKuKbssiYNvf+wqNxbSTKxEpEFmVxaDDui0kxem47MyWtgkV7LNS bDNryoAwpjOcjC/td2BS1iy6U9C72guW35iGCE+I+GQp5oyfjfpVQ0ygajhmWU0J+c/Y ZRVDP17aATq3xE/PV6BchQ5O9AeWw6T/M5ncnAV5JGGlR+Y2gCFjjDO0ijL7NNcIG073 eFRGWE4ASOND+zcgy88BqDmbkM4sbHBhpEp52Jz8Sx3Bq8Zi9ouhsT8oc8I/qeOmF+x3 uuIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=IOqHsGOk; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-wireless+bounces-2174-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a31-20020a631a5f000000b005cf14c2aeacsi1389784pgm.117.2024.01.18.04.22.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 04:22:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2174-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=IOqHsGOk; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-wireless+bounces-2174-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 716C52817E6 for ; Thu, 18 Jan 2024 12:22:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2876241F5; Thu, 18 Jan 2024 12:22:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="IOqHsGOk" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C177D241EC for ; Thu, 18 Jan 2024 12:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705580566; cv=none; b=KA3SCAMbUF3AY6mm6c2XsYbQJQbDTUHDBOvO2WsCLGn4tEkdcV0gwEhKfmQa65ZBBnVkxL6/D/gJ9aPqzLcyynFNhy0sCqAbUKZow8CDUnY3aj4+KI9yHB9AP440WigPLjP6tvmmcq2qNgB2JOUo3HjEw1Oq7PbYP39OBo005Nw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705580566; c=relaxed/simple; bh=LemA9BsqEjRw7Xic0DLBh81RuMdq+78179mjIEdUgbQ=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: From:Autocrypt:In-Reply-To:Content-Type; b=ZefATSDPWKSIXUT7vciixbw+Qf0425GVxSYMKtCCMNWQm04IpRXurBrFoUWzyYgvzUFtcuM6/PgGS6VwdzRUFa4IYf4F/hC5edAkDFm2ZiUm0pH+BDrUhi9tjwsDRAGwIA9yPnKS9I4TviXkhalj8kqJD0L9L1PH3szPSKXCvIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=IOqHsGOk; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-337d5aa5ef6so258437f8f.3 for ; Thu, 18 Jan 2024 04:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1705580563; x=1706185363; darn=vger.kernel.org; h=in-reply-to:autocrypt:from:references:cc:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=sb/jhTq4Nr7m8ELZAfECpv87zpHWtRN19nvufvIDDzc=; b=IOqHsGOk5hIYiYxSMA0uu+DyPOh1FIHOEvnrAC7tOwvNaWz0wMmUrDie8RuUR6/qJB RFJALAXR11Pe/kymwI9D84GsxMPiG3oioBsdwrzArrzyaumrMGivpeTxCwHcVjWelC1y 1mSlLMJDi70SncZ6SCSx3YUq9CQunFqnDvr5s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705580563; x=1706185363; h=in-reply-to:autocrypt:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=sb/jhTq4Nr7m8ELZAfECpv87zpHWtRN19nvufvIDDzc=; b=Qaj5qXsKyexhfe0CpwnGlAqe5XMQJtiETcGPAjFlJujOLXY/2lpDgB7GQmAtnwTVTA GiUwPLmL7HoaMRsF5P7BYvDpRsdrUyF16gjYNiD3iB5wdnNObGgr3IdEK2QhLUmTR2QF 8enmegL65KiJAjUIV755/SwNqQutegtxdsMIcKxDKsb/fwAOWfirairFdZQAPQX4v0Au zZcBCiMrJYiVyKAp3Ck2/kzspbwDFwvXm2t+16D4wq8+QMADx234gLZPG9rSiRwvNIWX Nn04Qrz3lwvsmhqr3fQVd1mT7ZdUQZluaFBaMM4fE3RXTbrjx2WOxxUDWJJBbcDG/p87 mGoQ== X-Gm-Message-State: AOJu0Yy1yaJGab+uQbs02bz4IU84rJll2FufUV4p0i/VoeUg7zC+l3nA ewXXXHhT1riSpaULpNk1CKbVp0L7QGrwLpLFXdDiy6jmlH7Hoq4OEkY6vCV3kA== X-Received: by 2002:adf:d1e7:0:b0:337:5588:801f with SMTP id g7-20020adfd1e7000000b003375588801fmr570208wrd.57.1705580562984; Thu, 18 Jan 2024 04:22:42 -0800 (PST) Received: from [10.176.68.61] ([192.19.148.250]) by smtp.gmail.com with ESMTPSA id f12-20020adfb60c000000b00336b8461a5esm3919896wre.88.2024.01.18.04.22.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jan 2024 04:22:42 -0800 (PST) Message-ID: <4cc44b07-13bd-49d0-b10f-b88875380f8c@broadcom.com> Date: Thu, 18 Jan 2024 13:22:41 +0100 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] [v2] wifi: brcmfmac: handle possible completion timeouts To: Dmitry Antipov , Hante Meuleman Cc: brcm80211-dev-list.pdl@broadcom.com, linux-wireless@vger.kernel.org, Kalle Valo , lvc-project@linuxtesting.org References: <20230614075848.80536-1-dmantipov@yandex.ru> From: Arend van Spriel Autocrypt: addr=arend.vanspriel@broadcom.com; keydata= xsFNBGP96SABEACfErEjSRi7TA1ttHYaUM3GuirbgqrNvQ41UJs1ag1T0TeyINq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oyVNl1b+egkV2iSXifTGGzOjt50/efgm1bKNkX iCVOYt9sGTrVhiX1ABEBAAHCwXYEGAEIACAWIQS19WevcE+Jf733W9KWejTiGAP9UQUCY/3p PgIbDAAKCRCWejTiGAP9UaC/EACZvViKrMkFooyACGaukqIo/s94sGuqxj308NbZ4g5jgy/T +lYBzlurnFmIbJESFOEq0MBZorozDGk+/p8pfAh4S868i1HFeLivVIujkcL6unG1UYEnnJI9 uSwUbEqgA8vwdUPEGewYkPH6AaQoh1DdYGOleQqDq1Mo62xu+bKstYHpArzT2islvLdrBtjD MEzYThskDgDUk/aGPgtPlU9mB7IiBnQcqbS/V5f01ZicI1esy9ywnlWdZCHy36uTUfacshpz LsTCSKICXRotA0p6ZiCQloW7uRH28JFDBEbIOgAcuXGojqYx5vSM6o+03W9UjKkBGYFCqjIy Ku843p86Ky4JBs5dAXN7msLGLhAhtiVx8ymeoLGMoYoxqIoqVNaovvH9y1ZHGqS/IYXWf+jE H4MX7ucv4N8RcsoMGzXyi4UbBjxgljAhTYs+c5YOkbXfkRqXQeECOuQ4prsc6/zxGJf7MlPy NKowQLrlMBGXT4NnRNV0+yHmusXPOPIqQCKEtbWSx9s2slQxmXukPYvLnuRJqkPkvrTgjn5d eSE0Dkhni4292/Nn/TnZf5mxCNWH1p3dz/vrT6EIYk2GSJgCLoTkCcqaM6+5E4IwgYOq3UYu AAgeEbPV1QeTVAPrntrLb0t0U5vdwG7Xl40baV9OydTv7ghjYZU349w1d5mdxg== In-Reply-To: <20230614075848.80536-1-dmantipov@yandex.ru> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000009c95ae060f376bc5" --0000000000009c95ae060f376bc5 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/14/2023 9:58 AM, Dmitry Antipov wrote: > Handle possible 'wait_for_completion_timeout()' errors in > 'brcmf_p2p_af_searching_channel()', 'brcmf_p2p_tx_action_frame()' > and 'brcmf_p2p_del_vif()', adjust related code. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. Thanks for adding this exception handling. Please consider suggestions below. Reviewed-by: Arend van Spriel > Signed-off-by: Dmitry Antipov > --- > v2: rebase against wireless-next tree > --- > .../broadcom/brcm80211/brcmfmac/p2p.c | 31 +++++++++++++------ > 1 file changed, 21 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c > index d4492d02e4ea..e43dabdaeb0b 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c > @@ -1151,6 +1151,7 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p) > { > struct afx_hdl *afx_hdl = &p2p->afx_hdl; > struct brcmf_cfg80211_vif *pri_vif; > + bool timeout = false; > s32 retry; > > brcmf_dbg(TRACE, "Enter\n"); > @@ -1173,8 +1174,11 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p) > retry); > /* search peer on peer's listen channel */ > schedule_work(&afx_hdl->afx_work); > - wait_for_completion_timeout(&afx_hdl->act_frm_scan, > - P2P_AF_FRM_SCAN_MAX_WAIT); > + if (!wait_for_completion_timeout(&afx_hdl->act_frm_scan, > + P2P_AF_FRM_SCAN_MAX_WAIT)) { > + timeout = true; > + break; > + } Instead could do: timeout = !wait_for_completion_timeout(...); if (timeout) break; > if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) || > (!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, > &p2p->status))) > @@ -1186,8 +1190,11 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p) > /* listen on my listen channel */ > afx_hdl->is_listen = true; > schedule_work(&afx_hdl->afx_work); > - wait_for_completion_timeout(&afx_hdl->act_frm_scan, > - P2P_AF_FRM_SCAN_MAX_WAIT); > + if (!wait_for_completion_timeout > + (&afx_hdl->act_frm_scan, P2P_AF_FRM_SCAN_MAX_WAIT)) { > + timeout = true; > + break; > + } dito > } > if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) || > (!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, > @@ -1209,7 +1216,7 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p) > > clear_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, &p2p->status); > > - return afx_hdl->peer_chan; > + return timeout ? P2P_INVALID_CHANNEL : afx_hdl->peer_chan; > } > > > @@ -1580,14 +1587,18 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, > (p2p->wait_for_offchan_complete) ? > "off-channel" : "on-channel"); > > - wait_for_completion_timeout(&p2p->send_af_done, P2P_AF_MAX_WAIT_TIME); > - > + if (!wait_for_completion_timeout(&p2p->send_af_done, > + P2P_AF_MAX_WAIT_TIME)) { > + err = -ETIMEDOUT; > + goto clear; > + } Not really needed as timeout would cause the code to proceed in the else branch below. > if (test_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status)) { > brcmf_dbg(TRACE, "TX action frame operation is success\n"); > } else { > err = -EIO; > brcmf_dbg(TRACE, "TX action frame operation has failed\n"); > } > +clear: > /* clear status bit for action tx */ > clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status); > clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status); > @@ -2404,10 +2415,10 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev) > brcmf_dbg(INFO, "P2P: GO_NEG_PHASE status cleared\n"); > > if (wait_for_disable) > - wait_for_completion_timeout(&cfg->vif_disabled, > - BRCMF_P2P_DISABLE_TIMEOUT); > + err = (wait_for_completion_timeout(&cfg->vif_disabled, > + BRCMF_P2P_DISABLE_TIMEOUT) > + ? 0 : -ETIMEDOUT); > > - err = 0; For P2P_DEVICE wait_for_disable is false so err would be uninitialized here when removing the line above. Looking at the function wait_for_disable is set to true for non-P2P_DEVICE so the wait can move inside the if statement below. > if (iftype != NL80211_IFTYPE_P2P_DEVICE) { > brcmf_vif_clear_mgmt_ies(vif); > err = brcmf_p2p_release_p2p_if(vif); --0000000000009c95ae060f376bc5 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQdwYJKoZIhvcNAQcCoIIQaDCCEGQCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3OMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPBQBwrA5+20Wxlk6k1 e6EKaaNaNZUy30q3ArEf30ZDpXyfCtiXnupjSK8WU2cK4qsEtj09JS4+mhi0CTCrCnXAzum3tgcH cHRg0prcSzzEUDQWoFxyuqwiwhHu3sPQNmFOMwIDAQABo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