Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2633568lqo; Mon, 20 May 2024 11:22:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXv2OYSZSuKD8/0MXMWnAP9+SCEOAj9ZlAF9HmPGkLdzJ6ayq5uDg0Medv/67QR1Gwu9OMXznOZmEgPTFgKn6GH7vNHR8KPBVD28zZlqQ== X-Google-Smtp-Source: AGHT+IFmkK+46rtBDx92jca8gWXkxIx2amGby6B/iiYaoqHfbraFRYyAQrJqGOiWaBmg6nkbIgI7 X-Received: by 2002:a17:907:35d4:b0:a5a:7d28:54aa with SMTP id a640c23a62f3a-a5a7d285594mr1915212066b.23.1716229333311; Mon, 20 May 2024 11:22:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716229333; cv=pass; d=google.com; s=arc-20160816; b=QXFNZ1mVxWt/L0Wv62xjEBY95eRJy8m9ffnkTy8kT3s50gq59+YIwvuX+elu6+XZgs gc3n+qsdo3qMzwkh6TwEmc5Fj2n0GcCaQKoENJA7z6l56Wid40c+iKugsLGli4MO+smH cxJk63px6xDDMgE7Zb4sHGj3+CimcryF530F1vwE8ZQ8AxzkUwMfvtJZvxibw9S+0heg GqG2s+yGg3fUi12HzGvc9QasKjlt5fPaNn8WLSyI70MLKNDE5B6dUXeGSjeXQd8KC6/i PPruv+cEO7KXXlqDUJeCsLZXE7rBXpxZHx7+zhZUpPrdTzzOfeYR3bWFSrQc5P7ViPPN dBVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7YZGRlDufNLBdf8j7LgHBDC0+TF+aAbxcv+Lb+8IgAo=; fh=CfWbMakkJxYwRq0N5HyiuOsBuYACsRZ1mUNvIbUNfLE=; b=0JYBL4wReEmj1YM82cX4pmj7JgDAzm1KYT/qEy6DbL8uChhC+DPg9qUvRsfo823T3T 9k4XO7tikbw4F3WB63wLpQONPvvS3020y/ckv2/CwNcAM79F1Hm5uC8eKWkkB9lYTGco Wh8mu1T0wje1ZY5QgUkozMkfa12sHpW8poSj+5brck7bBKcPrT5XMkZNebWJB/83bQqS a3nj8MRbg1W2fLEPE3ImNUe1lB3Bzyh787W/4jSl0iunRCyKQZYtGecCbcbJtoCwi6pR IUcc42in0v7GJlivP2DqcCCeGi5mTM7KBy1LQDtW0C8kDl3bG8oTJNk399UIW8E2UT6i sCJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ssxcj8ZU; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-184059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b219a3si1349940666b.436.2024.05.20.11.22.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 11:22:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ssxcj8ZU; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-184059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C9BD21F21B28 for ; Mon, 20 May 2024 18:22:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47A0B137C3F; Mon, 20 May 2024 18:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ssxcj8ZU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BAB011184; Mon, 20 May 2024 18:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716229322; cv=none; b=nyU+Un/QqhAzVqwXZEMZQCKaE2uzViDTHTM+QJQ9AZEXt0ILnNWiEtzdzMMcBrwAMAU4JLErBWRP1FUWBRPGdRVlgygnUWGFbqaY9HpnJdQxZZdtbiHa5tk/CYMsKc9BOa9U6wcn0xCCr3x5qBRe6epxFdffAZGXXuWCA1H7odc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716229322; c=relaxed/simple; bh=mHdcg/HakJlaTvMF5es0bXyXzzoZrMTmlZbfpJXrl1M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QuVJG84gYtuz4725RO6nh/p+sW7qNs84XH3oWKNbo8RC1L2zj/O8O+hC/yN1EhlxQJe5E/PzjTiyrloRFjGojcn0VETZP1wtQr2Kdv21mqEjIyhJFWVNtJ+5qfTBdRSLm/LaITaWoJUuELZFcZENjYmgNwz4wv3Obhbs4kX9ef4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ssxcj8ZU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1CC5C2BD10; Mon, 20 May 2024 18:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716229322; bh=mHdcg/HakJlaTvMF5es0bXyXzzoZrMTmlZbfpJXrl1M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ssxcj8ZUw/mrBecf+PqapmnC+GXbepfhCVSR4QmcvIgFzg1Yr4RPf9gwYQ1d9IrUk uzMCtM7c7HHEjnvv6MQOxVF+nJqlDhdqFFgK0ykBHOGit3nVATOTt0VfKIKrMgwDkb 2A4gBrT5EjQn5mBsamVpFPtjz9PqlDVqWO/y6jNs= Date: Mon, 20 May 2024 20:21:59 +0200 From: gregkh To: "nanfengwq@sina.com" Cc: balbi , linux-usb , linux-kernel Subject: Re: memory leakage in ncm_wrap_ntb() in USB ncm mode with kernel 5.15 Message-ID: <2024052006-immunize-doorframe-0616@gregkh> References: <2024051922230825069112@sina.com> <2024051901-gimmick-cosponsor-f2dd@gregkh> <202405202232198531894@sina.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202405202232198531894@sina.com> On Mon, May 20, 2024 at 10:32:21PM +0800, nanfengwq@sina.com wrote: > hello: > In embedded devices with relatively small memory, if the transfer speed of ncm is fast and other programs occupy CPU memory, it is likely that the return value ncm ->skd_tx_data of alloc_skb() is NULL, and the code is likely to enter err. If skb2 is not processed in err, it will cause memory leakage. Please do not send html email, the mailing list rejects it :( Please read how to properly send kernel patches, the in-kernel documentation should be very complete, is there anything there that you do not understand? thanks, greg k-h