Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3067625imm; Sun, 1 Jul 2018 11:29:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpebSAF+t1LY0XRc8aP/HYMf8UdARWjqcGfAJQBbvFUVJbrP9bizgQ9uCgdAqOEm5FsSdzYb X-Received: by 2002:a62:9c9c:: with SMTP id u28-v6mr22639464pfk.90.1530469769540; Sun, 01 Jul 2018 11:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530469769; cv=none; d=google.com; s=arc-20160816; b=XqPK2TeVHiwQ0kTWnnF+mijy1FoJcjOdcQkOFpPLnBQQyMCi3cRN//ouFXocZg80Gt s9LvwL4o3ZHk27dY3FLx8YiF1fYdFmMtd5gWoDKIpuTf7knCaJ6coIhBEwKBsk3uDGJp Ly9w+UCeNRr4U7rdqAbmgWsIQwxlT1B4rNAbkFsPUklRHuK1mQl1R33ucm3JjRhAcYBD qUtowqY0Lz1avnhwW1X50RZxbAvsg7LNErd6k1fYDi3m3F6mVRSEHhubSyZ1mbE7s+y9 2pQK+wT0iJN8ec0W+Nm6TCz9PocJ4jV4f3/Ce5WjRg/0X492hRxBSqBK9ZjmR+7I0dUK pXfg== 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=HviqkeCZLlN3B3Vopkmcw95w9uAoQjXEAaHG17TP6pA=; b=qXIa/xwhcbdz1MD+Ix0fkKJUrS/rsa+8RV0ojQpxEp3JxcFEL8ujMYKgy3p/ZnjzHS tlCozSknWpifnOl5okrp6RMYzjNLGc+QiUpNm7IDtU47zWtu/GMJYBHrt/FNlFi5zrpV DQmW3laE2vGEhBANKCSUCNL3vxi+bYqReO5FpFr2K+O4aYa0En0OwIgAHqvpeWD0NURl AA6IS09GLu3qY71pXxckxBtOeVfTfwuz6UsqQEnlXS8k2wM6u/mT0OkAzhzuBB/TA1aT 802DETTo+ZJtkZJlwWOxwNuxpIHUldQ/DKFA5euaJfhGY2jUVA9mj3Lu/v2bbm9E6k28 8pUw== 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 v38-v6si14603951plg.283.2018.07.01.11.29.14; Sun, 01 Jul 2018 11:29:29 -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 S964885AbeGAQRz (ORCPT + 99 others); Sun, 1 Jul 2018 12:17:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:32906 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933105AbeGAQRu (ORCPT ); Sun, 1 Jul 2018 12:17:50 -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 D26E486A; Sun, 1 Jul 2018 16:17:49 +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 4.4 038/105] ipmi:bt: Set the timeout before doing a capabilities check Date: Sun, 1 Jul 2018 18:01:48 +0200 Message-Id: <20180701153151.972694922@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701153149.382300170@linuxfoundation.org> References: <20180701153149.382300170@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 4.4-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: