Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp861673yba; Wed, 24 Apr 2019 10:47:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzadPhuEq9Ne3uN91fx1es22rwAPX9enHsw6t9N4H92y3MhLwwozycJqziKcCJeZcGt1/h/ X-Received: by 2002:a62:aa01:: with SMTP id e1mr35016206pff.43.1556128071980; Wed, 24 Apr 2019 10:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556128071; cv=none; d=google.com; s=arc-20160816; b=C+eVt5bOvNQr/N8SdUwKrMLYZ4y0BD3fb+dByRcusIO5CKKsTKCYRRyXWXcsYTIVKT tYqxswe6IvWERnMzYQwMrNftbfeS6fnmHEi/t/UyzaHuyVogHVQXqscvDgBmZBi4uDKj F+7/ucg62RKrA3/wOxHaL7xz0JInuhKDBnNoWNbMnz7ajWBld7GwgVCDHog3PNT9sVlZ 4DSItWZh1YseO3xUrHz5JwZcMEstrdeY+Bth/WzuzyLrtiqyh0slMFSEny2kxZc+rZkZ jD4lkWXAMPZ0TklUy0nrOsWG35HYhhVCQcNbV/6bYTdILQHNza7dDWpwn39sEOiO6QVi oGdA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=T99FEQaXkkTZIaOusDqqo6AxUifB+ZoggrhGXeIA0Jw=; b=STudS0YRNASpnn2QxJ7DK+H3fDSOkTpm6md5NueT8HJ/tzHlmB/GiNoE22CUxx/mWv FycRmTOGwWssckjNxqRfY0eEA1jUi51ODuevm/Pu/9t5altF8ooskYhUmivQJPhb5sTL OZ031UabTh3D62p+QHb3/RVIEmAj2CCZTKRgm79JOHYh93iu8zhqUnDR5iNkzxFb+L0c xl/Ti+iEgK9usJqrAZdFj60AxetTG7Fr6TEVWfckn6xiDul6C5OgxzrrfetpCtx4aGrF 9QaKmvPkxPnq9tIif8YHuErXkLHYQ7EHdf4PNCwf+8vl8NnzP1blEdTsD02CKZ6Uuo19 izQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VKIYs26f; 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 33si19810482plk.421.2019.04.24.10.47.36; Wed, 24 Apr 2019 10:47:51 -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=@kernel.org header.s=default header.b=VKIYs26f; 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 S2391520AbfDXRde (ORCPT + 99 others); Wed, 24 Apr 2019 13:33:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:60490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391500AbfDXRd3 (ORCPT ); Wed, 24 Apr 2019 13:33:29 -0400 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 659682054F; Wed, 24 Apr 2019 17:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556127208; bh=rFU2YsDTCR+g4ae+SbfDAKzw8zKAomNbMWmv4WKsv5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VKIYs26fiA2iiWU9nVMYfs81fH9dcBYU0sHzH1vLC5r3MxpRrzGlrKL5HHNeo3rJn OUtfboOkuvGMi8VIB3SbK+SLp9v6QDnTuFFJ2YR3KuZ73tNNfg66J6sP7snZwewDOM J5u9uviYsLhSanuHa29jGueXR3YrPz8hHaHbe7ZM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Sax , Benjamin Tissoires , Jiri Kosina , Linus Torvalds , =?UTF-8?q?Ambro=C5=BE=20Bizjak?= Subject: [PATCH 4.19 96/96] i2c-hid: properly terminate i2c_hid_dmi_desc_override_table[] array Date: Wed, 24 Apr 2019 19:10:41 +0200 Message-Id: <20190424170926.294205271@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190424170919.829037226@linuxfoundation.org> References: <20190424170919.829037226@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Torvalds commit b59dfdaef173677b0b7e10f375226c0a1114fd20 upstream. Commit 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain devices") added a new dmi_system_id quirk table to override certain HID report descriptors for some systems that lack them. But the table wasn't properly terminated, causing the dmi matching to walk off into la-la-land, and starting to treat random data as dmi descriptor pointers, causing boot-time oopses if you were at all unlucky. Terminate the array. We really should have some way to just statically check that arrays that should be terminated by an empty entry actually are so. But the HID people really should have caught this themselves, rather than have me deal with an oops during the merge window. Tssk, tssk. Cc: Julian Sax Cc: Benjamin Tissoires Cc: Jiri Kosina Signed-off-by: Linus Torvalds Cc: Ambrož Bizjak Signed-off-by: Greg Kroah-Hartman --- drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c +++ b/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c @@ -337,7 +337,8 @@ static const struct dmi_system_id i2c_hi DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"), }, .driver_data = (void *)&sipodev_desc - } + }, + { } /* Terminate list */ };