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=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,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 2FF51C433ED for ; Thu, 29 Apr 2021 09:31:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A52A46143F for ; Thu, 29 Apr 2021 09:31:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A52A46143F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ionos.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0D5AD6B006E; Thu, 29 Apr 2021 05:31:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 086066B0070; Thu, 29 Apr 2021 05:31:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E41CC6B0071; Thu, 29 Apr 2021 05:31:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id C59136B006E for ; Thu, 29 Apr 2021 05:31:05 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 824CA5DC2 for ; Thu, 29 Apr 2021 09:31:05 +0000 (UTC) X-FDA: 78084885690.08.A514E74 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by imf25.hostedemail.com (Postfix) with ESMTP id EE9F96000112 for ; Thu, 29 Apr 2021 09:30:59 +0000 (UTC) Received: by mail-ej1-f54.google.com with SMTP id r12so98853736ejr.5 for ; Thu, 29 Apr 2021 02:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9oa8j/FQ3GXIiXa4chwdqkT8kgdxjRavwvLA6Hcq/0Y=; b=AOnm0XVvzyb3HE6emVtNMqXkpHt1SjdhdP2XffCiIbWajixvBXL7/hzS7XF2Y1ahBG kPj2PuZEc1pmo49bZyGr1WxhZqNdwsH2KY7mhRYNGA2H+dWEhOOzpGimZRStEVc/Mx8Q 7kMMfIqg3vh9D7laZyTK2D2jplzaZlJPjDd0iQTFBFm3BbbPg4mm86L5T4xQSvvggOgb lxF6W3RTba7R+Jy+1Jja3pzL+OW/hB7w1tq7tfBAcRrJ/Y+3pKIlBXUk+ZbDkydmem4e BfDSEwUKHw2uQO6tn2YpTKGC78Mk+cpOGaee4+hwQlzph5PlYim6oBxs4C82Vt+4c+M/ URVw== 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=9oa8j/FQ3GXIiXa4chwdqkT8kgdxjRavwvLA6Hcq/0Y=; b=JP8LBVRZujyfKku5q0JxhSX+/TZhlMeByG6auwjuHmXBLl6iO/j+XUJp+GInmYSzkB C6+x15rQ0jdcrjXekH1Wr6QX9/6MrtdrNUCEVhJq3OcqzcuE0nbnTsGUmvvODrkIgbbF TATB/8CzM0Ur9qY/3KcVih6iHeq8ZRUg/aujPdwkqdJQrbzHmH51XyYPIUd7jF5SOTrf DrGB/bDVJqidhqsInwOXrhD1p/gpuJpPQxzxsSO48zFxuaAW64wpdmSYZKdt+lCK61eA qgEvEA+mlrOp5EjcD/0E1KxW1JfjylmsyIYE2m8R1GFHxLak8Jk6iHqQiZ4VNj9joJhw 78ww== X-Gm-Message-State: AOAM531U6iO/AfFIXJ4/AxVlNIuKQXGlemtKKLxK54XlfEKk2FN4yNd2 taEFJmiJ88CYw+s4Hve/bNom2f0K1LovyU4MyKqWfA== X-Google-Smtp-Source: ABdhPJx8w+rkRgLNL2j8+toeKSw1rNapL0erD3nLDTRUkZl2h/z/X74y/CqPKHESU89UmAgBM7FFaIXcXFp8Zf0IdkM= X-Received: by 2002:a17:906:e28c:: with SMTP id gg12mr16537243ejb.483.1619688663903; Thu, 29 Apr 2021 02:31:03 -0700 (PDT) MIME-Version: 1.0 References: <202104211107.klEwvRy0-lkp@intel.com> In-Reply-To: From: Gioh Kim Date: Thu, 29 Apr 2021 11:30:28 +0200 Message-ID: Subject: Re: [linux-next:master 13667/14048] drivers/infiniband/ulp/rtrs/rtrs-clt.c:2922 rtrs_clt_rdma_cq_direct() error: uninitialized symbol 'cnt'. To: Dan Carpenter Cc: kbuild@lists.01.org, Gioh Kim , kbuild test robot , kbuild-all@lists.01.org, Linux Memory Management List , Jens Axboe , Jack Wang , Leon Romanovsky Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: EE9F96000112 X-Stat-Signature: 1m1e5ag9swbd8f3pxezknmzgx8g15xuc Received-SPF: none (ionos.com>: No applicable sender policy available) receiver=imf25; identity=mailfrom; envelope-from=""; helo=mail-ej1-f54.google.com; client-ip=209.85.218.54 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619688659-709370 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 29, 2021 at 11:05 AM Gioh Kim wrote: > > On Thu, Apr 29, 2021 at 10:58 AM Dan Carpenter wrote: > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > head: 593ef1658ecf61d3619885bdbbcfffa3d1417891 > > commit: fa607fcb87f6e3dca38b9984c4ccde3e36a43721 [13667/14048] block/rnbd-clt: Support polling mode for IO latency optimization > > config: x86_64-randconfig-m031-20210420 (attached as .config) > > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > Reported-by: Dan Carpenter > > > > smatch warnings: > > drivers/infiniband/ulp/rtrs/rtrs-clt.c:2922 rtrs_clt_rdma_cq_direct() error: uninitialized symbol 'cnt'. > > > > vim +/cnt +2922 drivers/infiniband/ulp/rtrs/rtrs-clt.c > > > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2901 int rtrs_clt_rdma_cq_direct(struct rtrs_clt *clt, unsigned int index) > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2902 { > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2903 int cnt; > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2904 struct rtrs_con *con; > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2905 struct rtrs_clt_sess *sess; > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2906 struct path_it it; > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2907 > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2908 rcu_read_lock(); > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2909 for (path_it_init(&it, clt); > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2910 (sess = it.next_path(&it)) && it.i < it.clt->paths_num; it.i++) { > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2911 if (READ_ONCE(sess->state) != RTRS_CLT_CONNECTED) > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2912 continue; > > > > What if no sessions are connected? So we dont enter the loop or we > > hit continue every time? > > Hi Dan, > > I just finished a internal process for the fix of that issue. > In short, I would like to initialize cnt with -1. > So rtrs_clt_rdma_cq_direct will return -1 if there is no session. > And the block layer will not call rtrs_clt_rdma_cq_direct again > because the return value is negative. > > I am going to send the patch today with the tags above. > Thank you very much. Hi Dan, FYI, I just sent a patch including the tags. > > > > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2913 > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2914 con = sess->s.con[index + 1]; > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2915 cnt = ib_process_cq_direct(con->cq, -1); > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2916 if (cnt) > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2917 break; > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2918 } > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2919 path_it_deinit(&it); > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2920 rcu_read_unlock(); > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2921 > > fa607fcb87f6e3 Gioh Kim 2021-04-19 @2922 return cnt; > > fa607fcb87f6e3 Gioh Kim 2021-04-19 2923 } > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > >