Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2983715imm; Sun, 1 Jul 2018 09:41:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJNKoUVQDekr1tWqPEtVOL6rKeQoiN8Wfx8GlAF315EmylVPeqFKsHQU8LnYbCXgFO/8ns1 X-Received: by 2002:a65:660a:: with SMTP id w10-v6mr18588155pgv.366.1530463269890; Sun, 01 Jul 2018 09:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530463269; cv=none; d=google.com; s=arc-20160816; b=I7sgFy4KLdkqFNRhy489bmJgJPTfIsWWAhq//TzWyhUYXY8oG3LMGkiHIeixcNj82i 0w5l4Sw/99W8RJ0/0IQXD1VvoWo9k9/etxVUZQHmXhu7ZWxDtlyhik0bk4f3WRFdccU6 MwY++MZUfxBy5WHENq6E0p4i6CXrNKlkk7rtrDsfSUI1MIgtjXLOrpzuUE4kTwDfx8bC spZWao7Kb8uJ3sUno4QkCgPHK9L3M2frhDO8CRWAeaM/CVCkbtH2/XSBiN5W7sl7TQWG VtYcDsZQ4EIkSFU9wdzOWJzn9UUXOYo+QYgb2wNZjJgeMWwttBkKaJza+gi870WZt/Rq q0VA== 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=Vc/K5KkHhvo0m3gCZgAOhNrUS+0g7clFcVR2FaKOPi0=; b=Hm7ikj1cdyUDvXwDAc0DVDoZpK6ZyZiG2OzfQ3O2V62LkIAsUKsgUPaGjzXk5Iudgu K1rlED3g2en3nxUCWIoPbFNPulIhXvej0mcVWDM3fu0f8VmXKz90F5FF6klSliTo4raW GOWpDGE32V8UIWyoSmdBYUdwWPSg33dHhGZCx1bkVsBrFpAE3o6jJCqzE0/2l8K24jeS kI6If0VuSFYie3DL1NKN70gvOk7B3YHp6tj1oRwaVArvABSdWdD3hCFomCLdDPVe09zR ZicuWl8ax9Fk3no2P+x5Y/FwGojnhfqEQMGm+qlOqvDCyplEI0kOO8KXvRKoHA9ck1GE NiAA== 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 z23-v6si13671099pfh.266.2018.07.01.09.40.55; Sun, 01 Jul 2018 09:41:09 -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 S1031815AbeGAQjz (ORCPT + 99 others); Sun, 1 Jul 2018 12:39:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37020 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031787AbeGAQjv (ORCPT ); Sun, 1 Jul 2018 12:39:51 -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 56548ACC; Sun, 1 Jul 2018 16:39:50 +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.17 037/220] ipmi:bt: Set the timeout before doing a capabilities check Date: Sun, 1 Jul 2018 18:21:01 +0200 Message-Id: <20180701160909.880249601@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@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.17-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 @@ -504,11 +504,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: