Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1323634imm; Wed, 20 Jun 2018 16:01:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJoz2lc4k1M8xG7MjiF1+ZomronCVdb6eiXM6Rfnw0t6Mo0xmcUaIwfm7quXpuuSwtvIRO/ X-Received: by 2002:a17:902:6007:: with SMTP id r7-v6mr1416190plj.70.1529535679882; Wed, 20 Jun 2018 16:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529535679; cv=none; d=google.com; s=arc-20160816; b=t5VtsteTebbFUVTcyeaQnoz45Wd85I9yHtzjJSMWLBhwF5Odn+p5jJZh1NOQ0kZhFn cI3L/kA5uYjrLxvc7DGKnntNTIBqTJDt35abfbgPH6dQE21fP5QIVyU4sXJ30xquYPCL tyVWBnBK1TRU1KZCm/OYSBzfp18kwSEXTK9LmY3C6wCXW/fFl7pqkHZ+7d3McPJcniH+ EARcIGzY6YGy8Mif6zyEkX9Xt8fId/uI3Vz5Z7YznJ8udZ+3OJzW0ZmZObFy7dkiBFdD 6ARN21997oYy444zSCl19vi5komimN7Y18LlmzgI7gO+Un8cq4Gt9O6stOpHyLYg2CRN I99w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to:dkim-signature :arc-authentication-results; bh=Q8eXOyPHbhOLHzsmOX7c8FnyLOpbmkOA6pumQpgXxWM=; b=H8F5kTrJwuy/SWPmL6IewqO7xirBE4anShJa+K+eNPq546zqliv4IY2wKmceQgJOVW xpZgciS7DopNrKxdL5pdKPIo28rd9qAMt2OQQjvvTD3XFvNM/3Q1voZCaCSj5sL3quD+ dEHyuyypInxSPqvvmz3FEGpyMGMLVgpVJO9jQW07jo4UweiaW3uUSQkCX1frlee5GALr ZApsNfvrxP/IOIjhvVf8KuD3p8YTLdx7BAYKafPW5FMtiUqtRcnl1Wnh/Wc4uJVFS1mi 0OyK3YwI9lBycxQjnTkSsnXTcUinRJ/YGtudZKrkM+GLMBmN5FihijwwH7aQaAV4SFjE SDoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Cxb0fLzt; 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 y16-v6si3114353pfn.111.2018.06.20.16.01.05; Wed, 20 Jun 2018 16:01:19 -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=Cxb0fLzt; 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 S1754216AbeFTXAY (ORCPT + 99 others); Wed, 20 Jun 2018 19:00:24 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:36292 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754018AbeFTXAV (ORCPT ); Wed, 20 Jun 2018 19:00:21 -0400 Received: by mail-pl0-f66.google.com with SMTP id a7-v6so561765plp.3 for ; Wed, 20 Jun 2018 16:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Q8eXOyPHbhOLHzsmOX7c8FnyLOpbmkOA6pumQpgXxWM=; b=Cxb0fLztEM+7tvb742vYc0D/r6ZJ0l0TfD0fq0WE1lznt5pO7F0nPMgvcbRW7dxpzG 4bipTqC1vCaelFlgXJHZO1YnvqRdjTz3MZk+X95OTDsRKXsXnYMEyu8tMD72Z0KOy2y2 HTScpf2A2lYi64XmysME3mb6tm5RYxIpc6b1GKPh+dcsfWRMrKeOdAMPFRYwilDhDgMj y9KqLzquE/xTBoVyEPDdliDM03NhQVzJYr7IMA0HciYnABY+WHngKjlUHYa3sSOwNHDm SFdSyJ3iwCLMWitVl4Opepx71KAaSbvnQYa1gFRNc8Jc0qZBu44JU66Y0oQKIMSwiCou ngYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=Q8eXOyPHbhOLHzsmOX7c8FnyLOpbmkOA6pumQpgXxWM=; b=YMgCeKxK1rPzw1mq+32zcfBLToEfbpi2KoqFtmX9ez8uHOm4TmrPG2PggefKd/06Gs 6tVWkjBJ7RMDwW8iMSUvGk8+JrtLkz4ug0rj8tE28ABB1J8CzT5RfL4SOc5tza+jZuMH WqiR2Eh+YjmJWrZ+aZARvBsoPLBJ1OtNGxV4jEEplP0EB0LAa9GdTuVc2zifVBSXxn1b XwwnyWWJ4vw4w0pfT2Ntryg9xHe1x808pa160SKCY+gNicpxv4FUIau+uP5IeAq44Ez8 PdAT26YS//D0aJBhYYRA9X8lx79/nYcKfewMe4hEOY5JpR3iI7i2/teLAIDamoz+ut81 jblw== X-Gm-Message-State: APt69E2GnlwKot9m6Oah0TFUNifpgqxLGSTQWgAAxoWYXk8MrZA53IN7 KIXm1yllAt56zdc29LO2wQ== X-Received: by 2002:a17:902:1127:: with SMTP id d36-v6mr26129332pla.267.1529535620843; Wed, 20 Jun 2018 16:00:20 -0700 (PDT) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id 14-v6sm4274046pgc.63.2018.06.20.16.00.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 16:00:19 -0700 (PDT) Received: from [192.168.27.3] (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPSA id F3C4B66B; Wed, 20 Jun 2018 18:00:17 -0500 (CDT) Reply-To: minyard@acm.org Subject: Re: [PATCH] ipmi: Cleanup oops on initialization failure To: Meelis Roos Cc: Linux Kernel list , openipmi-developer@lists.sourceforge.net, Corey Minyard References: <1529497606-3857-1-git-send-email-minyard@acm.org> From: Corey Minyard Message-ID: <7c9a293d-02e7-96c3-4760-f2d066e9dfd6@acm.org> Date: Wed, 20 Jun 2018 18:00:17 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/20/2018 09:26 AM, Meelis Roos wrote: >> 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 > Tested-by: Meelis Roos > > > The corresponding dmesg: > > [ 7.372830] IPMI System Interface driver. > [ 7.373034] ipmi_si dmi-ipmi-si.0: ipmi_platform: probing via SMBIOS > [ 7.373109] ipmi_si: SMBIOS: mem 0x0 regsize 1 spacing 1 irq 0 > [ 7.373182] ipmi_si: Adding SMBIOS-specified kcs state machine > [ 7.373352] ipmi_si: Trying SMBIOS-specified kcs state machine at mem address 0x0, slave address 0x20, irq 0 > [ 7.373479] ipmi_si dmi-ipmi-si.0: Could not set up I/O space > >> 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. > Handle 0x001B, DMI type 38, 18 bytes > IPMI Device Information > Interface Type: KCS (Keyboard Control Style) > Specification Version: 2.0 > I2C Slave Address: 0x10 > NV Storage Device: Not Present > Base Address: 0x0000000000000000 (Memory-mapped) > Register Spacing: Successive Byte Boundaries Thanks a bunch.  It looks like the SMBIOS tables are wrong.  I wonder if this is what some vendor do if there is no IPMI device installed.  I guess I need to add a check for this. -corey >> 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(-) >> >> 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); >> >>