Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp110343iof; Sun, 5 Jun 2022 22:41:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOnB8FrFBTh8YAhZOvnsK+slz1TaqCTgzTTpxf3VHOewDwNvxru8ZgVRYGMgSVhXoTf25c X-Received: by 2002:a17:902:7884:b0:167:4d5b:7a2f with SMTP id q4-20020a170902788400b001674d5b7a2fmr15034663pll.18.1654494112171; Sun, 05 Jun 2022 22:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654494112; cv=none; d=google.com; s=arc-20160816; b=jDJIiyhfZsNODdyXDv8UJfm1yyvebXlZ0+8qZlHIn7na30RbHDa9srPenGJ6GuvdzF OzY1J7GcrT2vI8Qz5nqF2lfEZX/v9o2asOaeJewHoj3zaAGRCSP4UB8XhDXEJnSsdhn7 Ya6KptsfOXU/hQhYgRlJa2QRIXtZMJj6ZlOjEG78UTV40t5ijQA8F/WOR5Nj0N74DjUe yIk4d0da/CUA1EhcTcBbjJrvgns0zdeW2iQo/FUwq4/PWZJ3QBuUZeCY/6yBEjyvP4II m7elZz8Qy/KQlnj1k2BrsdoLwO7GCduXKdsEn6jMceB3Lnggmwswk9HUlz++QT5XOMa6 v4fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=+nwNBJWyRJ0oqWPzMY+az1pih+KoQk9ht4fzeOtLtN0=; b=Z7QkTFSgAuTJXY9Zs2iXTAGXxNkSmT/QuTQRRNV8xjvI6E/9jpC4R1/ZfSOkv/bUAq DWWfbpEnVpcNEvm3ACO7c9g3EFFdL9a+Ft+BpGPdNirmy5sf7nzX31fdTi9KxVWsG7C/ 0dJzr4sVj3MtIq50nMRfPYC122vyLKtOLES77OCDwqReqBweckwsOSISsUK9BB+fCPPP Ku2aXQKhi3svQIqtk30SqBo/u0aJ/it+mjsbos2PXaDkP37zqm+t0epSnR8l1nG8BuiO XMTylubYn9hylt8UAZ5Db7u1Hh86NKduwQhPvFo4dOcxEtv9HErPlfL/PtPvo2XVJPnI Nt9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VfyUyfNw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 5-20020a630d45000000b003fb238f8ea1si18780587pgn.609.2022.06.05.22.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:41:52 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VfyUyfNw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6A43C21E303; Sun, 5 Jun 2022 21:33:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350008AbiFDBdX (ORCPT + 99 others); Fri, 3 Jun 2022 21:33:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231236AbiFDBdW (ORCPT ); Fri, 3 Jun 2022 21:33:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2DC015FEA; Fri, 3 Jun 2022 18:33:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 89E1261618; Sat, 4 Jun 2022 01:33:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF421C385A9; Sat, 4 Jun 2022 01:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654306401; bh=GAofHUOFsy2k8fM1PqdU/rnt0EVa7n/zzBRIVpbGlCA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VfyUyfNwGhC6rg8WLSXtVnibaWr8VJ7y7tWb08qRi9so4UVINLWAKuf8pow46q+xE DwyZRL7eUphwLsdSY1IEe6+CqL588+le7R+CqD2p0mTjlhMbsQ0kJya2ElthDINoyp Ho3Hto1FuW7Lm/oH8XOxdYW3yfqwyLLBAl1wQOGjq2Zkh6qVCDlqsH3b1GGc1TGe2D rqyKjOmz1PWXcU2Xt/Ana0Lqpvn5uJaRgUVbSoVT1SIlLZxHYmepcNZJ5KU0s9qRmN m5QNmSWmjjOru7RNXGqu3lUf8RBAb0WHLXy9nntP0Aus6l3j9Pt+QrUkv9SMuXvJP6 rgGCdBYsaxMwA== Date: Fri, 3 Jun 2022 18:33:13 -0700 From: Jakub Kicinski To: Xiaohui Zhang Cc: Krzysztof Kozlowski , "David S . Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hifoolno <553441439@qq.com> Subject: Re: [PATCH 1/1] nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred Message-ID: <20220603183313.50aa47e1@kernel.org> In-Reply-To: <20220603163127.4994-1-ruc_zhangxiaohui@163.com> References: <20220603163127.4994-1-ruc_zhangxiaohui@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 4 Jun 2022 00:31:27 +0800 Xiaohui Zhang wrote: > From: hifoolno <553441439@qq.com> > > Currently usb_submit_urb is called directly to submit deferred tx > urbs after unanchor them. > > So the usb_giveback_urb_bh would failed to unref it in usb_unanchor_urb > and cause memory leak. > > Put those urbs in tx_anchor to avoid the leak, and also fix the error > handling. > > Signed-off-by: hifoolno <553441439@qq.com> hifoolno is too close to "Hi Fool" for comfort. Is that really your name? Also the patch doesn't build.