Received: by 10.192.165.148 with SMTP id m20csp3965605imm; Tue, 8 May 2018 00:05:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoTOwp+zzwO5iLqkZy8n9jztENjtle4V9S9t7I52qfBXUGFEvGX09h1R685KVT9Z6bL1cK0 X-Received: by 2002:a17:902:aa95:: with SMTP id d21-v6mr38929927plr.73.1525763138354; Tue, 08 May 2018 00:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525763138; cv=none; d=google.com; s=arc-20160816; b=g60/Apn03xsGE2jY8Lq+Bmab1ShwRykz9uveUUIA3AeEZzb5BqVgKf/UTiojA97Zt9 cQ0vFG5J1dOcAppghlAYyU9wzvPg+TYiWC3CgaIZ0KHoEUc8IqbYZYb9Ad1+pvXoD+Ao PBR0FMlXPzWyxEIXzX/5VzjVm6AXln9zNm/SP1MQl/HWDrLvKepVwTiGJqw1afCoj/2F BMbkauWWrZyjsiVYMmza9X88lIq37RKBCNx3MznJO9sxz6ir0PWAG1CrshvRUh8ESceJ jTBtYVa9qlow78QjbVeh1hx47jG9DQBKzXZ/kA4GJiaeFrrsde1KGEnnZvmANLzVvLPc CsAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=UNum/+WbT6NK4qYFSr0dGRBny0INzzlJMireAb1/4Jw=; b=0tbqWHfX6UuF7fuaI+aR9LbxOy05XrJv/a2RqPSZbzj1hze/I96vgmt8k5VGONKc6K 1uLSoyjVvG5Q5flQeFpls6CBX122zdAapdnoWqtH3cVFheddVaeNmSWr2AHn1RjSo7Ya RMBqClf6Py2BmPyvs1rVNMYM1SiCAtYxW1m3/9a3W+8o2qZMyrjCTVLEDEEv7IRocM+R Q9XJpE/v/bY/dpiwuMi/OGS/Z0joay2AUwmWrJJaUfCb4EkZLoM2Gf8WEfRSZ0TCNsnd w4eh4QwgUM6epoUBnFTw1Xv5+ITC+/eYrvm0JyQ5pDmt4eXNY7AUvRRwZwxtHnhyjMpS 0PKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e9nJCQ51; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4-v6si10788555pgc.190.2018.05.08.00.05.24; Tue, 08 May 2018 00:05:38 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=e9nJCQ51; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754622AbeEHHEW (ORCPT + 99 others); Tue, 8 May 2018 03:04:22 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:41641 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754272AbeEHHEU (ORCPT ); Tue, 8 May 2018 03:04:20 -0400 Received: by mail-pf0-f171.google.com with SMTP id v63so23491407pfk.8 for ; Tue, 08 May 2018 00:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=UNum/+WbT6NK4qYFSr0dGRBny0INzzlJMireAb1/4Jw=; b=e9nJCQ51mJmp3ba9jgca/C+L+ah9rgFQgAqlbXd7G2CneDg9ZLC0u3WIgUmYo0bYDX 48JvDAmd+fJGCe//mLc/RHwObtAX9pW3eONfBTVNuv6Nz+6m7PqXas5py/Jl+JhJntsN FygYP9YJKTl+NUJPElSz5EyonDlOhG8p1FN7jNNs4WyvB9zcFKl+adWtPmfbn09HBcK0 Q1CmpSZAJVzd29R5wdU3w8EjZIGMAysv6yFSJnyz2pcbck0sdlBRW0nWXYR28CTtj25m VZ2r/FH8ABEwn+DatZI1HSYdkFfjM2su1L+oVFgH8kxNYnFn3i8Vza0BLv7qM7D+swTL /3uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=UNum/+WbT6NK4qYFSr0dGRBny0INzzlJMireAb1/4Jw=; b=MvJD7eNNvXVDSAD+3/5cjb7PAT49rbwDl1eexxDHof1Qu1CNqCw3xPmlgKUyGYigKD uDXgJ0fCnKUFcdroVbzbKt6y5NMRezxWy4RK9JyF784hNjSswsRe3bdmhsK/BLgfBh64 6prwKvaWUreBrQh5j0DIj1dKEcTYTjkj3/75eG+x7ctUK0vL0VyDflNl4G7lzRaGJonH BLYR7Qr6e0K9MThKwq1WAo+wzsa2nOw+YxFREpYtPiZp0m9m6HpzGfvsrrM9XdGgtglf PRK0PXR/RbP+H8vgsZMYmzRTnPJ2vSI/lj3AuiKhJ+fMQHl54nJU8hgr70hCSe0gvAJc 5nng== X-Gm-Message-State: ALQs6tD/jn3JzkvKBXLl/nZYWxebF9OaRfEmdprJvaTyr2M+mldffvGH ULtwoU7CVJofDdYCQ2jMP4hrnps5 X-Received: by 2002:a63:b406:: with SMTP id s6-v6mr32637624pgf.334.1525763060154; Tue, 08 May 2018 00:04:20 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.70.9? ([2402:f000:1:1501:200:5efe:a66f:4609]) by smtp.gmail.com with ESMTPSA id s8sm43549342pfh.30.2018.05.08.00.04.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 00:04:19 -0700 (PDT) Subject: Re: [PATCH] xen: xenbus: Fix a possible data race in xs_request_enter To: Juergen Gross , boris.ostrovsky@oracle.com, simon@invisiblethingslab.com, joao.m.martins@oracle.com Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org References: <20180508033429.12749-1-baijiaju1990@gmail.com> From: Jia-Ju Bai Message-ID: <770bc26b-3819-2235-132f-55b0319955dd@gmail.com> Date: Tue, 8 May 2018 15:04:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/5/8 15:02, Juergen Gross wrote: > On 08/05/18 05:34, Jia-Ju Bai wrote: >> The read operation to "req->type" is protected by >> the lock on line 128, but the write operation to >> this data on line 118 is not protected by the lock. >> Thus, there may exist a data race for "req->type". >> >> To fix this data race, the write operation to "req->type" >> should be also protected by the lock. > No, xs_request_enter() is never called for a request already visible to > another thread or processor. So no race exists. Okay, thanks for your reply. Best wishes, Jia-Ju Bai