Received: by 10.223.164.202 with SMTP id h10csp408460wrb; Fri, 17 Nov 2017 02:39:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMbk5eJBfZ7LdzXprwuBoBoMCUAB6/1RsybsHyfVEwuQXm9xJ658zcL2aEV/A+T3k4olhT+j X-Received: by 10.98.85.71 with SMTP id j68mr1595964pfb.222.1510915147884; Fri, 17 Nov 2017 02:39:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510915147; cv=none; d=google.com; s=arc-20160816; b=jFJdS6HOQpohql4ATIZM7XPMc6oVku5iMJFhHavv4UWvvnaxA7YAzPn+f04fGhPXsA D+6f2Lm4tPLsqKmtwwWOzgv2GSs5IOpU0D2JDLXEFGBQrH3mKltZFZJiwkDGVUR6LqHc Vl3xzu/z6syvtlQMnk3+LqBwjTPf3OLubwRlJfBqq0mUKQhMEW/QUZFT0z7tzFAOcsIl w7Jiherw58cYs9Gbxw7vFE1L4Uy2poRrKe+tvu654NyL3lBcsVcXsSPXA1DkKsqM1A0R rdfVxopka4iNXd8IGcbDu/mdjgN7uZeBkU+D41enJj8q+wlc9avSQnuUuPcZb8ni4WhN tYvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=vsX2SMPahimD7lm/OwXR4HMpB6KnO6s2gSutESXMnxk=; b=AUG0sfawyHBL0V/rHelcJDq9lds+Fykt5ILd3lCf1KxyZ5acMlGjZzR/lHyh/Bi59Z 8kyHW5mM1CUG4UBsyDavbMR+gJMrzAh1dUeDPrxgZb+/JX2PZzrM18N3JNgi4suRoeaI iANiF1mi1uUQNdqxV9I87GsHe+hrFWulQJRojX9VKKelq6xi/y18oMNLJcb6A2mvp+pa MMDJujjX78681kooUtVBIWyrf7YA5lorbla9ddQT7sPzCTbhMy8jO1OiiSbFgzR54sW7 E75Fye6GEvR+BT9taSp5sSBM7IaSMEBQ8/MPHVnIZqdquzEhrVYlVXOHD2qvN3AD2d07 365A== 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 z1si2496800pge.647.2017.11.17.02.38.55; Fri, 17 Nov 2017 02:39:07 -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 S1753221AbdKQAAC (ORCPT + 92 others); Thu, 16 Nov 2017 19:00:02 -0500 Received: from bmailout1.hostsharing.net ([83.223.95.100]:51291 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbdKPX75 (ORCPT ); Thu, 16 Nov 2017 18:59:57 -0500 X-Greylist: delayed 302 seconds by postgrey-1.27 at vger.kernel.org; Thu, 16 Nov 2017 18:59:56 EST Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id BA263300002DE; Fri, 17 Nov 2017 00:59:55 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 874FC32F6E; Fri, 17 Nov 2017 00:59:55 +0100 (CET) Date: Fri, 17 Nov 2017 00:59:55 +0100 From: Lukas Wunner To: Marcel Holtmann , Gustavo Padovan , Johan Hedberg , Rob Herring , Johan Hovold Cc: Ronald Tschalaer , Sumit Semwal , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, John Stultz Subject: Re: [PATCH] Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops Message-ID: <20171116235955.GA27601@wunner.de> References: <20171116213045.GA17506@wunner.de> <20171116214504.GB17506@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 17, 2017 at 12:54:53AM +0100, Lukas Wunner wrote: > John Stultz reports a boot time crash with the HiKey board (which uses > hci_serdev) occurring in hci_uart_tx_wakeup(). That function is > contained in hci_ldisc.c, but also called from the newer hci_serdev.c. > It acquires the proto_lock in struct hci_uart and it turns out that we > forgot to init the lock in the serdev code path, thus causing the crash. > > John bisected the crash to commit 67d2f8781b9f ("Bluetooth: hci_ldisc: > Allow sleeping while proto locks are held"), but the issue was present > before and the commit merely exposed it. (Perhaps by luck, the crash > did not occur with rwlocks.) > > Init the proto_lock in the serdev code path to avoid the oops. Apologies, I botched Gustavo Padovan's and Johan Hedberg's e-mail address in the To: header, please fix up when replying. Lukas From 1584305219134778896@xxx Fri Nov 17 09:33:16 +0000 2017 X-GM-THRID: 1584305219134778896 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread