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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 A6351C433DF for ; Wed, 17 Jun 2020 10:57:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 816CA208B3 for ; Wed, 17 Jun 2020 10:57:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="hq1X9t5N" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbgFQK5v (ORCPT ); Wed, 17 Jun 2020 06:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726271AbgFQK5u (ORCPT ); Wed, 17 Jun 2020 06:57:50 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30281C061573 for ; Wed, 17 Jun 2020 03:57:50 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id n24so1854777ejd.0 for ; Wed, 17 Jun 2020 03:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O+YfS0ttnLCfsNiE+e6ILMV8mORupQjGd84VFFvianI=; b=hq1X9t5NU9g+T8dqEMPWoeuhUYPrzb8ZUmYbMzwy4FI4rfrVVLdlFySkqTREG3PLI0 wNVUGKOJ0OxjUvRg2ZBUobKmc+VBEVPWS+AEHaahxXnm7ZfKSYo/th/tRNSB5XQ3NpXP OdxD+wllo1sBFq+bhFbwUOZwsJu4qN6icSbcUD4RFAxNUIcitmewso6zYrJCTCo86QDd WP8Cx1+FKbZrF1FvSj5+GrtGT04ikVSD8iUhIMaHh0SslF7y6vlJ1v6QvlwqB1BITd61 Tu8hZ3yonJ/wHqoCc5f5iFzL64k5Y6XKW9ZRbTBq1bZdMm4ZVuPkb8E3eQimd0oqyItS ZHdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O+YfS0ttnLCfsNiE+e6ILMV8mORupQjGd84VFFvianI=; b=UTn0Kt84TP1L4iSiEsVl+rRUBTCSUTWzmhP3AExCbsfBrNVIPesUOA5FXGsUmrsXEC bBjXQalcu0oRo4IFqvospqPzBIR+UCyreTAGp2h1jWmRYWmaoFsNAKRj7NdIN6A9P7XJ PLODqxVxRjQ864RslnRx8UaoyOkoWmIU1vmPPlYPu0ghTiKE37aBY6Vaw9lPfLUchf5l 9Dlwsc733/o15dE16VbWxVAFZPViyDrbRzVWsujtnZcrXF3UOe0MHIPLMOr/EFPN64bK 6ir9QhKyBKetbc3FOJmQs1l2C/U1d+0DGMWJRL9TD3Ld4bGZc/0yUCLlXR78PvQton3E s89A== X-Gm-Message-State: AOAM532zx1Kp3UbTwVFzu+DR4jBFb7jcxPlenYOPo+fP7XQIiQ4YFKJ4 e3LZWUJQKt/Wji+eO7RGpL4TbyRsxSkYOR0HZv+7tA== X-Google-Smtp-Source: ABdhPJzP5nSfdYRuYpEBQ/kGmSwqj8HneuDENIWgcYcvcj33ZChZis6j7fB5yVbc7y6wZYu1jv0Oqs9v/fPP9L+hdIE= X-Received: by 2002:a17:906:7802:: with SMTP id u2mr7177417ejm.478.1592391468871; Wed, 17 Jun 2020 03:57:48 -0700 (PDT) MIME-Version: 1.0 References: <20200617103732.10356-1-haris.iqbal@cloud.ionos.com> In-Reply-To: <20200617103732.10356-1-haris.iqbal@cloud.ionos.com> From: Jinpu Wang Date: Wed, 17 Jun 2020 12:57:38 +0200 Message-ID: Subject: Re: [PATCH] Delay the initialization of rnbd_server module to late_initcall level To: haris.iqbal@cloud.ionos.com Cc: linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, Danil Kipnis , Doug Ledford , Jason Gunthorpe , kernel test robot Content-Type: text/plain; charset="UTF-8" Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Hi Haris, Thanks for patch, a few comments inline On Wed, Jun 17, 2020 at 12:37 PM wrote: > > From: Md Haris Iqbal > > Fixes: 2de6c8de192b ("block/rnbd: server: main functionality") > Reported-by: kernel test robot > Signed-off-by: Md Haris Iqbal This part should be the last after commit message. The subject sounds better maybe: block/rnbd: Delay the initialization of rnbd_server module to late_initcall level > > The rnbd_server module's communication manager initialization depends on the > registration of the "network namespace subsystem" of the RDMA CM agent module. > As such, when the kernel is configured to load the rnbd_server and the RDMA > cma module during initialization; and if the rnbd_server module is initialized > before RDMA cma module, a null ptr dereference occurs during the RDMA bind > operation. would be better to include the call trace here. > This patch delays the initialization of the rnbd_server module to the > late_initcall level, since RDMA cma module uses module_init which puts it into > the device_initcall level. With the comments addressed: Acked-by: Jack Wang > --- > drivers/block/rnbd/rnbd-srv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c > index 86e61523907b..213df05e5994 100644 > --- a/drivers/block/rnbd/rnbd-srv.c > +++ b/drivers/block/rnbd/rnbd-srv.c > @@ -840,5 +840,5 @@ static void __exit rnbd_srv_cleanup_module(void) > rnbd_srv_destroy_sysfs_files(); > } > > -module_init(rnbd_srv_init_module); > +late_initcall(rnbd_srv_init_module); > module_exit(rnbd_srv_cleanup_module); > -- > 2.25.1 >