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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9B3ECD54AC for ; Tue, 19 Sep 2023 09:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbjISJaj (ORCPT ); Tue, 19 Sep 2023 05:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbjISJai (ORCPT ); Tue, 19 Sep 2023 05:30:38 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5B2EEC for ; Tue, 19 Sep 2023 02:30:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F101FC433C7; Tue, 19 Sep 2023 09:30:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695115832; bh=dEStBRU3J0BamCF9xUQ+Ax1uh2vS2ZVsV5VwPbBbfbg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZVaHsQOlvfF/2ragS2SYSBm7xPltEUE3C4PQJGyuGAPyjEiDPjliX54YaLOT4Oc+v f6pmGQsJt6991B9/3vy+VDK8e5bF8Xx68tm2wlsqLAmZnl5HNXZasjviHbZRvgjqoR PHP8jVkjXC1v7f/sifYqLBvRDv6sliWZ4ovBOW6pCAdNsoci+dY9zjHqNEHH/STr68 njMduyJHQBvzHng4oVukV1dk0ltQdmJiagen0tfiwR4LtngiWNFlaZ1yNb0jQh4rhb UoFF0xKVRARAJ5/iIs2muLSnn3q05SasszBQ1+4pzeW4P1M529XyeLkeZqt35kRHHm YHw8fkaoJ5yYw== Date: Tue, 19 Sep 2023 12:30:28 +0300 From: Leon Romanovsky To: Zhu Yanjun Cc: Zhu Yanjun , haris.iqbal@ionos.com, jinpu.wang@ionos.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org Subject: Re: [PATCH 1/1] RDMA/rtrs: Fix the problem of variable not initialized fully Message-ID: <20230919093028.GG4494@unreal> References: <20230919020806.534183-1-yanjun.zhu@intel.com> <20230919081712.GD4494@unreal> <01d9dd18-3d63-fabb-33d4-0de528f15a9a@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <01d9dd18-3d63-fabb-33d4-0de528f15a9a@linux.dev> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, Sep 19, 2023 at 04:26:54PM +0800, Zhu Yanjun wrote: > > 在 2023/9/19 16:17, Leon Romanovsky 写道: > > On Tue, Sep 19, 2023 at 10:08:06AM +0800, Zhu Yanjun wrote: > > > From: Zhu Yanjun > > > > > > No functionality change. The variable which is not initialized fully > > > will introduce potential risks. > > Are you sure about not being initialized? > > About this problem, I think we discussed it previously in RDMA maillist. > > And at that time, IIRC, you shared a link with me. The link is as below. > > https://www.ex-parrot.com/~chris/random/initialise.html > > From what we discussed and the above link, I think it is not initialized > fully. I remember that discussion and it was about slightly different thing: {} vs {0} in Linux kernel. However I don't think that I sent you that link. Anyway, let's take this patch as it is harmless. Thanks > > > Zhu Yanjun > > > > > Thanks > > > > > Signed-off-by: Zhu Yanjun > > > --- > > > drivers/infiniband/ulp/rtrs/rtrs.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/infiniband/ulp/rtrs/rtrs.c b/drivers/infiniband/ulp/rtrs/rtrs.c > > > index 3696f367ff51..d80edfffd2e4 100644 > > > --- a/drivers/infiniband/ulp/rtrs/rtrs.c > > > +++ b/drivers/infiniband/ulp/rtrs/rtrs.c > > > @@ -255,7 +255,7 @@ static int create_cq(struct rtrs_con *con, int cq_vector, int nr_cqe, > > > static int create_qp(struct rtrs_con *con, struct ib_pd *pd, > > > u32 max_send_wr, u32 max_recv_wr, u32 max_sge) > > > { > > > - struct ib_qp_init_attr init_attr = {NULL}; > > > + struct ib_qp_init_attr init_attr = {}; > > > struct rdma_cm_id *cm_id = con->cm_id; > > > int ret; > > > -- > > > 2.40.1 > > >