From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:34316 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932220AbbJUIsk (ORCPT ); Wed, 21 Oct 2015 04:48:40 -0400 Date: Wed, 21 Oct 2015 10:48:44 +0200 From: Darren Hart To: Ben Hutchings Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Azael Avalos , Darren Hart Subject: Re: [PATCH 4.2 022/258] toshiba_acpi: Fix hotkeys registration on some toshiba models Message-ID: <20151021084844.GA42240@vmdeb7> References: <20151018014729.976101177@linuxfoundation.org> <20151018014731.316677835@linuxfoundation.org> <1445297565.2561.8.camel@decadent.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1445297565.2561.8.camel@decadent.org.uk> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Oct 20, 2015 at 12:32:45AM +0100, Ben Hutchings wrote: > On Sat, 2015-10-17 at 18:55 -0700, Greg Kroah-Hartman wrote: > > 4.2-stable review patch.��If anyone has any objections, please let me know. > > > > ------------------ > > > > From: Azael Avalos > > > > commit 53147b6cabee5e8d1997b5682fcc0c3b72ddf9c2 upstream. > > > > Commit a2b3471b5b13 ("toshiba_acpi: Use the Hotkey Event Type function > > for keymap choosing") changed the *setup_keyboard function to query for > > the Hotkey Event Type to help choose the correct keymap, but turns out > > that here are certain Toshiba models out there not implementing this > > feature, and thus, failing to continue the input device registration and > > leaving such laptops without hotkey support. > > > > This patch changes such check, and instead of returning an error if > > the Hotkey Event Type is not present, we simply inform userspace about it, > > changing the message printed from err to notice, making the function > > responsible for registering the input device to continue. > [...] > > But then this function proceeds without events_type being initialised > at all, with unpredictable results. �This doesn't look like a proper > fix. Azael, Ben has a point. Even after later patches, dev->hotkey_event_type doesn't have a default value, so the later check for HCI_SYSTEM_TYPE1 or HCI_SYSTEM_TYPE2 or failure is unpredictable. -- Darren Hart Intel Open Source Technology Center