Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4201499ybl; Mon, 3 Feb 2020 14:35:41 -0800 (PST) X-Google-Smtp-Source: APXvYqztKq41hrz3mNkEdM0LCSZjTHgexEjK+lr+ZD2wQGV6y+lVnJvdndswnlxb4YbiaQMoybCy X-Received: by 2002:a9d:5c1:: with SMTP id 59mr19456396otd.192.1580769341459; Mon, 03 Feb 2020 14:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580769341; cv=none; d=google.com; s=arc-20160816; b=s1F46pjQf/LwN63WfqMa/ffovgHmUvew4Wk26nOyMlrzVKm99DO4u8SxBJm0FfPV3Q OkNP2W1lk5J6j7wWTyrbyzevGd6sGf5iIPuBqaKYl/HKk6+L8VsB6fycO4v2EvKvvms+ EZFl0IFk1P5jb/SjJASjhoQ42N/asVrQ3XJta/fDf37R7eaJvshbgnSKBPOeA0NjC0kC HN1t3FwR6ROAeP0ASGAz5LQakDrK/jMgyLVoMUM9y+/9iVVNTv0MY/kEMgAdEQO+veg5 wTSoMMwhRTvICA/BbSOIf6mnU3EBMqpRK89J2PJap+NNNFbel/5C90t4DWWg4lOfXSP1 s39Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=+fusxKQznfXe0AR6ZRaAM9DvgsEBwF2XHWrHEPkZkVI=; b=MnUFkDzgF0mmiD4VVD2hAoNcbR2HZdnDjuyk8itLZWaQ9rtUbMKQ52Xupgd09RX5ES Te1t8IldcJHFnm4G2+vAkApNGVsFCBvKELknw3ZvPgB/ICG5Sz5u7gbdoRNuxj7oG+bz BLjIBhlTlGhaN4au+qd35DuCHyfYaECjq8qaxe4hGFLVXD4poDZcnUlRxgMhNyuetGN9 cuIQd3LUNlLqCmz4Su4aueRmFLDWX/oPn3NTKmDoM2nUi2nF9k1qjc6u8SYhirR40K54 xw3gSqjYYIAFwWluG+ihm9p0N7ptEf3JZm0bUALlPl44KcLdXJR5LOOhUocYak+8W+QZ vo4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=bFqSrV10; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p83si8891267oih.198.2020.02.03.14.35.29; Mon, 03 Feb 2020 14:35:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=bFqSrV10; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727324AbgBCWej (ORCPT + 99 others); Mon, 3 Feb 2020 17:34:39 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:42341 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727176AbgBCWei (ORCPT ); Mon, 3 Feb 2020 17:34:38 -0500 Received: by mail-qv1-f65.google.com with SMTP id dc14so7625373qvb.9 for ; Mon, 03 Feb 2020 14:34:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=+fusxKQznfXe0AR6ZRaAM9DvgsEBwF2XHWrHEPkZkVI=; b=bFqSrV10iRvDAZ/8wZkiP5LNSgydjiVDGxkvlnZFoX/IbXO6VLESkTO02xIQm5xh7D nSmh3e4Z0JRFhX01lUM4VgAgpGan+2//aKG74o6//J5b9jZZ1Yuh0uPPU15XNVn3dP4H 7vseIj8E/cSfHt8TD5BP4QGLJhgRt8fhW87I77Ea9dgYkjzJPA4/szNGMr52n5tRelDQ y0258cgv7p0vW8AaXnvfqC50e433ErrCVftsAvtuGeRNGCstDc+FC84hU0/vc4GFVy/n y6yGaaVT7B1mk3VYmRUDoNIpg604j9lJGEImbRrILVb12ngo2/wXWGwgrm0ftr4RDhMt 1gRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=+fusxKQznfXe0AR6ZRaAM9DvgsEBwF2XHWrHEPkZkVI=; b=ZDI9oKcuUpfEaFlJky0bwr03uIodiLN3zOgSQikTxsoZHtpAz90sFEoRw5oVJIN7co ne+9MK8dVxcFTsNKeXzFSTao67sHyZ4zsxP9u6B5yB8zMmSPEfMHnzUPsElkBf292QdP riOC7tUGao+zDdGc8PSwBGTHyEjQnjhdW1ZM/qqkUJAiLK5Jqsxo8+aRrZUFUEO5aThn H4al0syHbZOYwLvakjjZp2wU5x6xzZGT5RZBkB0GEuGsVOynb5sgPHenqLGiKlKumJzj gHHSt+VOZKq8m5Ch8ZgRF4NS9/vYcRVQGeiTn7+NgDwaZz6X2v9A3VAhP/jv8p0P6wYU 5d2g== X-Gm-Message-State: APjAAAVyoTj2gD59MCw3RmCm+HRcdRtBiWRGkJwwyinWIfZUqWH1IDSf z7GogrhEIMppFTyrMQ4uKe07tA== X-Received: by 2002:a0c:eacb:: with SMTP id y11mr25722163qvp.68.1580769276355; Mon, 03 Feb 2020 14:34:36 -0800 (PST) Received: from ?IPv6:2600:1000:b048:97ac:a93a:b890:262:8b7b? ([2600:1000:b048:97ac:a93a:b890:262:8b7b]) by smtp.gmail.com with ESMTPSA id e3sm10786731qtb.65.2020.02.03.14.34.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Feb 2020 14:34:35 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] skbuff: fix a data race in skb_queue_len() Date: Mon, 3 Feb 2020 17:34:34 -0500 Message-Id: References: <126aa227-2383-efdd-742c-6ccf85ae7ba4@gmail.com> Cc: davem@davemloft.net, kuba@kernel.org, elver@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <126aa227-2383-efdd-742c-6ccf85ae7ba4@gmail.com> To: Eric Dumazet X-Mailer: iPhone Mail (17C54) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Feb 3, 2020, at 3:28 PM, Eric Dumazet wrote: >=20 > We added recently skb_queue_empty_lockless() helper, to use in these conte= xts. >=20 > The fact that we use READ_ONCE() is more of an implementation detail I thi= nk. >=20 Make sense. I=E2=80=99ll use lockless in naming instead. > Also, addressing load-stearing issues without making sure the write side > is using WRITE_ONCE() might be not enough (even if KCSAN warnings disappea= r) I suppose that could be a case. I=E2=80=99ll have, WRITE_ONCE(list->qlen, list->qlen - 1); in __skb_unlink() where it had already had a few WRITE_ONCE() for other vari= ables.=