Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6169521imm; Wed, 27 Jun 2018 03:29:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKlK+IA44cajNLeTh5EMFki1ENphti87DQKRFJmMM73MLZ+B/KFRhGDuaS1szvU66f+p46V X-Received: by 2002:a65:6591:: with SMTP id u17-v6mr4478487pgv.401.1530095345949; Wed, 27 Jun 2018 03:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530095345; cv=none; d=google.com; s=arc-20160816; b=lv7EAV3p7Kv0tunyVl+WfOGAHuZIGvzC+XXfDh8hzCUSIZt40TBhRDjqSGjHqfb/Za bQchhObGJlk2tlpLaoc2MLj03SxEw2MTy7PQlW40MHl6X3yN0SCkmC3ZzwzENcRCsg49 CdcxpaJ1YyvxWmizb9fHzC5NgKVhvpwgIbJGmpAWV3rQVeY7WVmuk5sEQNwzReA9VnWp XTUE4X7TkAyu6DkyOzbBo4CHgYWxzBqGHIBINwcQlLsNRQl5Pu/ebJTmjR1p3//Zd/// YMTqyfVSNjLJmbA3N8wXCzDi7g0UDO/pnp2y6211RYgGdcV3XftCfgCfCjKklPNXw2dF 1ioA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=zxGdAuc7kpY0OAEp7eroLMU2rvnXesHUAu8IIZeKcVM=; b=IPTeXRKByCFdW/kfsK89mcM7vVzGVrYpxtv9waDTn3dD6gtoRAtmjrMwIXnOIhnYAX 2wK9cS3/O8CZEUS9JyyBWPByTfzIijrrnvPsN/GYWG3xoX00CSAMy3BIL8/FSppB5lij oVJ/M72PkekZ7C5gp1AJrMKff2FYAYvzfICwkYdkuShKG41ewwBup/njgbpLp7cXc1kK bGFJ51JDJGTc3BgfZCAkSu0+h39htbyK3WkMYqgktCHcRceydjvbucLR6sNYWIrz8f60 eC30gHKga+igLAI2ii/JYvtlzZLecbhbXJt18nrozpcSoKughpfxpz10LS/waxt0d9oN iaBw== 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 f186-v6si3783302pfg.194.2018.06.27.03.28.48; Wed, 27 Jun 2018 03:29:05 -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 S1753614AbeF0KZL (ORCPT + 99 others); Wed, 27 Jun 2018 06:25:11 -0400 Received: from foss.arm.com ([217.140.101.70]:57820 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565AbeF0KZK (ORCPT ); Wed, 27 Jun 2018 06:25:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 970BE7A9; Wed, 27 Jun 2018 03:25:09 -0700 (PDT) Received: from red-moon (red-moon.cambridge.arm.com [10.1.206.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E77123F5C0; Wed, 27 Jun 2018 03:25:07 -0700 (PDT) Date: Wed, 27 Jun 2018 11:26:42 +0100 From: Lorenzo Pieralisi To: Bjorn Helgaas , Kishon Vijay Abraham I Cc: kernel test robot , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, LKP Subject: Re: [lkp-robot] [bisect done] ef1433f717 [ 7.049860] BUG: unable to handle kernel NULL pointer dereference at 0000004c Message-ID: <20180627102620.GA7893@red-moon> References: <20180626011007.GI11011@yexl-desktop> <20180626211501.GC181504@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626211501.GC181504@bhelgaas-glaptop.roam.corp.google.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 26, 2018 at 04:15:01PM -0500, Bjorn Helgaas wrote: > On Tue, Jun 26, 2018 at 09:10:07AM +0800, kernel test robot wrote: > > > > Greetings, > > > > 0day kernel testing robot got the below dmesg and the first bad commit is > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > > > commit ef1433f717a2c63747a519d86965d73ff9bd08b3 > > Author: Kishon Vijay Abraham I > > AuthorDate: Mon Apr 2 18:59:35 2018 +0530 > > Commit: Lorenzo Pieralisi > > CommitDate: Fri May 18 16:40:50 2018 +0100 > > > > PCI: endpoint: Create configfs entry for each pci_epf_device_id table entry > > > > In order to be able to provide correct driver_data for pci_epf device, > > a separate configfs entry for each pci_epf_device_id table entry in > > pci_epf_driver is required. > > > > Add support to create configfs entry for each pci_epf_device_id > > table entry here. > > > > Signed-off-by: Kishon Vijay Abraham I > > Signed-off-by: Lorenzo Pieralisi > > Tested-by: Gustavo Pimentel > > From the .config below: > > # CONFIG_PCI_ENDPOINT_CONFIGFS is not set > > From include/linux/pci-ep-cfs.h: > > #ifdef CONFIG_PCI_ENDPOINT_CONFIGFS > ... > #else > static inline struct config_group *pci_ep_cfs_add_epf_group(const char *name) > { > return 0; > } > > From ef1433f717a2: > > + id = driver->id_table; > + while (id->name[0]) { > + group = pci_ep_cfs_add_epf_group(id->name); > + mutex_lock(&pci_epf_mutex); > + list_add_tail(&group->group_entry, &driver->epf_group); > > Obviously group == 0 and the list_add_tail() is a NULL pointer > dereference. > > Looks like we need either some sort of #ifdef CONFIG_PCI_ENDPOINT_CONFIGFS > in __pci_epf_register_driver() and pci_epf_unregister_driver(), or > higher-level interfaces and corresponding stubs that add/remove all > the IDs. Yes, probably augment pci_ep_cfs_add_epf_group() to take a driver pointer so that adding a group is a NOP on !CONFIG_PCI_ENDPOINT_CONFIGFS. Kishon can you please post a fix as soon as you can, thanks. Lorenzo