Received: by 2002:ab2:1c04:0:b0:1f7:53ba:1ebe with SMTP id f4csp141653lqg; Fri, 26 Apr 2024 10:57:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXo/FamYTHPrGqLGKJZVjlTPMQIJ/Mf7+YSxEw5lOAX32Qc3BXRsMA7FUIBupyHtNfsHAlxAMJpIRBSyY8qbklii5COn2hREk7DRZtbg== X-Google-Smtp-Source: AGHT+IFnp1faNjCv6mMZgvJ4Q7NHzsyZmJESeJoZstGe8Ix3EBAIDDbIgd5lZHOD5iMZtG7+BMoh X-Received: by 2002:a05:6a21:8801:b0:1ae:42f0:dd40 with SMTP id ta1-20020a056a21880100b001ae42f0dd40mr443243pzc.10.1714154272374; Fri, 26 Apr 2024 10:57:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714154272; cv=pass; d=google.com; s=arc-20160816; b=y7SB6lw7Tt+W/hSeBQdf1FdfTvxDCBrNd0lXQp7cDfkQ3rAJoCeBgJ6C68v+/tg66B fNFleU2YoKez2seheQQa77wlWvXBh8VM4Hc7yhNHoaT5QLw/sE3+/qGjK/I1QWyxfTA1 ZFeNqH+0wx5M5efYN7CQGRvhlZ7GALsAmNY/Pw0u+/D4keN/E5G45eEn5gZkjUPcHnNT QbipZfyTuhqJBAjyEXT1v2lIWnHnZl5TL0zqcZ6VsF3vw/fRIgbxt1Cdt16yd/0+NoTL 13GzgSweJL/WPV2xsL+PVIbzcmx8YsnkGAEzTlhpPc0HdYJsn/P5c8ig+86BIGuubJXE Alcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=gHlgxnKh03tmx0j9CP03/JUFs5+VRZQAxM6G1EHK0XQ=; fh=qWAq1g+H5AL5IGLHwBuoV5w+nYrMvALSWhxjclY8VdU=; b=HBoN5ofvLVwGC/Gf7gwhDSH0wn2OcTDDFNVxkJSb6XIrarM3J43UUzK9WdA7wgszzz Ogk5uYcIIG5+Qj4kKyVjF+ZrZ4Kg67gyrTUC1dTiPUJ8Tr01xxWgeMi4oWQT8TgFZEKE lU/b/rt1OJWS41xQhnpGmMDtc33f4ZofZiDmbFhYy4XkaYt+5uUpoNQqWp+UlqzYSW8I wKAowgo8dd22xuNRpijoHHfhaEme6/eBmHI7gjats+yhkyQSz9eokQmUORn1W5x75t/m ICpKEasyiOi1c2ZgE7ksCsC/yY8wI6INcB2FOJls1L35S+ggWbcQhRaZrOB9HQmLXMWA kcwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AyuzjRfb; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160081-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id fi30-20020a056a00399e00b006ea9ca4970esi15780782pfb.343.2024.04.26.10.57.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 10:57:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160081-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=@intel.com header.s=Intel header.b=AyuzjRfb; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160081-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 9DC56284412 for ; Fri, 26 Apr 2024 13:48:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 059071482E4; Fri, 26 Apr 2024 13:48:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AyuzjRfb" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 C434B13E88A; Fri, 26 Apr 2024 13:48:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714139305; cv=none; b=Rtmdvu/G8R/QwruTZSYPAVSliVeLfB7qLuKt+qbSPXTVWoc0/dm90gVxKYX94laUPO0F7hnEmlOOk6cr8DmuSdGuXJznMy4iSDJbkneJThRHl69iqRaT0JntFpHvn2xX716XwSp6/TqA0x/l+J647w1T25Ju0t18y/+so4uBfls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714139305; c=relaxed/simple; bh=CVt098XMcqJuxlB7KCSTMK5GOkDwkqvnGsfBrELUvl0=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=MoUu1byV09ZT/CEDQK3W1VGqyjwStqehwIOG+N6E3JgOnydtD6pEq4HyH3sWmoeXfMjlHJsW1hGzuAB2yVyarVQVB5JU0IL9NkJsVgDcXGKSoFzrz/Z/Xnx77SOtw1K+cvyK9bBgdmKPxy17ydMv1c15RCsPsi4KDJHzIcLW7Cw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=AyuzjRfb; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714139304; x=1745675304; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=CVt098XMcqJuxlB7KCSTMK5GOkDwkqvnGsfBrELUvl0=; b=AyuzjRfbd+JFevnYDN9bnddZnbsK/+2ij2RGJH3ajiU5uwkjK2hhX4Ub s6WVoM0qqhA/eLy8UPZFpzFH/qUqGJQYCQ41v7NrKM6YnO8jNTzomDp3A b1mbTyy8mttwdPnTfha7Q9NHtV5iGM7S2mN6KRc3AiBL+002Lw/tm7Im0 U2E8j28c0+7WAzCUIIK2FL1psv2zQUWGjj0BzWVa65XLMgC+qMVd14v2y /oVj1onL8O4J43ypuIgc/lgmRfCnFgncW2lO8L4zsT1EjaJjPmbNVdnrx 2d6/f8xsu8YU0js6oucdCgHo53IHXi6JYeorhoJPeOJOgruJI0ihr3p7O A==; X-CSE-ConnectionGUID: ret8E2JXShitcXHCr6J3cA== X-CSE-MsgGUID: g7R29V6mS7GLRAE3nbdzLA== X-IronPort-AV: E=McAfee;i="6600,9927,11056"; a="10036352" X-IronPort-AV: E=Sophos;i="6.07,232,1708416000"; d="scan'208";a="10036352" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 06:48:23 -0700 X-CSE-ConnectionGUID: MzaPGJQ2Q9OOJ4tRj/Or5g== X-CSE-MsgGUID: e1tdIDEzTDaQPwDE7HIG+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,232,1708416000"; d="scan'208";a="25923680" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.43]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 06:48:21 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Fri, 26 Apr 2024 16:48:17 +0300 (EEST) To: LuMingYin cc: LKML , linux-serial , Andy Shevchenko , Greg Kroah-Hartman , jirislaby@kernel.or Subject: Re: [PATCH] serial: 8250_lpss: Fix memory leak in lpss8250_probe() In-Reply-To: <20240426133959.1294012-1-lumingyindetect@126.com> Message-ID: 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 On Fri, 26 Apr 2024, 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. Also, this is not a 100m sprint. Please leave time for people to comment on your previous submission before sending the next version out. People are from different timezones and have other things to look too besides your patch so they might not be happy if they find 4 versions of your patch in their inbox before even having time to look at the first one. -- i.