Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3063865imm; Sun, 1 Jul 2018 11:23:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpffI60Hcq04ujOni+WsJJ6mWLOt2Zl26XfuF+9BaCYwuNoLRQnKOjNtf+fgdINFW8sQ/kIv X-Received: by 2002:a62:9dcc:: with SMTP id a73-v6mr11617796pfk.249.1530469423377; Sun, 01 Jul 2018 11:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530469423; cv=none; d=google.com; s=arc-20160816; b=bvfcs/4rQCtbrQQmKSaOfe4InBer+gqtO3/kcLYGAlQHxDuC9g5dIPBmOo4ikdLBON bSVw2Rs71QJnALHWSnWq4c3vuYHNf32aFzSIC3XLu+m1JOfs24MgMKn/ziJcS3A2QM82 b2xPm7L+r6tnGsyph/otwMcgG0hkWHDUPwUr/EyxJv/ryzkQj6kQNnSGAjJEZYHbrisM nAV/vmuAAUmwQhmEJ6lPb1pGLgcRis8W8wVeyYoXQl7SMoZ8z5R1fWkn4d13mClt5L35 rHX2btiy4VJcYlOha8dMpHBOx1UljvrFAS40Ic3fcxHFcXLqx3dkFNJI8iXJm138KT8r O6Dg== 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=QRvUOPa00Pd20vw501bkkeQR9dUBAlA1A6iFCgd4RRU=; b=yBvBwB1saQFt8Uio8pE6dKXkwYJqqxBSyuOM4SqW+4mWtKWFfvi7D6rgk6t/6lhCgf 1jzXf/sKgXsOe9HQb8SViCWP16+KPC6LnoBbgGFqa6Jtf068/0dugElVcyMitXppKTpp laSAf28Mr6EbX3M+1el3QNTaZy4Jw9ynxn+csmjTrI5ldhBcMOQ10+lH1wp5yFGE6kYt egYW5FRYdyTX6N8+u+INRri0P9ogjGYuqclA+7P29+MAYXHkE4ijLifUIVXcZT3qfGjc DKftR6+jCA588EBLV+H6wE6eb3CGiCX80ff+88o+w9pHtbhYVcAmFvCX9/CAPat6Oegb CAMQ== 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 o6-v6si6282714pgp.631.2018.07.01.11.23.29; Sun, 01 Jul 2018 11:23:43 -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 S934110AbeGASVd (ORCPT + 99 others); Sun, 1 Jul 2018 14:21:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33556 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965205AbeGAQYq (ORCPT ); Sun, 1 Jul 2018 12:24:46 -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 998D1AF3; Sun, 1 Jul 2018 16:24:45 +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.9 019/101] ipmi:bt: Set the timeout before doing a capabilities check Date: Sun, 1 Jul 2018 18:21:05 +0200 Message-Id: <20180701160757.909465632@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160757.138608453@linuxfoundation.org> References: <20180701160757.138608453@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.9-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: