Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp251201pxb; Thu, 2 Sep 2021 03:25:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyNL1dzKEw296YIGHxeOuXbHVG8mzjAOnTfQzj/BOdDs6ffiYTiOm/HkSSRshdFwTgdTyQ X-Received: by 2002:a6b:8e87:: with SMTP id q129mr2169139iod.176.1630578307129; Thu, 02 Sep 2021 03:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630578307; cv=none; d=google.com; s=arc-20160816; b=WRuVdXD7/Kjn8eQbY8lLzBY48K//lybgCnBIIA9Hog95Fst1jt81iEqVAlK9Cyt8qR 8q0mxU6QHIuZWskK1VvQTdNlBLxw53deccsbGoDcs1FjwP4HZXsO6RsLE+Il4MK4Xx1N Bd6RcvyV7Y99Pk+8dX3CxS/Cww+SssPuJOFw1FbMh2XBP3iRcz4x7Dv5Jcs/n+zf7AGn KSZIQkgB2U9NCexN8bOz5T0zfKEgCvAdldJChP4nqwE+gFr/XhR4s+ihfeyco7VTSuU0 vfR6RzquMAs40qPR8+gRp3xRV8odlUJyhaxx86ZJAG6/L5wXJG2GGfGsALjOp5X57qMq 2UQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=a/aNNaQOk2PsxF1uVVYaaDSIyLlSNsiqA+VC8U+Vvxo=; b=cLbNrhb0bfpUq/9n7JYOv3ula1pWTV2oWp4JAH7H2R3GAgNXKefhprrwSrtT+z1vvJ RxS9ZkCb/qH1AibreOniIE0VlCPC0+mS2nKXdiL2Du7IPlkqQYuc0JMMKCt7BNjJDAOF M3EOlGhZnO29M/z9hAJ7y701w0/A6xlimc5nGtsoYV7jfXC3NcQsrRJFsLdQmhWXpJvU n4HVW4yIEK2JJNQTypSra0tfzLm1oWit5wBZj+vONE6xvYSCOczWOdOr4I/HDsBnyo4e Hk0MYgSzeDUNOt8SQ3frWAkZEBrvZGMHMUqlFxWMohsbD5QADP7rhtGmftnKMhAevxTX PxWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=g711xaJp; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c16si1632522ili.126.2021.09.02.03.24.47; Thu, 02 Sep 2021 03:25:07 -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=@gmail.com header.s=20210112 header.b=g711xaJp; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241783AbhIBKZE (ORCPT + 99 others); Thu, 2 Sep 2021 06:25:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233714AbhIBKZD (ORCPT ); Thu, 2 Sep 2021 06:25:03 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 029A1C061575; Thu, 2 Sep 2021 03:24:04 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id lc21so3127101ejc.7; Thu, 02 Sep 2021 03:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a/aNNaQOk2PsxF1uVVYaaDSIyLlSNsiqA+VC8U+Vvxo=; b=g711xaJpswgFhuRVvN/yPVH2ddfRcnUqK/4nWVLEEavaJAcabYr1VdxKT2AWQmo0em +j5B/SYphqr4acIP69dvOu1GRseMq3ET2DTh+cWpHMqXGoPjZI0r06khrFdTZTWXxyXE T43QsIFigkn8Nms6cy5hUqBqdAeVaj7mrfOkA0iRiqROdfpY0MybDJXqXumH54XgtjCL 0tWh33qAzgUIylJhFFmU+RL4WkGH9Ya1Ew/IdAsGWRndthjg4qSJai5Nvcm2Zs+Nnpgk Asuj8OVCKiR7K4vf//hoazpgpKdbKn3Izd+r1zvr2aTh7Zkw76l8Ksg4YT1UlShvPkkn chbA== 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=a/aNNaQOk2PsxF1uVVYaaDSIyLlSNsiqA+VC8U+Vvxo=; b=m990yt+QsBSyAd20aVF7/6CGY3jwMQ6PyB05mbBiCiBWa0D0VegFlXbbaH1xNe5dEz 41LuM372vI+z1YCZD+AIHgL3b1YB87jPrl2rxqM1dxXngfRAJ7o8W5zOkCJgBc2A02CO +Ji9KONKBMbGkOyxv/eVLslSfbZm2y5j8MGbkZxje/8tfNkw44sD9nlSiePvnn9Lfeex R8DSpvLQ84X6spZv3ZqM5uQFC2uz3IoiZ+kqpmrfzF6s3WAzaURTu3eL5OuA6NpX+1dH ln1ex9CLAEG18/7rQySf5IM0DlqmNyptuutrhqRqB6HdVdHcLu2VPmVl5VQ5yqA8dSCV kiJw== X-Gm-Message-State: AOAM532+TV5y6m3Fsgf/2LyrKYmYtzTECroR9p3zUSU51gskyD9GF6z8 zVt7UXeoPX691ztCgHogEHiqwynW2xbj9pn9cgE= X-Received: by 2002:a17:906:9b1:: with SMTP id q17mr2956095eje.546.1630578243412; Thu, 02 Sep 2021 03:24:03 -0700 (PDT) MIME-Version: 1.0 References: <20210714032340.504836-1-mudongliangabcd@gmail.com> In-Reply-To: From: Dongliang Mu Date: Thu, 2 Sep 2021 18:23:36 +0800 Message-ID: Subject: Re: [PATCH] media: usb: fix memory leak in stk_camera_probe To: Mauro Carvalho Chehab , Dongliang Mu Cc: linux-media@vger.kernel.org, linux-kernel , Dan Carpenter , Greg KH Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 23, 2021 at 6:11 PM Dongliang Mu wrote: > > On Wed, Jul 14, 2021 at 11:23 AM Dongliang Mu wrote: > > > > stk_camera_probe mistakenly execute usb_get_intf and increase the > > refcount of interface->dev. > > > > Fix this by removing the execution of usb_get_intf. > > Any idea about this patch? +cc Dan Carpenter, gregkh There is no reply in this thread in one month. Can someone give some feedback on this patch? > > > > > Reported-by: Dongliang Mu > > Fixes: 0aa77f6c2954 ("[media] move the remaining USB drivers to drivers/media/usb") > > Signed-off-by: Dongliang Mu > > --- > > drivers/media/usb/stkwebcam/stk-webcam.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c > > index a45d464427c4..5bd8e85b9452 100644 > > --- a/drivers/media/usb/stkwebcam/stk-webcam.c > > +++ b/drivers/media/usb/stkwebcam/stk-webcam.c > > @@ -1311,7 +1311,6 @@ static int stk_camera_probe(struct usb_interface *interface, > > > > dev->udev = udev; > > dev->interface = interface; > > - usb_get_intf(interface); > > > > if (hflip != -1) > > dev->vsettings.hflip = hflip; > > -- > > 2.25.1 > >