From patchwork Wed Jun 20 12:26:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 139322 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp726947lji; Wed, 20 Jun 2018 05:26:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ68xfwqMDwHySvEORnfLNJFxUWeezZCQ33jGr9UOr+XUgu4LG550BoY80fLY39BtUwcdQd X-Received: by 2002:a62:ea14:: with SMTP id t20-v6mr22788199pfh.117.1529497616178; Wed, 20 Jun 2018 05:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529497616; cv=none; d=google.com; s=arc-20160816; b=jnNF7ylopj7uBzF7E4C1edt3mFpn4occRbLkR0lYoo6TmN4iVbGyM0dkSWx5jo/ZkF F5xFkaF8FKlwFjbmYOd8luOgcx0rW9XwqoXlJOGV1NGRdfX/HHcgxeyVIwqserO5nIDL BB0jyIwvqucwqtgfTboawVam6z/Ov5of4ZHhdKYsb7XOHFRsXjUt2NcJ9cUgAJAxDG06 3p7Iu1wT5B/hNQaGUHbc/dUFnLAi4TTCet61vFNAqJKetIepYBMyWqkS5+20o7vltSbe HG+q7mJ85tAngv1bbUU3ZFBCJXW9dn6yj+kdxdD4siFhFyv0S2YWPcmDrQBj6Yf9356F AYxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=jBC8owuoYNqjks91SC3dvZYyOm+rvpxctJjJr9LauWY=; b=TiLjlLgQlX+IPznnbgDKSeROoibZs5I56f2cZPHOYvCWZ+1IMZ6OoSEujFKzquyDT6 H4YidhrTdz9UdrrF99yyJg/LF6+7NcDY2F4u2k9lwkPF3/daCwX6uDhdlxxdOE2kHFpa l73kq+P8123DJKwOFHczqHl9dgA2VjavSzk48o+wupB4DyFnt16xGsB7pXfIq+827Omx Vcn5IOydUBYJ6sM9sLeKnKOQ3a6NqjrhZmkEx34hSX4yoOQeZc7ZjDeHhBegbCFjdNjH djmydzcZjocY515u7Da6JiOO2/C4u3f4rxJpIcjoHti7QmY92y+ozp9IZp2gLyrKHyr2 28Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oQQuGE2t; 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 u3-v6si2346996plb.2.2018.06.20.05.26.55; Wed, 20 Jun 2018 05:26:56 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oQQuGE2t; 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 S1753202AbeFTM0y (ORCPT + 30 others); Wed, 20 Jun 2018 08:26:54 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:42424 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbeFTM0w (ORCPT ); Wed, 20 Jun 2018 08:26:52 -0400 Received: by mail-pg0-f65.google.com with SMTP id c10-v6so1419204pgu.9 for ; Wed, 20 Jun 2018 05:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=jBC8owuoYNqjks91SC3dvZYyOm+rvpxctJjJr9LauWY=; b=oQQuGE2tWmmwOOIRj4jNkwHfThQscgwu8LDL2FecFy8GvX1LWW6ebuYkYz+NQde4Zs 4vSwcicEXRJUxzqfF7XxV5I2aDl6HAUj/lIlYm2OQthLsECdcj7DbAPVXA4hsSG+TI1W tgWnPkeiSYkiItNtdZAL7DCGHA97IYn83KtaOmtSuH9hnMN7SB6VRXy8NN+EQ+PPQpXG HnfxdK92zvbJPqUj0pUVFxEZxh7IIdF2sRsxE6H8NghPzYxzOsk5VNXB+drdPrqyFrCL 9IpZXUAxu8x2ANIssioLRnLUDeqnR3UiNc+S60FU84AAfxkykljWPFLGaovxyBWwM+mF XhNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=jBC8owuoYNqjks91SC3dvZYyOm+rvpxctJjJr9LauWY=; b=rp3EFfM6fdOHptx5AzSkLcLUAUl2ELYqtIE3o3A0nS8qtfK1IcMx6sWC2407odR/Sd pHaD1uJkkx/eWKypZP0nEM3NA1jrFGmwMAuFPmY8JA/P2K2RSaHGds9jD+9AoShKhXaU dg+PCwAYuK60kJ3zS7kmkHNWlDYUUGwAm9NCxCdIEPQO69DY+QYyivkcM0Wbufma/B03 i+59ZF/E8xdsAap2mT+LYj7dVX1e2P3byUwREnkeNfbr+WiKsMAveJYoPXVg31FuYgT9 4vXSSgnujdNvYphsb6inYTvMSpmQkBj1FgaGgX+0+BLqrxun/NpirA/ZenuBrZcrRlq8 BBHw== X-Gm-Message-State: APt69E32tiyOptuMXtNty+QQU/hlmV0Fv7VQb8GyslKG0nvo+5MdUHnn aoejyvY7bsLlrL/IQBu8qw== X-Received: by 2002:a62:6141:: with SMTP id v62-v6mr22541579pfb.197.1529497612031; Wed, 20 Jun 2018 05:26:52 -0700 (PDT) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id u13-v6sm2451919pgr.36.2018.06.20.05.26.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 05:26:50 -0700 (PDT) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 2487B66B; Wed, 20 Jun 2018 07:26:49 -0500 (CDT) Received: by t430.minyard.net (Postfix, from userid 1000) id 9682A3000DD; Wed, 20 Jun 2018 07:26:48 -0500 (CDT) From: minyard@acm.org To: Meelis Roos Cc: Linux Kernel list , openipmi-developer@lists.sourceforge.net, Corey Minyard Subject: [PATCH] ipmi: Cleanup oops on initialization failure Date: Wed, 20 Jun 2018 07:26:46 -0500 Message-Id: <1529497606-3857-1-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Corey Minyard Commit 93c303d2045b3 "ipmi_si: Clean up shutdown a bit" didn't copy the behavior of the cleanup in one spot, it needed to check for a non-NULL interface before cleaning it up. Signed-off-by: Corey Minyard --- This patch should fix the issue. BTW, can you send me at least the IPMI portion of the output of dmidecode for your machine? I have seen a lot of these where the address in the SMBIOS tables is incorrect, and I'm wondering if it's something in the driver, or if it's really the tables that are bad. Thanks for reporting this. On your tested-by I'll send this up to Linus. -corey drivers/char/ipmi/ipmi_si_intf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.7.4 Tested-by: Meelis Roos diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 3d0add6..a5987f8 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2088,8 +2088,10 @@ static int try_smi_init(struct smi_info *new_smi) return 0; out_err: - ipmi_unregister_smi(new_smi->intf); - new_smi->intf = NULL; + if (new_smi->intf) { + ipmi_unregister_smi(new_smi->intf); + new_smi->intf = NULL; + } kfree(init_name);