Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5775520imm; Tue, 26 Jun 2018 18:21:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdVrYIM/PdbbutXs19eFbAAfUzzQYD0iCLtfMfKeklavaV0a2dvqpYX+l5ZkA/JCBTscTm4 X-Received: by 2002:a62:bd03:: with SMTP id a3-v6mr3737068pff.138.1530062475670; Tue, 26 Jun 2018 18:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530062475; cv=none; d=google.com; s=arc-20160816; b=P+WPloi+3IUqP6M0p9eUf9hFrYZq55RiqWaWlYV8UQDDsSQTsEivqsBLebPpsivmyh 6WRRbfgdnfn8N9WD/g5zq7gU3wvq3c87LFI099JcRbhjGUGAeIMYHvsmL87E5qNPKkLh yxuyZ0iFuLn1//4ull35F4MHO2dWDkNRa2vka04fRviPhURIqyfxK2Tp6gvXumTOOmbt n27TjXb08qyW1MP7IH5TX+O0d2hZ1L8Vv2s424ZLAoxx3qlZDM5SCVZqE5XzdW6QldVc 2SY4DSTyeUqpNdxhBC8dNmi1DKc99/MpjE1mKA9VWqnfJGvMVs0Mpn3UfNUvR7Dq3L5Y 5nKA== 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:dkim-signature:arc-authentication-results; bh=AkwjEQpEKEiyGNzcUhfEaBPIwFce9GX2r8zXzPuwVlw=; b=GlJbv252V9Pt7kuxBDLo8AcqqIoaIX5pnv6HV2LCgN2sDYHcLSbq36241CQqk261fi GgEOGPZ6h9fkB41AiB0YGbQbWBJ0DT2gbCaEKdkOXfguTBCvFH2iDwtf/P7gWRvJQMfP MvQjNpNwt8NBJbdWwxSHqBeYmygnzu5yDz1m4Eis1CoJcehLDU+0my3Uxjskqs7gna1a ecFL3eOSdVd6xh/SvA+mYQ5SDKYNHcb2C13dl+IYBO4uqRD1g/YPKCS/rfliIHxhUh4c yoxH4MHN/CXcFDZUmfSk66YIKx66f/Iq+iMCYddFBQvQj9MUDid2gJRSmw0TC6inRibq bo0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iVuRVOEk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a62-v6si2390138pgc.29.2018.06.26.18.21.01; Tue, 26 Jun 2018 18:21:15 -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=pass header.i=@kernel.org header.s=default header.b=iVuRVOEk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752172AbeFZVPE (ORCPT + 99 others); Tue, 26 Jun 2018 17:15:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:41118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413AbeFZVPD (ORCPT ); Tue, 26 Jun 2018 17:15:03 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62C8F26A79; Tue, 26 Jun 2018 21:15:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530047702; bh=espXtzyLa31t9kWH6RN5tDLQ1KS5Ic3Ws233VJCMTsE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iVuRVOEk2zyIYgwBZhzy/0CFuKWkP0r17mMS1d+/GMI4UK9BjVGfqg1NMK8MGZaRu g4LqKJxSc0ke9qqzpx6XaN+QhFgCQpMqO2BQOXaf0GrTVzLWuJC5btFsmFqgRuoljW 8asB0Qcf8tmArdGQ6apAZ4C0t/AUuBP2EjSTYO9Q= Date: Tue, 26 Jun 2018 16:15:01 -0500 From: Bjorn Helgaas To: kernel test robot Cc: Kishon Vijay Abraham I , Lorenzo Pieralisi , 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: <20180626211501.GC181504@bhelgaas-glaptop.roam.corp.google.com> References: <20180626011007.GI11011@yexl-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626011007.GI11011@yexl-desktop> User-Agent: Mutt/1.9.2 (2017-12-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 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. Bjorn