Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1623919iof; Tue, 7 Jun 2022 08:50:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdJeUMHK2Edoz63VDUYj0cLdfljDaL9xKmLIseGr2jpSBcABu5jf7kxx8p7hFy1mMu3lwH X-Received: by 2002:a17:906:9c82:b0:6e1:1d6c:914c with SMTP id fj2-20020a1709069c8200b006e11d6c914cmr27156638ejc.769.1654617013889; Tue, 07 Jun 2022 08:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654617013; cv=none; d=google.com; s=arc-20160816; b=Cf7LMofqmjQnhDQsit77GZDzzxFXXqcCsvsy6vl9bsmZCvTCDmE/3Y+o+CCFC3oV6d W0EZh0vthB4huKGVMlk60JrwWabIEhnGozDLFBmme2/09r4WZ10QV/uF4jF2LA3egIU6 xpWgMh8E7nhKSrajQ8q9sbOq/zGSUoCwiaNBG3wSehzCv4FLOyckM/U3cZoXH0As9EWy A5DGCNOnEEuA09/Fawy6Z6ITSFDjHn6Gg6sax0YotIWt0UEmn2WB5nxt973EJMgBIGWX r4yX6akLMTboappxdMUGZGIDsTLb8DXXmz8Nz86MaW0IHGN8wfQI+BWCmQGWVE3lffE4 xIyQ== 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=uQiTgrKp2j5ylnfr6ZLy6DqHacfk0nHCMZVLuHI5zrg=; b=Fm0cht9FaEO0xRGZ6FmPjkecYVvAE5GKRDA0U3PGUq1LovVRYemd1RKyvjHhNrg/5R 2XNR5JBEvnKVqOpwKisYrfEh/x1YhQ+bCZ8MuqOvO0ppDRwz1n9NR4ga522oXeRh8fus ct9BXE4KxgjI5Zv9fszYUzvmEnB6FUNmm+Tny1m7G3dxxvZ2BfS58IEAy+NAogtSYIOw rAsCHBybAk7YuzbbM4XLUv6PkZFj0hYeavh4TbY0bgR8DJzdfOS1JvzQ4WsGrds79iXJ SnT4ZyUIn2mzjSxJiSudtbVrRGmYUqKiTAdTdbBeQNI+t979CSZu0XteITjUh3OFEwhx 2XqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TZbf5La9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k15-20020a05640212cf00b0042dd0747a72si11415428edx.114.2022.06.07.08.49.43; Tue, 07 Jun 2022 08:50:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TZbf5La9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239633AbiFGMoz (ORCPT + 99 others); Tue, 7 Jun 2022 08:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235018AbiFGMow (ORCPT ); Tue, 7 Jun 2022 08:44:52 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FEC060A80 for ; Tue, 7 Jun 2022 05:44:51 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id y19so34950109ejq.6 for ; Tue, 07 Jun 2022 05:44:50 -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=uQiTgrKp2j5ylnfr6ZLy6DqHacfk0nHCMZVLuHI5zrg=; b=TZbf5La9krEQsFLerRcSFIYX1Q/ggP05UNSLG2d2k6lUkLydtbDJvUuwIh686qn5Bn fWT4JHjy0OK5221hYNKq9rlsA/UIpRn9VvOlX3NIMdGONUqodV+I1ycFDv/aoE9qiTFp 7wP9Qi9tgguDfaqBYWxpWWhU1B6TsTwPPrIXuT0D8aauT6O4DUyxg3DvOu4O0b98K/Rc vqPwXBhZN2tP6xAckRMggsTbmwrSeEC8zmI2VenpslEuL6StTBuCncDQEQf3Kw/YPNgh /8Igi0JtbftgiKmAqJt3uj+8L6ErFttxRBfc4yCUDEvRBwXsV0OylV8f45XtvpIAsLaY TSLg== 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=uQiTgrKp2j5ylnfr6ZLy6DqHacfk0nHCMZVLuHI5zrg=; b=XKPKrGua2e6zBqOVN/uGkh3sngg4GHYVGoE85m0RM6zFnj95Zqd7Xi2AQe09cx4e5X 759zwcBQhUEFAToD15RNXLEe40DSD2lwoRdewhea/D+yD0Dk4YgOp6OjcRKQsQ9yQnqc jHvE+JBaL4siYrNdW+oOpfbguJ3keKstQgMeevT5dPJjy7GL91q0OFv9wGJS2uC7xXyI h0ls4qvYCnSleCqkSgzDrZu4MGv+EkRTdSWxMdCnYx2o7mvkHOat2jyNY1f+EmQlPGQv hgVTwF/p8ZdZzm+sD/LIVe+QmoTN/bkbNzEB24IgDT3C0H8yfLeDLtedYUcZKqHlIRhI PuHQ== X-Gm-Message-State: AOAM533Xd6oHM8KhhEO/xVmNfR4bcuE8xfM/Y7WzYMBUpD4pD+Yy+ehm r9UWfGpZPbaVrgxBKC+pMYk0ow== X-Received: by 2002:a17:907:3e09:b0:6ff:20f:9b1a with SMTP id hp9-20020a1709073e0900b006ff020f9b1amr26736563ejc.679.1654605889604; Tue, 07 Jun 2022 05:44:49 -0700 (PDT) Received: from [192.168.0.184] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id h15-20020a170906110f00b006fe98c7c7a9sm7552672eja.85.2022.06.07.05.44.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jun 2022 05:44:49 -0700 (PDT) Message-ID: Date: Tue, 7 Jun 2022 14:44:48 +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: <20220607083230.6182-1-xiaohuizhang@ruc.edu.cn> From: Krzysztof Kozlowski In-Reply-To: <20220607083230.6182-1-xiaohuizhang@ruc.edu.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 07/06/2022 10:32, Xiaohui Zhang wrote: > 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: Xiaohui Zhang Acked-by: Krzysztof Kozlowski Best regards, Krzysztof