Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3322039pxk; Mon, 7 Sep 2020 09:29:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiXKzX+rmw5Zr0on0KFyBf5FndYsY73oC8ItkyeA3eSv96Kc4XiJPhMxbLla/v8E9s1ghG X-Received: by 2002:a17:906:9718:: with SMTP id k24mr20395560ejx.365.1599496173172; Mon, 07 Sep 2020 09:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599496173; cv=none; d=google.com; s=arc-20160816; b=fbriQKLQzMHBfFUmWBUI4mfvE85sqGBTkNJYeuZ/hN1fzvQj7sFO5sIJ2ulsahptGY mCNu3b7D712W5upBOpNWK8VXp3GZHqpEKUn58Ag08LHLEY9lj6AWQHI7GJZf4UdTuMUy 79HuoEsFATCGw34LKtmvRaGnwHuYzlbFwPYr8fqhUDDTLyKf52TZ1qNzsjydZNL4VG+w Y/81U1JqiwpCt521izpB7fHzabhJkj7HBJy5eRd6fa3k3MCNXm32wy+upckoplcjH7NG NZWXLPfeNKwq8E7FjduZXDrZS0tewAwrQrDYw2gYYAEmBXtSnuOvy8zsJL252MaEY/v5 e2kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=VnpGX/rq2G60jYuw3svogFQniQh9VvXUtLdT7zfMxQA=; b=bREmBH7Z4K9NDXSP0CI6pXyAOQEysioqVRAot++Bfn1C6EVcgAw7LHcCnIq7SANPF5 Qld1qX7+Pfr3YKqVb9XF+L5Y6ohcEdQi8CWhvPOYUVrrYQJ/Y7m/EKUdYNX7R+hySXep 8Y0QauHhVNp1hQ9DRwUsCxJc1XFK2eViT/e8tEQrXedCR0N+pN8V18z66ELEPi1CcqPL GszZEJpgK/4ca+YnieQXNJXvvlQvx2Sky0D9oGnpKqI2Zzzd956kBskTVFwMrpaGHBMe UDFU8AsfkqyhPcmntcWuQOYx2vyc6TxPx3tskx96jdiEOdkh7Jp7nkCGhSUiW0+c7uEN 16iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=iq7W+AY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si9788995edo.147.2020.09.07.09.29.10; Mon, 07 Sep 2020 09:29:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=iq7W+AY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730511AbgIGQ0a (ORCPT + 99 others); Mon, 7 Sep 2020 12:26:30 -0400 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:13398 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729946AbgIGQ01 (ORCPT ); Mon, 7 Sep 2020 12:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1599495986; x=1631031986; h=from:to:cc:subject:date:message-id; bh=VnpGX/rq2G60jYuw3svogFQniQh9VvXUtLdT7zfMxQA=; b=iq7W+AY3BPXmL7CprOnyVEJY2YBektUVHQuZV4KtoUds56RGblhkjQcO y/vOnavYBrOsA2ny3kokR9XDojIHK5UNc2cCYw5+aEz2+t56zF0Xe3Qcw yROPydvd4xSZtdnLByk4n0CHHMVTfE65NmBlzLyNIDlzKHQYnb5C+Y4Mk s=; X-IronPort-AV: E=Sophos;i="5.76,402,1592870400"; d="scan'208";a="52586337" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP; 07 Sep 2020 16:26:24 +0000 Received: from uc85b769cb7f9591afac0.ant.amazon.com (iad7-ws-svc-lb50-vlan2.amazon.com [10.0.93.210]) by email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com (Postfix) with ESMTPS id 06CFDA252B; Mon, 7 Sep 2020 16:26:22 +0000 (UTC) Received: from uc85b769cb7f9591afac0.ant.amazon.com (uc85b769cb7f9591afac0 [127.0.0.1]) by uc85b769cb7f9591afac0.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id 087GQIbD010913; Mon, 7 Sep 2020 18:26:18 +0200 Received: (from markubo@localhost) by uc85b769cb7f9591afac0.ant.amazon.com (8.15.2/8.15.2/Submit) id 087GQHcc010906; Mon, 7 Sep 2020 18:26:17 +0200 From: Markus Boehme To: Corey Minyard , openipmi-developer@lists.sourceforge.net Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Stefan Nuernberger , SeongJae Park , Amit Shah , Markus Boehme Subject: [PATCH 1/3] ipmi: Reset response handler when failing to send the command Date: Mon, 7 Sep 2020 18:25:35 +0200 Message-Id: <1599495937-10654-1-git-send-email-markubo@amazon.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When failing to send a command we don't expect a response. Clear the `null_user_handler` like is done in the success path. Signed-off-by: Markus Boehme --- drivers/char/ipmi/ipmi_msghandler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 737c0b6..2b213c9 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -2433,7 +2433,7 @@ static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc) rv = send_get_device_id_cmd(intf); if (rv) - return rv; + goto out_reset_handler; wait_event(intf->waitq, bmc->dyn_id_set != 2); @@ -2443,6 +2443,7 @@ static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc) /* dyn_id_set makes the id data available. */ smp_rmb(); +out_reset_handler: intf->null_user_handler = NULL; return rv; @@ -3329,6 +3330,7 @@ static int __scan_channels(struct ipmi_smi *intf, struct ipmi_device_id *id) dev_warn(intf->si_dev, "Error sending channel information for channel 0, %d\n", rv); + intf->null_user_handler = NULL; return -EIO; } -- 2.7.4