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.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 17489C433DF for ; Wed, 29 Jul 2020 07:39:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1AC92076E for ; Wed, 29 Jul 2020 07:38:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=bytedance-com.20150623.gappssmtp.com header.i=@bytedance-com.20150623.gappssmtp.com header.b="qvu8pBA3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbgG2Hi6 (ORCPT ); Wed, 29 Jul 2020 03:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726290AbgG2Hi5 (ORCPT ); Wed, 29 Jul 2020 03:38:57 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71B71C0619D2 for ; Wed, 29 Jul 2020 00:38:57 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id lx9so1641116pjb.2 for ; Wed, 29 Jul 2020 00:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Hf50u6h9wnLFy96WAeaaud4OkMwukdvpfoIh17caQSk=; b=qvu8pBA35juXB5IAuj3EOdEUiIafCwux4Zh/tDRiwecjZ4h5ljtUkch7bU9dNi7BEn zDV1HWeXxyCHZ+z2tecTWyTytdwhCEd+DESLLScaS3yfoPMOqFliEXQd8TV0hQYlTJtq KbivU5pLK8l1ZRq1qGCXjh0QZyOLgi3XhExE07HdtbzYUitJ5N17urMNFvkQLT+boa/3 k5+plqHvx2y0rTUOJgJEmfCPNHFoKVZvQWvR3/xJ9pYJ0/Me2W8JrPQtu6RHmwTL08Tz Ykq8YBWIbvNFayGGaRBCwOFl+137kCp0rtNEZYG3EIZvf5Dg0Ef7VahEMkXnpQf7V2e9 0Nkg== 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:content-transfer-encoding; bh=Hf50u6h9wnLFy96WAeaaud4OkMwukdvpfoIh17caQSk=; b=MBAV0C6UgOH8Xx1vfV6AbvYhQtdvHXopHSwVfIxX3ySLJDGUCyes5uV/JMRXLp7F1Q FXT3qgmnghG1dutBVLJioHq6VO89pqbj6PhToqtTWEqoEGa3O3URNBkVYK4lfSLg5Bgg tcOVkw5+NX0jX+V6ZmU1Rv/dLx7KCdDZWihc+UZPfgFElOLXykkJ8nN2pXXVYLsySIa1 DjGPWQ0zje4mNX9+6j+hzjsUdjjNddw+UaaZLXDXrv85rY/Qvg7j1UbSBOMzMOnbepCs ZmZJUvFnFj9DOSxLlfWPWbr3NoSfVlQxKiLdEpoqpwxTLO9Di6I1Q9hQ+EL2OZ6xGkNW ExTQ== X-Gm-Message-State: AOAM532doCwNgcHrZuJ277mpy+jPmBjn6h0jzEUoTnH1Cgwo7uLXLKjn iWFEdTRI7Bz+vswYvwiAtRcTcND06ieuyoCtp34yvA== X-Google-Smtp-Source: ABdhPJz3p/RdzMtYa5b161gOYMyR9V5zWuKnydulgpgc6pQ29hu00H5qrHoahniLRmzse010xwGrjzFF810Pxzvlfuk= X-Received: by 2002:a17:90a:fa8c:: with SMTP id cu12mr8694751pjb.229.1596008336834; Wed, 29 Jul 2020 00:38:56 -0700 (PDT) MIME-Version: 1.0 References: <20200721101647.42653-1-hexin.op@bytedance.com> In-Reply-To: <20200721101647.42653-1-hexin.op@bytedance.com> From: Muchun Song Date: Wed, 29 Jul 2020 15:38:21 +0800 Message-ID: Subject: Re: [PATCH v3] drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl() To: Xin He , daniel@ffwll.ch, airlied@linux.ie, kraxel@redhat.com, sumit.semwal@linaro.org, LKML , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Cc: linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Qi Liu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 21, 2020 at 6:17 PM Xin He wrote: > > From: Qi Liu > > We should put the reference count of the fence after calling > virtio_gpu_cmd_submit(). So add the missing dma_fence_put(). > > Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit s= ynchronization") > Co-developed-by: Xin He > Signed-off-by: Xin He > Signed-off-by: Qi Liu > Reviewed-by: Muchun Song > --- > > changelog in v3: > 1) Change the subject from "drm/virtio: fixed memory leak in virtio_gpu_e= xecbuffer_ioctl()" to > "drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioct= l()" > 2) Rework the commit log > > changelog in v2: > 1) Add a change description > > drivers/gpu/drm/virtio/virtgpu_ioctl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/vir= tio/virtgpu_ioctl.c > index 5df722072ba0..19c5bc01eb79 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c > +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c > @@ -179,6 +179,7 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_dev= ice *dev, void *data, > > virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, > vfpriv->ctx_id, buflist, out_fence); > + dma_fence_put(&out_fence->f); > virtio_gpu_notify(vgdev); > return 0; > > -- > 2.21.1 (Apple Git-122.3) > Ping guys. Any comments or suggestions=EF=BC=9F --=20 Yours, Muchun