Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp454206pxu; Thu, 7 Jan 2021 09:04:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUsrb1EU5tErF+ggsIURVxVT0E6T1JMQ84kmuElANIhXeUxCZD+DmZFVQizZJipfa0oFOr X-Received: by 2002:a17:906:30c4:: with SMTP id b4mr6922484ejb.456.1610039058771; Thu, 07 Jan 2021 09:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610039058; cv=none; d=google.com; s=arc-20160816; b=okuv/Bj1PL6RbG9kb4QoSrWB1pBoN0NyzlzowZxOTFP+icCUa8gLXVbAxkVkkWJSLI qGbY/F9Csx6KRlhR6faRQiuqKWeqT9xgQaSHtSCZzd1APy9HiL2ppv8mAjIZitKiKVcS Yf8IQAxjhWrmuyQETxWaKpjJHKgyqC5jfWAFH4nWMwapNCzRJXiTmn++d3/5Zpbr3/LS Nd3R2llBYKu5cAtq5P9Az8lG3uiYjzBTDSCC/p88/mXGSrcihR/o3INaC9fscCqEY+S4 YwrRMZGjsDJrIlECTc+72o+qZYxG+wZhP3PL9ZJJpAbdrN6jomIhW/Xl1NovH3jCa1DX D7uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=e6QzQXBlWfecJhgtXdVXCWBkESw5K/fN23w2JVJbfkQ=; b=j/8PirdpDQSe/dIl0co6lnHovOm4ukGb7D4twf7i4K531Z4P2B9nMRcBONtPxt6XYo z6DLTcNmOKoc2xH+9KsYbdYopbOfLBGuzS9Ab860JDr4qGIPi3/z59OcMOmF0gIRz86R uDQ+BmXd7UKz64xT5sVJR/RXstozVFritNdU9Z2qcjhlEAd8Dezxt844SIwtthU0zayU Rv+jvOTXUOUnkZCJ7zSCfNh+jW7EZBT+nYf18u+ogIWrqZkfiaRnVlkpPwDOGH+XyHwP pJ9//Za8jHs1/zeiBZk+uCAwRl7A/CwddRq05NSwpQdhWbwZklTWeqNJf5u96vkUnuvV mBAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="I/I8LHm/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si2402425ejj.305.2021.01.07.09.03.53; Thu, 07 Jan 2021 09:04:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="I/I8LHm/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728713AbhAGRCZ (ORCPT + 99 others); Thu, 7 Jan 2021 12:02:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbhAGRCY (ORCPT ); Thu, 7 Jan 2021 12:02:24 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21706C0612F8; Thu, 7 Jan 2021 09:01:44 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id b2so8460264edm.3; Thu, 07 Jan 2021 09:01:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e6QzQXBlWfecJhgtXdVXCWBkESw5K/fN23w2JVJbfkQ=; b=I/I8LHm/F9D2H9UNGPQ/ArnEaifDJkI5QyPBuyZo9G1t2BdinCsFbQBvRYaamRRMii ayz7yIPZzgUgp0fOdcWtBC73Si8E4ky3c1dytTvzziyxJnIG0Vw2DRK0XRgN3mf9tVqf 6wc8L/QiQeHBeOeEB+wsQdIXGLrOkTHu6lFwXqpnol3WLckROsFaMc9jMDYFW32T1qiU LD2OS0vs7HYIQCszVqhbnOHW35HR3fdAqcUoXXNU+X3pP0yfH4atVGje2cU++PSsQWY4 CdOA9+DzAJlN+j8rs/oEVQ4wezZjrNYsXTOpPVExhyqcMJLMlxd9wDZF10S4dUxf+KcB FA5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e6QzQXBlWfecJhgtXdVXCWBkESw5K/fN23w2JVJbfkQ=; b=aiC5EVv4hoSxLeX/sBtHeBajySio0IojIFcr3cOEuBOiLuDC5Lmpq8hrUydOwzPQe2 NY9T43i1wOcyc2i2CylkTj20sRSUcBFtTeEqkjBrBh+661KHpLvpCxEmvCr3s2L0xjZu PHWtnOkDZxDQDZ49dc+a1bLUWjihgDDrjH+0lPb/26+L7SDd+mbJqjSC0PsrmyNzly8+ NUGmDNzcJjdq1HYu/LcEpGTAmEGNJPgOsRMlDHeUujnKbXdodgj3vMwfYEEKNXiBOQMU 4osijlgA46dkfQjYolMotMSeIjrlpZp5CAYxMzKIQZpjKYzzgYZBLDIaQ4Knktjs167k KjWg== X-Gm-Message-State: AOAM533AkLgZifPk+J/0B5oOCVRWihe9T7Cf42Rnm7TM/iWWW4m5Ea2B HZc9iWoFqu8u1d3x/WNIMvyM66Kw5lMFZrNRqAI= X-Received: by 2002:aa7:ce94:: with SMTP id y20mr2305433edv.361.1610038902892; Thu, 07 Jan 2021 09:01:42 -0800 (PST) MIME-Version: 1.0 References: <20210107123916.189748-1-colin.king@canonical.com> In-Reply-To: <20210107123916.189748-1-colin.king@canonical.com> From: Sunil Kovvuri Date: Thu, 7 Jan 2021 22:31:30 +0530 Message-ID: Subject: Re: [PATCH] octeontx2-af: fix memory leak of lmac and lmac->name To: Colin King Cc: Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , "David S . Miller" , Jakub Kicinski , Nithya Mani , Linux Netdev List , kernel-janitors@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 7, 2021 at 6:11 PM Colin King wrote: > > From: Colin Ian King > > Currently the error return paths don't kfree lmac and lmac->name > leading to some memory leaks. Fix this by adding two error return > paths that kfree these objects > > Addresses-Coverity: ("Resource leak") > Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management") > Signed-off-by: Colin Ian King > --- Thanks for the fix, looks good to me. Sunil.