From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B85C6C433E1 for ; Thu, 21 May 2020 00:24:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96A5120748 for ; Thu, 21 May 2020 00:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590020662; bh=so+02LeLE1MjLDY4FVscmq2Bc9Vlqajs1T7f42XyVzU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=K6qbHntcZzG8MVbzGj69xy7rpyOTUXdoCPGdhOGMvnw4HdDMzNk9pLNhAh3+0hBWH bnj8e0YqHAeuTu9ehlZ3Lwn0iUJ5HyyMOZ3ZkTwKO0Yku/kDDp0gUvEOxnwnNtTnXz mNOt9/sR79HaKxioXp+EmXTM6zKqpqyQHOhcDlkE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbgEUAYV (ORCPT ); Wed, 20 May 2020 20:24:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726737AbgEUAYV (ORCPT ); Wed, 20 May 2020 20:24:21 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 15881205CB; Thu, 21 May 2020 00:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590020661; bh=so+02LeLE1MjLDY4FVscmq2Bc9Vlqajs1T7f42XyVzU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=plmatdw9xMdFVvPnxMzUj7O296h9pEw9c2BEakKQ2nbJJ2lhlCq6CRIJ3QKgPgEyS uoGKwyCYmYXxv+L9AURVWQxZPE6f1rktSaHCjzPVgoSn3tcsaOrpLCRgdEiczwfMNr u7kswe98o2IVWBhLnROPkuxl+PNB+aqZ5Ab4N56U= Date: Wed, 20 May 2020 20:24:20 -0400 From: Sasha Levin To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Christian Gromm , devel@driverdev.osuosl.org Subject: Re: [PATCH AUTOSEL 5.6 16/62] most: core: use function subsys_initcall() Message-ID: <20200521002420.GH33628@sasha-vm> References: <20200514185147.19716-1-sashal@kernel.org> <20200514185147.19716-16-sashal@kernel.org> <20200515065914.GB1006524@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200515065914.GB1006524@kroah.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, May 15, 2020 at 08:59:14AM +0200, Greg Kroah-Hartman wrote: >On Thu, May 14, 2020 at 02:51:01PM -0400, Sasha Levin wrote: >> From: Christian Gromm >> >> [ Upstream commit 5e56bc06e18dfc8a66180fa369384b36e2ab621a ] >> >> This patch replaces function module_init() with subsys_initcall(). >> It is needed to ensure that the core module of the driver is >> initialized before a component tries to register with the core. This >> leads to a NULL pointer dereference if the driver is configured as >> in-tree. >> >> Signed-off-by: Christian Gromm >> Reported-by: kernel test robot >> Link: https://lore.kernel.org/r/1587741394-22021-1-git-send-email-christian.gromm@microchip.com >> Signed-off-by: Greg Kroah-Hartman >> Signed-off-by: Sasha Levin >> --- >> drivers/staging/most/core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c >> index 0c4ae6920d77d..409c48c597f2f 100644 >> --- a/drivers/staging/most/core.c >> +++ b/drivers/staging/most/core.c >> @@ -1484,7 +1484,7 @@ static void __exit most_exit(void) >> ida_destroy(&mdev_id); >> } >> >> -module_init(most_init); >> +subsys_initcall(most_init); >> module_exit(most_exit); >> MODULE_LICENSE("GPL"); >> MODULE_AUTHOR("Christian Gromm "); > >This is not needed in 5.6 and older kernels due to the most/core.c code >being in staging for these releases. It only became an issue when it >moved out of staging. > >So please drop this from here and any older trees you might have >selected it for. Now dropped, thanks! -- Thanks, Sasha