Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3076674imm; Sun, 1 Jul 2018 11:43:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIQ04xS5fACorOCZ1hNUTALb38ej7cfnlINRsqzoT6Kn3Ut6nbZ+0ay4YMQpg4BGod3FYbW X-Received: by 2002:a17:902:b494:: with SMTP id y20-v6mr22594904plr.136.1530470583133; Sun, 01 Jul 2018 11:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530470583; cv=none; d=google.com; s=arc-20160816; b=sys77EULIAo2/ghqrZ/Lb2O6DqkLmSayBpn+y1QKqF7hlMmpZHDdbfqaiwYpUgV0QZ AZY0iM4QfasH5+EVo0Jd4nWvlBPQwswE27FkKuDW/CHycSLSCm59cSnyN/Mnt2RbzB4P v4l5oE+Yw3xNT04L7r4VAJuOfsPp1clvJc4Epx88sWaw00Iv+0/a4vjBEeV8xiqhhf7C GlFDpRMSs4iDjyIk35/hauHyh3qoaIxi20ib6SwJEWFeTk8j428/doqrUD9I7uSLBam5 wojU4ubCiYjGEt4MYCGG/eILdFFN4WTLsRKPEMGNZjEKDtTf3LyvVkENfh5vZ4pEw1N4 6OEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UFlGtiMIo2ZT1C5eVjglgD5Uinv0ItUajKBFs/QYVNQ=; b=Pi7cMQHQjdGoLje2kiL5mFadi9gWlaUv6kpGThdXjdhMldkT20DvLJLWgdikhS7tnv +lQ3gh2IjmTdteqIpCtzBzrWlBekRIzcon5k8VRJmVrT4xug2DevW2BtAOZuXUsgxHL2 WbSyDJqSINNznbie+bTvAPcolc8zdR8DJFFKc5LADTTUA80Q/BfRYeu5h23UeWrW+bHx xEUD24JhMrB4GyV2H/tc0U4UBdxdOUnEW2YtAq5fzvprvgMUlkRWZY8Dnks85d4XXxiU dLj12OHieMpXjoUi16WC8cF3IYvZs1F3sM7UriCPoT2jYyTDDnfI1llOWFpM8aNZKuif EQ/Q== 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 z2-v6si14291453pln.395.2018.07.01.11.42.48; Sun, 01 Jul 2018 11:43:03 -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; 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 S932615AbeGAQNn (ORCPT + 99 others); Sun, 1 Jul 2018 12:13:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60180 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932421AbeGAQNi (ORCPT ); Sun, 1 Jul 2018 12:13:38 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 99B564A3; Sun, 1 Jul 2018 16:13:37 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nordmark Claes , Corey Minyard Subject: [PATCH 3.18 55/85] ipmi:bt: Set the timeout before doing a capabilities check Date: Sun, 1 Jul 2018 18:02:13 +0200 Message-Id: <20180701153124.552928157@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701153122.365061142@linuxfoundation.org> References: <20180701153122.365061142@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Corey Minyard commit fe50a7d0393a552e4539da2d31261a59d6415950 upstream. There was one place where the timeout value for an operation was not being set, if a capabilities request was done from idle. Move the timeout value setting to before where that change might be requested. IMHO the cause here is the invisible returns in the macros. Maybe that's a job for later, though. Reported-by: Nordmark Claes Signed-off-by: Corey Minyard Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/char/ipmi/ipmi_bt_sm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/char/ipmi/ipmi_bt_sm.c +++ b/drivers/char/ipmi/ipmi_bt_sm.c @@ -522,11 +522,12 @@ static enum si_sm_result bt_event(struct if (status & BT_H_BUSY) /* clear a leftover H_BUSY */ BT_CONTROL(BT_H_BUSY); + bt->timeout = bt->BT_CAP_req2rsp; + /* Read BT capabilities if it hasn't been done yet */ if (!bt->BT_CAP_outreqs) BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN, SI_SM_CALL_WITHOUT_DELAY); - bt->timeout = bt->BT_CAP_req2rsp; BT_SI_SM_RETURN(SI_SM_IDLE); case BT_STATE_XACTION_START: