Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp311927iof; Mon, 6 Jun 2022 04:03:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAePCdfqxNFisIeOqLx3Bs6NFRXQwbvhGXEx8WZElong2w2Iq0iVvoUWmTdNDemwW5e6HR X-Received: by 2002:a17:902:ea0e:b0:163:efcf:adc7 with SMTP id s14-20020a170902ea0e00b00163efcfadc7mr23345533plg.145.1654513439289; Mon, 06 Jun 2022 04:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654513439; cv=none; d=google.com; s=arc-20160816; b=TW47lY2P6Km9VSDt/fvabi8Vj124JJHAcNc/RbpBn92H9QXUtT6kZf5u5oqmjdfC+u g4pFbqjLziAf+5FqRAUIxODBwunPDfhkLwIVyGUdVWY862iihxvKj3cLtaNNWtm6hlWB +Ck3JrIjZDR3iOagmaInS54SkaApQ8CuN/FkKHaeDpDWFb8HK7irwYuMT+1DztA4pVyl yvqZYhRDL3y85WCWKNvfkuYuhsfj0KJQC2uqixoNRFNDfR7DSk9fks0HGoP1xOmW1G1d rc1cJjeh1l5tCNrh2B+p7H2MzqB1+0m2g0O9vC6uke1shamAejFVYMC2xkGpLR+3Q09g thsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=GPYQ+AuyiK9k5AoDNUEqPMRN9dkEbEVU3yU8yAlgQoU=; b=Gm7e7NYIUfb9gzb409R+J0ugNzOIcNaLtSpLJPkiucPdFLVbN+n5FFDIV++kPUOVZ9 i7pdbDzu0EoInFxN8v+EhiJBF44ksydPkVl8kmx4ixf5HypgqjKi7otJ6p8TB7k20u1n t0m3g914sBP75jfsO6HQ0m8EOsapTeK/3DTjqmWrDIICS/hM+8YVkagho8rb0/yMTjgv 8okzxg0+fDuYsgwApFsvP5Qqrn+sISPFcADdaTQO5lRWONH/9B60jb5opYv7qyxWlyEB lDq6HtOzFQR7wp0Qq4GFkJi/lmnX7WyYQqz1Amgq8OADDp5mCsepoyVBuMp9Bgwh+KXc OojA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BEv/JTxR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i8-20020a636d08000000b003fc886ae30fsi19391979pgc.225.2022.06.06.04.03.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 04:03:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BEv/JTxR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 382EED19D7; Mon, 6 Jun 2022 03:46:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234184AbiFFKqS (ORCPT + 99 others); Mon, 6 Jun 2022 06:46:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234244AbiFFKqP (ORCPT ); Mon, 6 Jun 2022 06:46:15 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EADDD19C0 for ; Mon, 6 Jun 2022 03:46:11 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id s12so20896490ejx.3 for ; Mon, 06 Jun 2022 03:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=GPYQ+AuyiK9k5AoDNUEqPMRN9dkEbEVU3yU8yAlgQoU=; b=BEv/JTxRgpGr7BGlfYF0U0qsD54SzLKZzQkeX5W/aGHpqjBXxHNmd0E4Gj5UVWAJyX BDYIhO/7JRo43hEmkPXy/6XwVNk/Jb7jJx8KkBtEiyqGRjrDacUR1ZMjjSDd50K+1rHo hM7ihbV1mYd3vwkKEMGEvuLCMeAIGPNrND5jrOwTgOsT3XzOLqql8lOVC1kUi4bAgVgF NQQuzxXQzxDeAQqgAZuS8Vw1TDlqpI4/F3Yje1H0tUCsxRKr2tNfMGSk+7TN/hZbVByV WAv15G7nbkKPF0Uu3oGPvIamY+2p8Ek6iCmbOoyzbS7svPnnVHsdgwjPE6neMlakC+tz Np1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=GPYQ+AuyiK9k5AoDNUEqPMRN9dkEbEVU3yU8yAlgQoU=; b=k8qfs9utJ+ok/y/t7JYQ8kpJwIjPj9nG6M/dp9tC/1RLMkrd0QEPbpZMSRp7iUvrmZ biQo5GCJULQhFnwLaYAyz5AJ9dNagz7uzEuD1Dg6f4T1olNeyPdSFY0smHXpcs9/JUbY JC6tGSUVUL8CG06IS7uwROAPOpE2PzPeXQEFDXJHBh7qb10O2VXMLqfQYIfbfxy8IT8R SCZpfYH/Qh6pTgROrLCn+a4/NFjoVKhjfiVVy+7DVoL2UGivI0JTJU22VnqtNeYLMId2 +aS+FfBfamyJIf/ssjZTFaGxizP1z4CV9ImFvm1ADYif8ytZyooGG7iEt4YYjwqRzX2V 4nIg== X-Gm-Message-State: AOAM533o2j+9JFa3C3DpyvDvR1ylPXG++OCdBOD7+/UAqoNO6WDz3HfI M7i/31Nrn5PUNsDl+FZ9+w1grA== X-Received: by 2002:a17:907:60d4:b0:708:850:bc91 with SMTP id hv20-20020a17090760d400b007080850bc91mr21580631ejc.102.1654512369943; Mon, 06 Jun 2022 03:46:09 -0700 (PDT) Received: from [192.168.0.181] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id c24-20020a056402159800b0042617ba63c2sm8422723edv.76.2022.06.06.03.46.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jun 2022 03:46:09 -0700 (PDT) Message-ID: <80637186-e3ef-14c1-78e5-bfa6deec595a@linaro.org> Date: Mon, 6 Jun 2022 12:46:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 1/1] nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred Content-Language: en-US To: Xiaohui Zhang , "David S . Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220605081455.34610-1-ruc_zhangxiaohui@163.com> From: Krzysztof Kozlowski In-Reply-To: <20220605081455.34610-1-ruc_zhangxiaohui@163.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 05/06/2022 10:14, Xiaohui Zhang wrote: > From: xiaohuizhang98 > > We detected a suspected bug with our code clone detection tool. > > Similar to the handling of play_deferred in commit 19cfe912c37b > ("Bluetooth: btusb: Fix memory leak in play_deferred"), we thought > a patch might be needed here as well. > > 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: xiaohuizhang98 This name still does not match your name used in email. Best regards, Krzysztof