Received: by 10.192.165.148 with SMTP id m20csp4396803imm; Tue, 8 May 2018 07:51:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9Gb9GULG9K1ghBWm0h8fPZjigNvNBoqh/Vzw+Qouid86ZFQhlWCRbpdiAp/XcdNfIZhkF X-Received: by 2002:a65:438b:: with SMTP id m11-v6mr9815779pgp.99.1525791114121; Tue, 08 May 2018 07:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525791114; cv=none; d=google.com; s=arc-20160816; b=L2EKnsOCCcYfYM92mV1GTQJrP+LP+vZctlZ1SmTynuvbPdZrHjcRJqAHXzVFRzNbqZ 3Hq0nHbHDOxNrbXqKofWvBVP16/NKBZRXHwZ9QKeCcp2f5xx0quQyhP5+8H3v39i+S55 HREHFwrk6p/0Z+5Z6W7zHB64uKkG6tnbQIIFI/Z2JEPCy1AM6/ckjSI24K1jCkiRykEb tZn9vILRtN2NDmuZ2LTUVJecBM8k/NAPc1UTOQm6qxhIdgy0AvUwZX9Ilk5RZy4PtxtP TSYNQMvcLa4UbMz2aPxIAof0IlKnzaurNQfHDv5IvpQt84LvyFrmDQi3GBDDlbNbtPUp Z43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=8Wj+PkqgXehBUiaLAuR/fnelEK1pB6hUIdxK6kMXZMw=; b=I/musDy7K0XchhPAf5AE6BZFhLGzDNo3RCwMVoO6i5R91UCoBgWWXB8hVrb1zELRqy 0ImRQAUyloqcH4cWrrS5i2ZhnzzlODeLKv3PMsnvPX98aoOcnUA3rqC8TXUkpofFtToU ksZgPMVHX282DvP6sVlmK1fSEOZ8h/LsOcAWSj77lLnRsJUt88H6XLUW3Kfi3OslF8HQ k+iPKu7mO8KOIUX1MDmu8yWD+oYazt+T4OzDS2epSosEXUkpVXzhi65C0hojjCyiMOER gbLhaaCk0eQECV5MLVIwV0xPIlclCJv5+NNd1ZcF0ZMwkZ1cwsRCUkhYe+qiCxfKFL9J uEpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=T+9tORWu; dkim=pass header.i=@codeaurora.org header.s=default header.b=T+9tORWu; 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 g2-v6si19930084pgu.212.2018.05.08.07.51.39; Tue, 08 May 2018 07:51:54 -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=@codeaurora.org header.s=default header.b=T+9tORWu; dkim=pass header.i=@codeaurora.org header.s=default header.b=T+9tORWu; 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 S932789AbeEHOvQ (ORCPT + 99 others); Tue, 8 May 2018 10:51:16 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58872 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932452AbeEHOvP (ORCPT ); Tue, 8 May 2018 10:51:15 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BBE666085F; Tue, 8 May 2018 14:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525791074; bh=0zIYprWZKGegplHkHQ1uShrQTQIc6WJoUfUzuN5qppM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=T+9tORWuAXBtErTwwb9kSCCf+sKqsRWU2Y941s2rVOLqCkeMPyPkOLpcM9gqINVsz xCXw53y24SSYpf0XMAN3A/A+/Ti9Pr+73LpEgGa8T6LQSsXjBdSj1ZDmQr25rYeg+a iNS9mOZwF7H/gZKdEqNjv/0rOWqUYkKAfbOXjwLE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-52.elisa-laajakaista.fi [88.114.240.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 36A3960250; Tue, 8 May 2018 14:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525791074; bh=0zIYprWZKGegplHkHQ1uShrQTQIc6WJoUfUzuN5qppM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=T+9tORWuAXBtErTwwb9kSCCf+sKqsRWU2Y941s2rVOLqCkeMPyPkOLpcM9gqINVsz xCXw53y24SSYpf0XMAN3A/A+/Ti9Pr+73LpEgGa8T6LQSsXjBdSj1ZDmQr25rYeg+a iNS9mOZwF7H/gZKdEqNjv/0rOWqUYkKAfbOXjwLE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 36A3960250 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: 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 References: <20180508080636.13827-1-baijiaju1990@gmail.com> Date: Tue, 08 May 2018 17:51:11 +0300 In-Reply-To: <20180508080636.13827-1-baijiaju1990@gmail.com> (Jia-Ju Bai's message of "Tue, 8 May 2018 16:06:36 +0800") Message-ID: <87o9hqxktc.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) 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 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. -- Kalle Valo