Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp289865lqf; Fri, 26 Apr 2024 06:59:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuQKQdy6q6S7pAAZuYrkIplBajIohqHAjmC/jfTAobslLnnLmLYhKAhsQh+tgBSMFAHpxLRXjDltLq50bPtW/sQyawRC4zLT6bjq/Spg== X-Google-Smtp-Source: AGHT+IG4Qph0b5t9EalMVOoZQuqDnZtrrx1cRydc54woer7uKlmzc4XimAW/P/YzYdiMRz9hK/Yv X-Received: by 2002:a05:6870:f22a:b0:22e:c787:5fa2 with SMTP id t42-20020a056870f22a00b0022ec7875fa2mr2560676oao.58.1714139967522; Fri, 26 Apr 2024 06:59:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714139967; cv=pass; d=google.com; s=arc-20160816; b=GZsiirEnGy51W2WRWClNsdz5If5ZDDwQ5ezbFUzdO7oc98i4baOHj1kFLmERvZkikj b431G3ILody1OoK7kPysyh7RYqATVZW8CVa5a12RWXuTAB2DwWBu0B8ccafqL2Q4EbyO U6Sq+K1mKAwmI9myEu5/lDpWjgH9bSuXH2fE0XkHYurB7U0u/ij3ZCFTjqBT+1/iYYKw Fg6DIgvv/1PiKoLkxMm1nVSp6XQcskY37bJfy0AGeG3Kagz9j/YetsCQTtk76B6MwLQn dhiByWOe7SXla63gMeTN+t/Wu3l1DRkmt4vPubRiAy35bRVZ/rEVkG1wX/OsbnFS0pNC RY8Q== 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=23az0yAs//louN2+WYAw1wc+f8IT3qxY9VwDxDF/ZNE=; fh=4max6uvXoVMHbSzE/rWxHJlJiLsg2iFuNooYJaHmQQg=; b=oUi0f913rDcuNZ2AiCviTkWCRwUd57STJeOopaaywCERJF9xVgfRkYkPbnQCRBnS4z 68Zw4MfwpjNfOdKpScvRlm/C9Zen91+7PKhZhKk3iX9bnVMbc8pyH0kUsX05wN2UnIz4 HCavb7I0puDSeOsnVHX3eFb1eGhG255HUpecQ1k1Y3sxDmXxdZyhvA2vLHvYXBL2+x9k 5LBHKo7om1aeKg2R4RlUFTGFO/oXMlHqS+mz8RqZNAwJnIlOyZ7vUWscoD8nQWUWhoHe KhMRudVV4b73K/mqUWFsjaYhDKOC7InNblRbrurdOcvhade+Mm3iAPE6354kU7jwwRAH Ffgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wq3WFSfS; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-160108-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160108-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p18-20020a637412000000b005f8072af07csi12062396pgc.635.2024.04.26.06.59.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 06:59:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160108-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wq3WFSfS; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-160108-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160108-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 431B928205F for ; Fri, 26 Apr 2024 13:57:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 585FC149DF6; Fri, 26 Apr 2024 13:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wq3WFSfS" 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 5B8921487E7; Fri, 26 Apr 2024 13:55:43 +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=1714139744; cv=none; b=XfD5ZqITZDvWhaorX68U678J49cvdEQYGFY2SPdhyiDvH9Gmx4wjXDq8OQiERk45oJLKh8yvOztfT/XQbYRgZ81tHuClH+42NjXbWlRTr0g+B1OtIY2D7dKCw9+03vlYpSl6jyMiAmhRS+ZhDNyz1gDjpwNml0zYaGyXg2FnQ0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714139744; c=relaxed/simple; bh=UbY+ExOiqPp3H3piUK3cAIwA80EItQL1YsmY71g3gIQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KGhp/Sg2V8grGu/JIvkue8zucHwwVxqdPUz+mOnijDaD+1tQlgKUzDrhvcxOZwYJNvlOvoRFD04oJNxeDS4YL6snoPlti9SPZhbvWCeK5pT8n79jwvQgozg0mAQ0mhHVbPRls4uJ6vmRGojgsThC0IvVMFRpium3Tdvp21eJd/A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wq3WFSfS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D865C113CD; Fri, 26 Apr 2024 13:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714139743; bh=UbY+ExOiqPp3H3piUK3cAIwA80EItQL1YsmY71g3gIQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wq3WFSfS2sElJ7Hs1e/HlvhMlSIefIBTNkW/FXDV7NZp9kYLCdddl1JH8flEXyQQZ FBitLBASbbEpo80pF+5jodBDqTzniulOry9y46lTKQwSdwZdhIbMutmsFJQUUyTGFm ADYvITYipGpV/rnDc7gqdxep4lwBnxz6bEc48ODk= Date: Fri, 26 Apr 2024 15:55:40 +0200 From: Greg KH To: lumingyindetect@126.com Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, ilpo.jarvinen@linux.intel.com, andriy.shevchenko@linux.intel.com, jirislaby@kernel.or Subject: Re: [PATCH] serial: 8250_lpss: Fix memory leak in lpss8250_probe() Message-ID: <2024042652-even-mud-476d@gregkh> References: <20240426133959.1294012-1-lumingyindetect@126.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: <20240426133959.1294012-1-lumingyindetect@126.com> On Fri, Apr 26, 2024 at 02:39:59PM +0100, lumingyindetect@126.com wrote: > From: LuMingYin > > The return statements at line 347 and line 351 in the lpss8250_probe() function result in a memory leak of the variable pdev. > Add a label named free_irq_vectors in the lpss8250_probe() function to release the memory area pointed to by pdev. > Modify the two return statements mentioned above to jump to the label "free_irq_vectors" instead. > > Fixes: e88c4cfcb7b888ac374916806f86c17d8ecaeb67 ("serial: 8250_lpss: fix memory in lpss8250_probe()") > > Signed-off-by: LuMingYin Please stop and read all of the instructions provide, and then go read the "how to submit your first patch" tutorial at kernelnewbies.org and compare that to what you have been sending here. You also keep sending stuff to quickly, patches should be, at the most, sent once a day, and even then, that would be very quick. Relax, take the weekend off, and come back next week with a proper change based on the documentation. thanks, greg k-h