Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1265104ybd; Wed, 26 Jun 2019 14:23:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNG+tVdnu84pA8DbumGDd+zZiCDyoXHx7CBGd/cpZxeGGDh98n00c73nhh5qd/2kh/Cgee X-Received: by 2002:a65:538d:: with SMTP id x13mr93666pgq.190.1561584189568; Wed, 26 Jun 2019 14:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561584189; cv=none; d=google.com; s=arc-20160816; b=MSTLm6xqZwevKfXaMCFS/4vnLYcvq4Br2OZLdvX2tBu20sPpCebyQns+YlTYYLz4Mt 1u8J3IpZM4CbI9oMWf7ANM5aru4HolwdF2mbvHvSa/ppA6CURFQpC6+chfwPiC/pYSDT ogHKFxssxVD656OnCQOzX13Xg3hsm1dsinNJqFcRzBL45bAQh7Pb7s04k4N3BIQ9E+rB hfcNKHdQkY0TEhBkA1aBZElWscnsErrTkjPm50GxB2DYuE80JeTq7iCejO04BgND8QUk mrowi5aFnsF3DTdzUzWjzVkikstGPHPrx5YVtTxgbXz++KhD1dSQ/sNIl/7dN7wWE0X4 Y5rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ij4y5UDfEbG2jo5JYyvAwzXVxT7kJpB2+6FE5/HNPYw=; b=uOjUUO7xDrijlIQnzwkt4oZtsdMCYFKnAOO7dVncowzFroattBo3CY2ZiViiQd1Ln9 YmJ6F1Q1Bu6Tq2wNqrxpjD5gY1sm+phnqDGclROy/fZERKAr5twlSI1TJyMH//2fT3IZ IAPlbTMFc2vvFvu8QQMZpX0tI+LIOSwRLy74xPG86hwLXjs13LbOR/5QqJ0eeKscwkxb crh1rZtckwdg6mqYNrQYxCNevEMnc06jEvcGftnK4WULu3HHuErfdil3cEftFyKxBa0A 2G9y6N+2c08p0Mny+AKoI8yKXv6Eai5FHHPtACtGmFCbAe51PSBX4Fjr4xoMZzwEMs60 9gwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AxObSdEA; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si120656pgr.376.2019.06.26.14.22.53; Wed, 26 Jun 2019 14:23:09 -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=@chromium.org header.s=google header.b=AxObSdEA; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726416AbfFZVWo (ORCPT + 99 others); Wed, 26 Jun 2019 17:22:44 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33825 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726271AbfFZVWn (ORCPT ); Wed, 26 Jun 2019 17:22:43 -0400 Received: by mail-pl1-f195.google.com with SMTP id i2so40999plt.1 for ; Wed, 26 Jun 2019 14:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ij4y5UDfEbG2jo5JYyvAwzXVxT7kJpB2+6FE5/HNPYw=; b=AxObSdEA5QIyp/BHvcsUBVQDhF9QON4UnumA5yV/WsAbRMHm19Cbi9O/ddxhZKwrLa VC/rG0o3A6HrcSOJkJZW3gaqzTLNMaxZk0ItDnArCuNTT0UhYrQF4IX0OpjGvgMuWHro SbE7n5O3FQV3LK5Ye8V7EoZrh/Iylzxd8wRwA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ij4y5UDfEbG2jo5JYyvAwzXVxT7kJpB2+6FE5/HNPYw=; b=ruoSO9jo77zJbFOHatmXEZaACDKN2XoiRqloU/nbHMH46HBAZzSrhlKDi98K62Zo1I Om9xFttFojBZkATfeT0eTTKJuUbsNq/Grn3xI7L+YrFrrzrAg4a91o1CVAT8ZpThyf+9 TmhD/JQ1NW6IeXQlR4zekL8h/HznvI06I+aLcD9EL6Q0io3lD3ll2m8oybpYA0ITCmv4 VrIfF0fcO4DtP/7UWxPaP1s5wR5MWvBNHyAiYKfB4785mYp02ZlB4R1WPSk2MsZfBVE2 b5+/db9z54V4Iws/yICdH4Q7POk+W7U/dhMT1syUVquWHrHD/WBLBDfHq8ANyq7XFyv8 GkSQ== X-Gm-Message-State: APjAAAU84qekUaW165Qq8+ld4GUk5FsHPqV0xNMU/E3O6o3uCUBiGLTN 7dBldd5Pv9QGtE6XJsjtfakoSQ== X-Received: by 2002:a17:902:8649:: with SMTP id y9mr190931plt.289.1561584163195; Wed, 26 Jun 2019 14:22:43 -0700 (PDT) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id h6sm170323pfn.79.2019.06.26.14.22.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jun 2019 14:22:42 -0700 (PDT) From: Evan Green To: Takashi Iwai Cc: Evan Green , Jaroslav Kysela , alsa-devel@alsa-project.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , linux-kernel@vger.kernel.org, Thomas Gleixner , Greg Kroah-Hartman Subject: [PATCH v2 0/2] ALSA: hda: Widget memory fixes Date: Wed, 26 Jun 2019 14:22:18 -0700 Message-Id: <20190626212220.239897-1-evgreen@chromium.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes concurrency issues with the sysfs widget array. The first function patches up the locking that was introduced recently to protect more of the data structure. The second patch fixes a race between a reinit and the initial population of the array which could result in a length and array getting out of sync. Changes in v2: - Introduced widget_mutex relocation Evan Green (2): ALSA: hda: Fix widget_mutex incomplete protection ALSA: hda: Use correct start/count for sysfs init sound/hda/hdac_device.c | 21 ++++++++++++++------- sound/hda/hdac_sysfs.c | 18 ++++++++++-------- sound/hda/local.h | 3 ++- 3 files changed, 26 insertions(+), 16 deletions(-) -- 2.20.1