Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp864380lqp; Thu, 23 May 2024 02:15:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9gWMBHD8+EaGHo2Tkgb2Rsx3G63jZ4f/OdCzwBAKBx5e+R+FJjnRuFBQ9EXv+yrbdOD0LY8TnWSwy2Gpse1kEmregiNGUsH2XH6AOpQ== X-Google-Smtp-Source: AGHT+IFllRsg6oHPCisCseJnz/n+ZTFEXNU5JQZHJsJ+rCAqIrMqyJ9w9Lh3iWsBcIIrpBzdBo6N X-Received: by 2002:a50:96d2:0:b0:56b:8153:54f7 with SMTP id 4fb4d7f45d1cf-57832c65159mr3087081a12.30.1716455713176; Thu, 23 May 2024 02:15:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716455713; cv=pass; d=google.com; s=arc-20160816; b=nRoWDrarDc0uz6IEUQ8wqxdmY7UNXr0H46XdLm5JdJ6GQ7kOZJPWDZgeQwDSB0txaO v9yKXlWYDIy5k8OWbJlwfOa9P/9P6b7G8FvCTjXCWV8nnAeCJfY283nQE1d/D9oRKWii AvYJW0GJnESE6Zt/BeG0IK0Z+TLFmpuF850ix9VrsL20RtniB8d5HntJOC+ZpnedFXip VBArItVlXV2YRe8t2km2gDAMpZtysn8aZEABJ2ExGu8wI8MTn/8+g2C0GmfEaSQyhcSs PkGm/Nf15ykz2S3f2HF6ELl7YILdpstwLfdenb9wFEoY8Gjrua10la/b9Flqc0RSuEke T72g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=Z1PA5QvJHm8ykHTiGZm5aAca1OGkhXqgReaXY3/hb/k=; fh=+ILlZZp96gAKOaiU6SZDVkTTgr/SadlJx8u90DVveTw=; b=uGiQy8uYxRHTe5mOEc4vk9XM6e5pv8mR0hjPVfo49u43Nmy7BOji9UQS4n3GYh/CZy ZKrwaB1DGm9ZDtEFSPBWCNI3MtI3dS0jepYE34qsQixUlpiwxzX5AxeR2WJbjBrCUYhA 32gNuRw/PsylN60lrjrKrIB7j01C5Fzb/ilEVlSc8IxycOj/gZ//zOM45xdmabzo2SSn /CgvsIOsLCzBhrHD4SQlWn0oikfDje7/R+dvDLQYiiLGZugln63zzwydcn9Unmv9goP3 UTAOSls77zOtS/iq2VwZGbNi+/YiNmoh6Q8fL9ZM5JQg8nePU0Bj0ua4OjA1tdxsLjc2 qAeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kh11Bsrr; 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-187228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187228-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c36d6c1si15405081a12.547.2024.05.23.02.15.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 02:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kh11Bsrr; 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-187228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187228-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B176B1F221D3 for ; Thu, 23 May 2024 09:15:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B8D113D28E; Thu, 23 May 2024 09:15:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Kh11Bsrr" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 8C6F413C9BD for ; Thu, 23 May 2024 09:14:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716455701; cv=none; b=dFUuBExOP1i2y2Yp3V3pw0B4b0eGFdmiOihcrONuyO2ufxcTdVM3FSZ7pzfDXx/117yaFxVTQoVrDU+wdEJEGsGlq4Ticjut9SCSpY96MnLqJB2Wbjp6a2KVty85KKm3eYLvyXnbgmASrD5FUDk4a7mZhRJWB8sRQf6H7wFI7qI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716455701; c=relaxed/simple; bh=/lMyxSjqLAl6OgWHts/xND+IPoIxTxQRqei4HueBex0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=mp5BBN0r7L54rC0YRjC6jn+nFDw0aTT334EbFxHeeOVEOjvLOg/2t0jAkPXsxY20XCI2G+yCBI/XhOqd9L6lyQ+bnGTXh7HH2rqu2bvL37fkZa3OCGRl3Ixiab0hGUjwbPV4WnXw2aqvlBFzG8dtfSZRccjnIo7fdnHfSQeYYf4= 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=Kh11Bsrr; arc=none smtp.client-ip=170.10.129.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=1716455698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=Z1PA5QvJHm8ykHTiGZm5aAca1OGkhXqgReaXY3/hb/k=; b=Kh11BsrrmgaMTLw/6ARNc5JgGaol1+oPbNrllapKjK25kVDOTB3cm7fkIEN8/8CqyWfdZu vv2bv0lhefQvoSSj1hLzkFkHAZxu7IPOHObQcmGptZt7n2iu7JO8Y/AGT34Z7ksh2BS4fW Zl4/qT8pQWyF4byAukr1P8jSvSMuOCE= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-TjxlTzgzPIK9PwYT7HGNkg-1; Thu, 23 May 2024 05:14:57 -0400 X-MC-Unique: TjxlTzgzPIK9PwYT7HGNkg-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-792c88ab364so26946285a.3 for ; Thu, 23 May 2024 02:14:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716455696; x=1717060496; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z1PA5QvJHm8ykHTiGZm5aAca1OGkhXqgReaXY3/hb/k=; b=pQ/KVqUOLDXFrvhtb3cNoQ08ag2o4WIvnFZw0JOsBwfH2HlduzAvqQWVv/sDrCOCDM iieekJ6Aaw0np80dvhmNQJdkbuc/VloNJXPpXH8hAJ0hWrdjot0vOA4dUeYmcaOyv18Z pCDcjj6lvYLdyhfOnkyqk33wh3CoQwpBaeXks4yZVD+7f2o4dckDb6ew2bEQas5mH1kb wxwonqxkQzXxOyaHhClp/my8wqswPuhgN+V66sB6kq6OunYjUzaKTIPyorJY90SomiPq FWM8KsAVW9Cc6w3Tire/23/xVEVVEJKFb58l5YEVAoTEZn0CAALPr6zhQSFUw9rmmNB+ tWlQ== X-Gm-Message-State: AOJu0Yz0eNp2QKSxPtsPvynEsnWp+0UTbH0pJsWAGZ7QZIyuMMUat/EB qXjrkRTOQfpQgG/OL4aMmKYU7+zQEciBY7i3KMdGUs3IW6VJPZQG5lsHzNAADTZ6ZIpiQXRyW6r 68fkOfbHjQ9omU2wNq1o3n2P9Jp86KwYxDXt4alz58wszDz34+MAPsxSENk5Dqw== X-Received: by 2002:a05:622a:1a27:b0:437:ca6d:13f1 with SMTP id d75a77b69052e-43f9e0b65e2mr43549961cf.2.1716455696360; Thu, 23 May 2024 02:14:56 -0700 (PDT) X-Received: by 2002:a05:622a:1a27:b0:437:ca6d:13f1 with SMTP id d75a77b69052e-43f9e0b65e2mr43549701cf.2.1716455695822; Thu, 23 May 2024 02:14:55 -0700 (PDT) Received: from gerbillo.redhat.com ([2a0d:3341:b094:ab10:29ae:cdc:4db4:a22a]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43e09f7862asm156096621cf.91.2024.05.23.02.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 02:14:55 -0700 (PDT) Message-ID: Subject: Re: [PATCH v2 net] net: fec: avoid lock evasion when reading pps_enable From: Paolo Abeni To: Wei Fang , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, shenwei.wang@nxp.com, xiaoning.wang@nxp.com, richardcochran@gmail.com, andrew@lunn.ch, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, imx@lists.linux.dev Date: Thu, 23 May 2024 11:14:52 +0200 In-Reply-To: <20240521023800.17102-1-wei.fang@nxp.com> References: <20240521023800.17102-1-wei.fang@nxp.com> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV8Hf8mUwubihiJB/9zPvVq8xfiVbdT0sPzBtxW0fXwrbFxYAOFvT0UC2MjlIsukjmXOUJtdZqBE3v3Jf7VnjNVj9P58+MOx9iY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-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2024-05-21 at 10:38 +0800, Wei Fang wrote: > The assignment of pps_enable is protected by tmreg_lock, but the read > operation of pps_enable is not. So the Coverity tool reports a lock > evasion warning which may cause data race to occur when running in a > multithread environment. Although this issue is almost impossible to > occur, we'd better fix it, at least it seems more logically reasonable, > and it also prevents Coverity from continuing to issue warnings. >=20 > Fixes: 278d24047891 ("net: fec: ptp: Enable PPS output based on ptp clock= ") > Signed-off-by: Wei Fang > --- > V2 changes: > Moved the assignment positions of pps_channel and reload_period. > --- > drivers/net/ethernet/freescale/fec_ptp.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ether= net/freescale/fec_ptp.c > index 181d9bfbee22..e32f6724f568 100644 > --- a/drivers/net/ethernet/freescale/fec_ptp.c > +++ b/drivers/net/ethernet/freescale/fec_ptp.c > @@ -104,14 +104,13 @@ static int fec_ptp_enable_pps(struct fec_enet_priva= te *fep, uint enable) > struct timespec64 ts; > u64 ns; > =20 > - if (fep->pps_enable =3D=3D enable) > - return 0; > - > - fep->pps_channel =3D DEFAULT_PPS_CHANNEL; > - fep->reload_period =3D PPS_OUPUT_RELOAD_PERIOD; > - > spin_lock_irqsave(&fep->tmreg_lock, flags); > =20 > + if (fep->pps_enable =3D=3D enable) { > + spin_unlock_irqrestore(&fep->tmreg_lock, flags); > + return 0; > + } > + > if (enable) { > /* clear capture or output compare interrupt status if have. > */ > @@ -532,6 +531,9 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp, > int ret =3D 0; > =20 > if (rq->type =3D=3D PTP_CLK_REQ_PPS) { > + fep->pps_channel =3D DEFAULT_PPS_CHANNEL; > + fep->reload_period =3D PPS_OUPUT_RELOAD_PERIOD; > + I think this does not address Eric's concern on V1, the initialization still basically happens in the same scope. On the flip side, quickly skimming over the ptp core code, it looks like that the ptp core will always call this function under ptp- >pincfg_mux mutex protection or at device unregistration time. AFAICS that makes pps_channel and reload_period update safe, so overall patch LGTM and I'll apply it soon. Thanks, Paolo