Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1175617ybg; Tue, 2 Jun 2020 03:20:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzivD+7qn9L/KDkR9CVVkdxvVjjopyST3oIZT110c9eAjPCjNAnqAWF8SlnjSDhGAm/CkQ9 X-Received: by 2002:a17:906:2c10:: with SMTP id e16mr13683045ejh.189.1591093226109; Tue, 02 Jun 2020 03:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591093226; cv=none; d=google.com; s=arc-20160816; b=kZ4wXmBsCIVKUXTQdpAwZbIGxR6Oai5McbPrBp8mZoeeG7TgvbcsSQhvlmBV/bIdBQ pWM4Ez1/eWNOCAiB8ldbKZp7XzmAjZddSiOU3CBbYbeeqWa/BcAZH0nV3grrnKg6t8U3 AMoCkdcsYErgsYyUukwXzo+OZxWHg9UiJ3ugKVNDF3j6mtnqb9zQDTHwJByN30awCif4 UFhJeg99/J7fmhxScjKV2JoKZoRUut/99kWEYt29yv3vclgHEsaEPPzk5TIALvHNlJ/0 lNeJgReNPV3JhjXr1FOpgPx1BzJZVuU7Q0LW7ewvnP6ItcXAUk//igeW2ubo6QKsKF0m oRmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=m8flul9T5/INbLuHOQ1wE5MsczYdkAsRCFisLMaoyM8=; b=HF4kgxknZKXdWXhk5RGDjiq/pjKPT5QbetWeINwyEWD9Ecg9z8tCsN7vJJWjrr6jSl xLPTuiwYu42h54EJ95aoQCG9KLsU/7oy5oIcM3w4+8dc12dCD7R1t5NwzEmLnPKTPDUZ 0uI169VSMaUBYhnIVr4kkfpGseajQC0Cbrl+pJ+ufTwVX7U+htQSqD91THop0M7VFkr8 AYZyphhErId7cCP0BlmaoUDO6xhbUly2b//iTO/K9L7rfhiAUaWypmbIHw48IhOjKU0Y QJaqCprnuPraCzmWhNmN3dudlzfIR9mMGznmkMbL4WP2pBsIiT4QFJidL37aTq1jFqdt iwTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GKCmkONL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si1128685eja.332.2020.06.02.03.20.03; Tue, 02 Jun 2020 03:20:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GKCmkONL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726408AbgFBKRv (ORCPT + 99 others); Tue, 2 Jun 2020 06:17:51 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:38081 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726377AbgFBKRc (ORCPT ); Tue, 2 Jun 2020 06:17:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591093049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m8flul9T5/INbLuHOQ1wE5MsczYdkAsRCFisLMaoyM8=; b=GKCmkONLVp8K4AT3fwhcl2dt/DI3MsLgfBjFFYyMOZuHopIZVB+iIYl0+u95gWQyIbbpX8 mDTnG/nva4bsrrVpx0KWUddxBum5xXBGtpZFOGIUtk432r8y5fqY59aMlopeRifjDWnLoY SQ8b1I4kX+9mu+oF7jIkoq8iMnKi+7s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-_gVI1e6lPeGjgn2AI4D0lw-1; Tue, 02 Jun 2020 06:17:07 -0400 X-MC-Unique: _gVI1e6lPeGjgn2AI4D0lw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4AC751030982; Tue, 2 Jun 2020 10:17:05 +0000 (UTC) Received: from [10.72.12.83] (ovpn-12-83.pek2.redhat.com [10.72.12.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E9C8100164D; Tue, 2 Jun 2020 10:16:54 +0000 (UTC) Subject: Re: [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick To: Dan Carpenter , kbuild@lists.01.org, Zhu Lingshan , mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: lkp@intel.com, kbuild-all@lists.01.org, lulu@redhat.com, dan.daly@intel.com, cunming.liang@intel.com References: <20200602094203.GU30374@kadam> From: Jason Wang Message-ID: Date: Tue, 2 Jun 2020 18:16:50 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200602094203.GU30374@kadam> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/6/2 下午5:42, Dan Carpenter wrote: > Hi Zhu, > > url: https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vdpa-bypass-waking-up-vhost_woker-for-vdpa-vq-kick/20200526-133819 > base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next > config: x86_64-randconfig-m001-20200529 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kbuild test robot > Reported-by: Dan Carpenter > > smatch warnings: > drivers/vhost/vdpa.c:348 vhost_vdpa_set_vring_kick() error: uninitialized symbol 'r'. > > # https://github.com/0day-ci/linux/commit/a84ddbf1ef29f18aafb2bb8a93bcedd4a29a967d > git remote add linux-review https://github.com/0day-ci/linux > git remote update linux-review > git checkout a84ddbf1ef29f18aafb2bb8a93bcedd4a29a967d > vim +/r +348 drivers/vhost/vdpa.c > > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 316 static long vhost_vdpa_set_vring_kick(struct vhost_virtqueue *vq, > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 317 void __user *argp) > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 318 { > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 319 bool pollstart = false, pollstop = false; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 320 struct file *eventfp, *filep = NULL; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 321 struct vhost_vring_file f; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 322 long r; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 323 > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 324 if (copy_from_user(&f, argp, sizeof(f))) > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 325 return -EFAULT; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 326 > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 327 eventfp = f.fd == -1 ? NULL : eventfd_fget(f.fd); > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 328 if (IS_ERR(eventfp)) { > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 329 r = PTR_ERR(eventfp); > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 330 return r; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 331 } > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 332 > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 333 if (eventfp != vq->kick) { > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 334 pollstop = (filep = vq->kick) != NULL; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 335 pollstart = (vq->kick = eventfp) != NULL; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 336 } else > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 337 filep = eventfp; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 338 > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 339 if (pollstop && vq->handle_kick) > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 340 vhost_vdpa_poll_stop(vq); > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 341 > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 342 if (filep) > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 343 fput(filep); > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 344 > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 345 if (pollstart && vq->handle_kick) > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 346 r = vhost_vdpa_poll_start(vq); > > "r" not initialized on else path. > > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 347 > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 @348 return r; > a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 349 } Will fix. Thanks > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org