Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13476286ybl; Sun, 29 Dec 2019 12:49:49 -0800 (PST) X-Google-Smtp-Source: APXvYqza2quTXCn0z/Ed0QW2bal/1+hQD5wo59b8nAWMTew93uYsY1RB4KFnoxuOr0xM/3suh292 X-Received: by 2002:a9d:51c1:: with SMTP id d1mr66710509oth.136.1577652588864; Sun, 29 Dec 2019 12:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652588; cv=none; d=google.com; s=arc-20160816; b=Ky2wDg8y3KmokOEnsvgJpNhSbqJcshiVioX6yqR3F5ZxSlNF/E2sOijuw+pY0i97+r IC+58/2N1VE0WDZwsF8iFagWcaxDugigNbz8n18z2ibsLwaN95N7SACQ8h4xHIvC48vd MAH1FXDx8z3ow0/eA/jtqJ9Lvy5Iw/3KZluzeW2cCBDWP9i/sMvd/cbGfs7nFdrhrJe9 DlwC2v6O8OQsm9P3wLIYB2DMZtsz64VBMJIdx5McbQo39/lx4C5CUWsJZNDkELa7iPlm z5DcpuRneIVElDWYTH+PwOIvPWScGl+ffsudiSA4TYlScUKCAgY9K1Mx9R8LZpesVL1l bIQA== 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=iXqtlfXZhSqaau/nb+RtmSEdmkx0oTaHWeO1Pe/Cslo=; b=fZdi9vwnO5sooY8nLR7mwaSFuVeJuKSZiq0DVJQsktq9FTqq/dhZGknRjS2p26HgV+ kvVq0J0iv3IdrhnUr5ouPSt6ZVtZ5NKnpMc7UUQDTiBcpfCAhY0ccfpk/JLmpAJGygVI bP7WMHd5EAqmhY2bqNdCm4WxSvW7WQrfqBID9kMzMiAjP4bgfE9+BsQ5p9cxX6WKdKyU 6siAg9GZI3x4mfo7E96oQgpAjPh4bjlcq5eXi78OkDvfWn42iIQmNxIuOEy7Vn8EydDI NoPjjNZx6U/twccaJt7fInVEZqafAuhIrMwYKZvhUi+82PLWpjaN3570IQTgX343eI/B YPvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QCqz05zx; 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 z22si14311892otq.94.2019.12.29.12.49.38; Sun, 29 Dec 2019 12:49:48 -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; dkim=pass header.i=@kernel.org header.s=default header.b=QCqz05zx; 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 S1733269AbfL2R5b (ORCPT + 99 others); Sun, 29 Dec 2019 12:57:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:48022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729147AbfL2R51 (ORCPT ); Sun, 29 Dec 2019 12:57:27 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 788E421744; Sun, 29 Dec 2019 17:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642246; bh=XNLQu7vo4RgxkpiuWIgGSBjkOVGIbTAzo/wWbmIZQO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QCqz05zxw0nBmOcWk7d9XtigukFU3ASQoCzp1Oe9hjOUi7XOdPSlZE1yWf+9P7eCg +7JxFurFZH57UuHJjpmApDuLs0F6dgDO5sebu3Z8pK3cX38feL7OEeRr7H9DXul5HA 87T0TLd3E0LBUsvH0oWQFyG8BdapGXSUhtGlDla4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Andy Shevchenko Subject: [PATCH 5.4 402/434] platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes Date: Sun, 29 Dec 2019 18:27:35 +0100 Message-Id: <20191229172729.247440628@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@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: Hans de Goede commit 133b2acee3871ae6bf123b8fe34be14464aa3d2c upstream. At least on the HP Envy x360 15-cp0xxx model the WMI interface for HPWMI_FEATURE2_QUERY requires an outsize of at least 128 bytes, otherwise it fails with an error code 5 (HPWMI_RET_INVALID_PARAMETERS): Dec 06 00:59:38 kernel: hp_wmi: query 0xd returned error 0x5 We do not care about the contents of the buffer, we just want to know if the HPWMI_FEATURE2_QUERY command is supported. This commits bumps the buffer size, fixing the error. Fixes: 8a1513b4932 ("hp-wmi: limit hotkey enable") Cc: stable@vger.kernel.org BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703 Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -300,7 +300,7 @@ static int __init hp_wmi_bios_2008_later static int __init hp_wmi_bios_2009_later(void) { - int state = 0; + u8 state[128]; int ret = hp_wmi_perform_query(HPWMI_FEATURE2_QUERY, HPWMI_READ, &state, sizeof(state), sizeof(state)); if (!ret)