Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3231344ybv; Sat, 15 Feb 2020 14:59:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxDMPa3zIdk68RoR/vYL3TheuhVcXhE8JswphXdg4IDLIOACezGMWNNAfLEmyHDLkNmIPof X-Received: by 2002:aca:fcd4:: with SMTP id a203mr5719251oii.167.1581807593277; Sat, 15 Feb 2020 14:59:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581807593; cv=none; d=google.com; s=arc-20160816; b=uvb43bsQRCvtAHao4Y4rD8vTu4MwpQeBPLrWp1Iu6dWFMAwCGm5gWp6p/KSrfhZUEr tOsQfS0w7T9UuUtRsTWBEew+dOPYpEa9vdo6pRBmqP0MwIlcacvu66soX53nGfVaRatg i4EL4swYHquwaeM8Srj7GBtZoxPuK4dyrqxem76GXIG2gZGjg7HDQF9zTxTnZ3MMM4U4 iDhHjqhDUYjLcb4vrYxaJwMDBnt2eoKpZjw6pcZQn58e9NA2u5isiUhnFM6Xf0qJHJeq qWDQmOuU0/NQxR7L7OXQ2y3YF6LvRM06uijnQ5djTC2fL7hzz/esWSxs6EiR5YXtpdRO 77eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:references:subject:cc:cc:cc :to:from:date:message-id; bh=4P+HZFnryW1ceNCZu3gsGIqLfCyZejArwm8tNC7DVtI=; b=EYgABJWEUS2po2cnmmfJijBYjMkfjPU5mXzvunTQVpHK0Fs7pf4LnklebF5bPIGxJ6 hJbuqriKWUFGfPDifWxTLXNyllzFjPlVRPsB3R0JimdOTZm3q6agNQ4YONmR+YK9aSG5 NAu2fVYkcnaxTk9rfxzRj6HA3eAh4f3rfj+Kbd6J9SZHdJCVU9VLLHkGLFrN/zuUu8BX IXlFkjN0+fNV1KpsIGRLFHBD/AaibU8qnZ94m5nDlTYB+TvGQk/1K5im9LV4fOckyUh/ YzrllAsh9Us+4LG3oej+FS+FoLTuznEvlpsmSRNDjRKOGYzfHsetEYB9CX4yUlqqaF2o eSnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si5286265ota.300.2020.02.15.14.59.40; Sat, 15 Feb 2020 14:59:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726638AbgBOW4C (ORCPT + 99 others); Sat, 15 Feb 2020 17:56:02 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34142 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbgBOW4C (ORCPT ); Sat, 15 Feb 2020 17:56:02 -0500 Received: by mail-pg1-f195.google.com with SMTP id j4so7057327pgi.1; Sat, 15 Feb 2020 14:56:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:cc:cc:cc:subject :references:in-reply-to; bh=4P+HZFnryW1ceNCZu3gsGIqLfCyZejArwm8tNC7DVtI=; b=KOU8QSC5/IgZBgU3hw7iWSCy2BMRQRa322xhpjk3xFhBdzxwwdHfaZ9BWqqt3ThEt7 lTW+9nZcnizorgt9yuv59sK0OM/EA59B4t3FCFF5y5P+brHyuemXgXBZlERprBwj9E6A wDBbux+HorF38/jEfgBR+0pnXs8id5boalLsjD4gTYOY+ENzmc+EZEaItAyZTs90SlRj cQgBwCuOUt45yCXQxhb0T5KzmJNccWuDowIp8UVxH9UqVEzQm8D4SQbndXP+pmfcoIPe spGq4gqIsNwXTQjRd6+e2gQTbPfE2sMMKB9FdcjmFpjmco1GqJvaHtas4/8p5g2sh+sg 9cUQ== X-Gm-Message-State: APjAAAUXpvZOxp+ov+iSKW2is8WLy2X+QAs6ttgK/hLgGGDNNyq5gdtA 8ajIdAelVoIz299Ayt4l9f1A5mgTsEomoQ== X-Received: by 2002:a65:68ce:: with SMTP id k14mr10111977pgt.336.1581807361654; Sat, 15 Feb 2020 14:56:01 -0800 (PST) Received: from localhost ([2601:646:8a00:9810:5af3:56d9:f882:39d4]) by smtp.gmail.com with ESMTPSA id a10sm4762684pgk.71.2020.02.15.14.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2020 14:56:01 -0800 (PST) Message-ID: <5e487701.1c69fb81.107e8.b7f9@mx.google.com> Date: Sat, 15 Feb 2020 14:56:00 -0800 From: Paul Burton To: Christophe JAILLET CC: ralf@linux-mips.org, paulburton@kernel.org CC: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET CC: linux-mips@vger.kernel.org Subject: Re: [PATCH] MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()' References: <20200202201922.22852-1-christophe.jaillet@wanadoo.fr> In-Reply-To: <20200202201922.22852-1-christophe.jaillet@wanadoo.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Christophe JAILLET wrote: > Pointer on the memory allocated by 'alloc_progmem()' is stored in > 'v->load_addr'. So this is this memory that should be freed by > 'release_progmem()'. > > 'release_progmem()' is only a call to 'kfree()'. > > With the current code, there is both a double free and a memory leak. > Fix it by passing the correct pointer to 'release_progmem()'. Applied to mips-fixes. > commit bef8e2dfceed > https://git.kernel.org/mips/c/bef8e2dfceed > > Fixes: e01402b115ccc ("More AP / SP bits for the 34K, the Malta bits and things. Still wants") > Signed-off-by: Christophe JAILLET > Signed-off-by: Paul Burton Thanks, Paul [ This message was auto-generated; if you believe anything is incorrect then please email paulburton@kernel.org to report it. ]