From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753227AbdKQAAD (ORCPT ); Thu, 16 Nov 2017 19:00:03 -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 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 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