Received: by 10.192.165.148 with SMTP id m20csp4442346imm; Tue, 8 May 2018 08:31:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoy9sRiHkFZ+m33LrcLydcg49iPgGJWAa+MIpGHmelTmQlm6G9HdDOm/lHKwRb1lLsQWCPL X-Received: by 2002:a65:4083:: with SMTP id t3-v6mr33123804pgp.129.1525793473441; Tue, 08 May 2018 08:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525793473; cv=none; d=google.com; s=arc-20160816; b=xo2Tncci8zgQ44/2jvDwBIxHR05xLUNPeb5oYwx6/Oz3K7zcQ6nf0fA0eLqOVPBoSL CTl1mS1SWelx8NIipOHhMIxuEK5VT9H2Z7SfvLxdvzA7GwsvPWXUB7DiQ18AOudGhCo5 E2JLcXiieeZjJzWG87J5toYH03b3wcuKt2b91xnHx0BOeRZTH4oB1C3BOa7a/g/sN8xQ 68uR+AoDuL+CcGrby0Swc/ulfVHo8PGjnm5xlc/zQFJsZLQUfxseddygv026MN3Xitpw i6mdI98CGELnd3z1cLOvG6TQr9kpdZYyvDHP+BsihX4pbnDbItWVuc/nkAeVlwnJZ7R7 jfZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:from :arc-authentication-results; bh=FSZ6vZ0lbWdHM0mgifa74uTXp6rj8PsHzNfUDYYmdUQ=; b=ZHnqCfe24Q/89LSHhlo26WO/VRXM55CxtAFUw2X+YOUgzEDPcCMimcM5spaA2cBg8K NOkV4k1eoTFkibiFrBSo87zBPgxJ12U8Uw0jcFoMh0UfQr6vN0rdPnqDlftE35mYnlIF pSsPJl1r5m49OOO1xFRuDxe8TPid1HEZvu8U7vReFQ+pfGXeasfr0WiubKr4w3AN+Y9F a3OSznZ0WNkDlplCF8My1psUFZTkFStEHSuUKWaB2wR+wW085sMGZjDspL7I/7XCXx+7 WJQ4PQGW9cCNRusp/z2Uww+FFX3GNApy6O8gdtA//NWQBshsDkMtUp99PDI6GpEgjDMs LZBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toke.dk header.s=20161023 header.b=py25oUH2; 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=NONE dis=NONE) header.from=toke.dk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13-v6si14079678pgd.541.2018.05.08.08.30.57; Tue, 08 May 2018 08:31:13 -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=@toke.dk header.s=20161023 header.b=py25oUH2; 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=NONE dis=NONE) header.from=toke.dk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932946AbeEHPIM (ORCPT + 99 others); Tue, 8 May 2018 11:08:12 -0400 Received: from mail.toke.dk ([52.28.52.200]:59901 "EHLO mail.toke.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932768AbeEHPIK (ORCPT ); Tue, 8 May 2018 11:08:10 -0400 From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1525792088; bh=hnKJ3dCRsl32EwgCdnejLiLcBMtF0F5lR4iBduyyhvc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=py25oUH2R/sCDAFjRqixHMpcTlsEZ6j+T4yDRZlDh7+h40ELLjfczppxILGlX2gyH RkzkqDWDRdg/v0ZXIwFiG+OJ3X1tGq/MuaIASnNjLpaipGm3hGAFSRkfYp94m369t4 zX6/L6WhdmsTFfdbtf6SMZPl1QZXKFGZOVomh/WR0KPVJ4/RveTe63EV47t/C/gltX pwcS7ap5cUR5KXf3jn6C/9iWoShDn+YPMTcYdm0UvQj3kHJcUEyECgFMa7p2sFUdf3 fwyNzkzEOrWj0EkfpGvEu3JeZeRkQvZJGRtjkgo6+dCzXJqYnPe4r9GnmoETwM5KoK GiGKPXtODb2/g== To: Kalle Valo , Jia-Ju Bai Cc: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: wireless: ath: ath9k: Fix a possible data race in ath_chanctx_set_next In-Reply-To: <87o9hqxktc.fsf@kamboji.qca.qualcomm.com> References: <20180508080636.13827-1-baijiaju1990@gmail.com> <87o9hqxktc.fsf@kamboji.qca.qualcomm.com> Date: Tue, 08 May 2018 17:08:08 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87h8ni423r.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kalle Valo writes: > Jia-Ju Bai writes: > >> The write operation to "sc->next_chan" is protected by >> the lock on line 1287, but the read operation to >> this data on line 1262 is not protected by the lock. >> Thus, there may exist a data race for "sc->next_chan". >> >> To fix this data race, the read operation to "sc->next_chan" >> should be also protected by the lock. >> >> Signed-off-by: Jia-Ju Bai > > I need this reviewed by someone else before I'm willing to take it. Only possible issue I can see is that it puts a call to getrawmonotonic() under the spinlock. Not sure if that has any bad implications... -Toke