Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2555815imm; Wed, 3 Oct 2018 05:51:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV635vf/HHVEcsYF2sld5H5kHriAQsyRVkENIYwEAzxPQk758J4qHgQB33dSlk0iX+hQXgixG X-Received: by 2002:a17:902:5590:: with SMTP id g16-v6mr1517944pli.46.1538571090446; Wed, 03 Oct 2018 05:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538571090; cv=none; d=google.com; s=arc-20160816; b=hCD7wQeFQounEMPkpbDDBuKniJ8GT2Bfu8RS+haLnQmW3rkPgylX/kFdyD6hUVN7Cz E+5Kymf/CZXryF3BEW/42hSBwDloU6PFh37afOTGKCFFJ5TPfCLt34yUErrsKkZpxCIt YNYXH4CHjW+J+yPza4pSFyONiC1ulFA6RTTytx3SZaKQxTQFhoTHaEMv2x85fJxSNnx+ Nki3oecZIRzbvwpf0kcP8bg2VS088HpTpeBo+u0c3Xm+Db6P5Nizgud6Zjg0LocckqU5 0sZ5TJvrPZSF1nAwFolLtX07vdjDYmlEEeV6sx5exIqcDcwilaS+VDUfUqLjbY5hyyMQ qZTQ== 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:mime-version:user-agent:date:message-id :cc:to:subject:from:dkim-signature; bh=JjL01YFDLKH/V8RAnJYaqKnjrO1y9iwpHovo/trJg8o=; b=dI7923aQMHTtSVCkXJ3DozaQaq+DQhqtdnnMvZ3mCy7Z2v3xeqRsFV8EkvIsA+JYkA gZlZ9PHIWL0yuACd7ycH2g49y1k4Hc9gCNYFmpTFGW5tXAWxH18bBeJVbnIgdxBARmNr BvLCwYVbmc12jotXWzU2Ow97I0JXltgRQjYX88JuxAReqz1lWR9ILOFLO2Zch3toukja NNq5cUmPnaaU96xYASYuSyLm36oGg1mI4MtQAbWKjW4X1ohtuWlvfXIPyAsa0pAaJCZS cwef32ZvyiUBzyyba9Red1xJAgkQOj6ibP/yJCFsOwQRFcVBHX4YdUzYgYOyfY4IKW1x c/3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VVGZJV8T; 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 k193-v6si560018pge.363.2018.10.03.05.51.14; Wed, 03 Oct 2018 05:51:30 -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=VVGZJV8T; 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 S1726933AbeJCTiq (ORCPT + 99 others); Wed, 3 Oct 2018 15:38:46 -0400 Received: from mail-pf1-f172.google.com ([209.85.210.172]:46787 "EHLO mail-pf1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbeJCTip (ORCPT ); Wed, 3 Oct 2018 15:38:45 -0400 Received: by mail-pf1-f172.google.com with SMTP id r64-v6so1628601pfb.13 for ; Wed, 03 Oct 2018 05:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=JjL01YFDLKH/V8RAnJYaqKnjrO1y9iwpHovo/trJg8o=; b=VVGZJV8Tq0dBGExHdHZBPdctMtSHOCPucdMf+YbeUNkxaScMQI8XnjL2YE40dSGDd+ zNZMlApHTft9FI5E3OzfzV2r26NvyUYDqCQ5xvCX/fcUos+9Uh9F0Ar19e7ILK+bJwln 38VmBHMD+mgjRi0UT8ZeCARuVLCiiZk/Ab+/esQVEW+gOjc9dyi0QbaP/6h8aw849GPU FVNVhCmYvGQIzFy80tEO6kssUvIyNDlEqEeF7uBSM98/zJ2shHGyki7BZcEz6nuiMGbF tJasn06y/w12Q9qcQwKz8ySTeu+e8JoxzrSTCEl3h2CluuObTYBy7vMmnXrwPXnOSFm6 Jo3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=JjL01YFDLKH/V8RAnJYaqKnjrO1y9iwpHovo/trJg8o=; b=mr2YiygWOFFZoNBDqBhxlMMq418kWN8hy+lnFRZa2zJLQK5UOhtBZSRo58UQUfMPsl ifFCbkscW+P4A6BHjCPnhbIN5hxszGBNiHahLo8LfWxVEKPyHp4jTZvLhes3IoJn6+au /k5F3stO36ijjbUk6tZnoPDBOrJXcskxfdYFayuJ4XmkMeflO4LdLogj3BdsBOP/9F1q +sl+NfL9GItdDuy4eGupt0KUq5dMoH6K+HGTK198e5ds9tzlDlJABo1MhVdJpzaLrOcy B7gp0g1CfrM9YZVonbsMa/DcA5QptoCvGlECCa3tQDvNyQJ76P4PkhzAd6vtRQfQKd49 jmmg== X-Gm-Message-State: ABuFfohYOmnode0jSg+GVe8nylrMI+fKKnMm5wOzZ0uoVDhVIk+TGcgT G2gs1Dx1c7yCt/DgTTzCAGrmz5iT X-Received: by 2002:a62:9586:: with SMTP id c6-v6mr1466428pfk.234.1538571029867; Wed, 03 Oct 2018 05:50:29 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.71.3? ([2402:f000:1:1501:200:5efe:a66f:4703]) by smtp.gmail.com with ESMTPSA id z22-v6sm2021005pgv.24.2018.10.03.05.50.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 05:50:29 -0700 (PDT) From: Jia-Ju Bai Subject: [BUG] sound: pci: trident: a possible data race To: perex@perex.cz, tiwai@suse.com, keescook@chromium.org Cc: alsa-devel@alsa-project.org, Linux Kernel Mailing List Message-ID: <864e211c-8be5-6a34-902a-a71f176111db@gmail.com> Date: Wed, 3 Oct 2018 20:50:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 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 CPU0: snd_trident_hw_free snd_trident_free_voice line 3870: spin_lock_irqsave() line 3881: voice->substream = NULL; [WRITE] CPU1: snd_trident_interrupt line 3798: snd_pcm_period_elapsed(voice->substream); [READ] As for voice->substream, the WRITE operation in CPU0 is performed with holding a spinlock, but the READ operation in CPU1 is performed without holding this spinlock, so there may exist a data race. Best wishes, Jia-Ju Bai