Received: by 10.223.164.202 with SMTP id h10csp192504wrb; Mon, 13 Nov 2017 05:03:51 -0800 (PST) X-Google-Smtp-Source: AGs4zMZD517FnrrVDmN0d4m9od+bx8cFlB/RzIh2TBSqMJfOdjNZCu4JY31BuAVmUCtBbc09r7a3 X-Received: by 10.101.66.65 with SMTP id d1mr8830341pgq.63.1510578231013; Mon, 13 Nov 2017 05:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510578230; cv=none; d=google.com; s=arc-20160816; b=isymHh0okLERix5XlzdY7IRjtdMPG2aTpanwxaw0Wt+WQ37lGR4TyuJLmp58mle+NX sPJvLT8J2TJZQdY2WQ/LXoJ7im+YzzGYOdI5YzSiLPq66MW0ILp2hOhhtmIzbTZmth63 ojS88gizDrrfDiEtcLb81nFiz0qOQ1px7oLRqSvoXtaMqhMauOH8dwQHDRYkoxiFaCXO EJ+mDmX+a+N5cIpiQySozYcUSrcG/HCU2f8zCwdjr0eWkweMM/gq02Yd1altWvQMeZLd +gv3U8OKtTDPHLFU3R12tLP2c6Ei4iv/ckZ040cEH7Siz2gE5SXZ+pKlyN8wlBCowFg7 W0RQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=xQJYnI2tNWNllXSyxCiNL9V4JEZHI77wSb3g7l2lHGA=; b=MlfDO6gslVNLXl6TVE4R/r4he7BHZ4VwPRDJ8VsW6/JFGD3B18AKA8rat72BDoYQ3C YTSYkLEBviimkVJij4/p7+AcjXY1KEz8OoPuhjywkNKufPkXY5HZyqZCt5OgQhywAYH7 f1Kw5c9DnTBE/T/hrJo5N88Rk7DchWi8M4DEpB4UMCCIDxVb5UY7lhdFNcy3VUOQeXT6 ipQWxS5YaXKEO5W5fz4DQ8Y0hH8DYI0ja9YfaJfFWsd9S13XwpQvd7DGIK8pg1jaFMbx 7GfbTlKDRGyMpeagPmt95mmg69fwvgghjEQKWzX1zBBWo0rx3mWtVY1HGTcZ17unvhjf oSLw== ARC-Authentication-Results: i=1; mx.google.com; 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 y11si13696610pgr.323.2017.11.13.05.03.37; Mon, 13 Nov 2017 05:03:50 -0800 (PST) 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; 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 S1754641AbdKMNCw (ORCPT + 95 others); Mon, 13 Nov 2017 08:02:52 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51290 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753879AbdKMNCt (ORCPT ); Mon, 13 Nov 2017 08:02:49 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6321EAAE; Mon, 13 Nov 2017 13:02:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot , Takashi Iwai Subject: [PATCH 4.9 63/87] ALSA: seq: Avoid invalid lockdep class warning Date: Mon, 13 Nov 2017 13:56:20 +0100 Message-Id: <20171113125621.062662386@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 3510c7aa069aa83a2de6dab2b41401a198317bdc upstream. The recent fix for adding rwsem nesting annotation was using the given "hop" argument as the lock subclass key. Although the idea itself works, it may trigger a kernel warning like: BUG: looking up invalid subclass: 8 .... since the lockdep has a smaller number of subclasses (8) than we currently allow for the hops there (10). The current definition is merely a sanity check for avoiding the too deep delivery paths, and the 8 hops are already enough. So, as a quick fix, just follow the max hops as same as the max lockdep subclasses. Fixes: 1f20f9ff57ca ("ALSA: seq: Fix nested rwsem annotation for lockdep splat") Reported-by: syzbot Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- include/sound/seq_kernel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/include/sound/seq_kernel.h +++ b/include/sound/seq_kernel.h @@ -49,7 +49,8 @@ typedef union snd_seq_timestamp snd_seq_ #define SNDRV_SEQ_DEFAULT_CLIENT_EVENTS 200 /* max delivery path length */ -#define SNDRV_SEQ_MAX_HOPS 10 +/* NOTE: this shouldn't be greater than MAX_LOCKDEP_SUBCLASSES */ +#define SNDRV_SEQ_MAX_HOPS 8 /* max size of event size */ #define SNDRV_SEQ_MAX_EVENT_LEN 0x3fffffff From 1583972310924211835@xxx Mon Nov 13 17:21:50 +0000 2017 X-GM-THRID: 1580460629045084596 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread