Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3709307ybv; Mon, 10 Feb 2020 05:06:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwb9C2Ie30AO28HvZ0pLNoc+pvgGJp4LHg21oY3pqT4ZD8ZsCcoSYXP8XWdoSQbWUhLIo9x X-Received: by 2002:a9d:6a90:: with SMTP id l16mr909308otq.353.1581340005031; Mon, 10 Feb 2020 05:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581340005; cv=none; d=google.com; s=arc-20160816; b=S/2FZxufkLPcVntA8370a0IA1diPgFMRPBtjAZTJPYO6zD3QU0HDqaFzFnk0ITVPUF Fa9fXLmPE8gPfTyIgmwCLKBPP1X+5kHMqrRZ9M4ueXOo/0F6olHy19kiD2rOWgXQk2So Rasqg+47kXdKEtMX+n47IUw5GeSQk6q6Z3bgtmDQ5VQklz0QhpV2cpb0LBO62XEirjqt Y+/xnJPIaYVjk7TFRdoqX6PQ0x0Na46tz6+DEzxdO9yaWwKR4UCy7YI/M51TSOTSO6c+ 8wqMOAbnWRg97YsBc1cy4LzBq07H/FYwYbd7V0YP6Fmowd8X6VFCNvsOMXM6ig0gfVSH Xs6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KDsY/iboTiTeszGoXBX/FT4XunDtMnBcGEUeYGzhEkQ=; b=PWZ/2vnZv/oaZr8Ts5hLCuXIWUrwZ26Y7MlQ6CsU/9u/8AiINxrQwputSc9SPzp186 8Fz0ZH8regqP1y2BvljJIZ6QSJLTBlTfj4AQhNBb7J7E0noxonOheiI6wVx9i8WnsXvT P28uPFFDbQBB2ykj3K+LWvjfdZJmhbfGqLQ9QHtWsjjikjzCY7XgxJXLapzdG5aszkwp fXzDBqFfIgkawY8iz32ynJRlEEvWTt4uTxZ+LrvI/wmgTQ2Uq5CVcYWTTdnO7V8x5zc1 zCS7T1jcvyjzK6gy5ecYtwA7IEClmFB2Xdc+w+Eszy0ThQ77AcXqLpKs1pgvKo4aBlGy SdWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kN13iowj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b126si165074oii.72.2020.02.10.05.06.32; Mon, 10 Feb 2020 05:06:45 -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; dkim=pass header.i=@kernel.org header.s=default header.b=kN13iowj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbgBJNEr (ORCPT + 99 others); Mon, 10 Feb 2020 08:04:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:39730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729077AbgBJMkM (ORCPT ); Mon, 10 Feb 2020 07:40:12 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0AB072085B; Mon, 10 Feb 2020 12:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338412; bh=XLsH/og7nds9+7JWjxVwvyiIrHhkqGnfk/0z9Ma8ezE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kN13iowjcmWPcLJg8fj8Ik8NRqrvBgCNe0ZQbcnVH20vao8g7jPoejSO8mWiNlbAQ OZRV4Xzbi3Dw9u3nANy/N+0U+d7N/ZKZd5lMxyflZLEP77BWzCADy73aPnOLPIc0jd aSsXUQj7iU1H1z8uy3B0C/taCNaZCmvjRCH3YkCA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gilad Ben-Yossef , Herbert Xu Subject: [PATCH 5.5 115/367] crypto: ccree - fix backlog memory leak Date: Mon, 10 Feb 2020 04:30:28 -0800 Message-Id: <20200210122435.210203228@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gilad Ben-Yossef commit 4df2ef25b3b3618fd708ab484fe6239abd130fec upstream. Fix brown paper bag bug of not releasing backlog list item buffer when backlog was consumed causing a memory leak when backlog is used. Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccree/cc_request_mgr.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/ccree/cc_request_mgr.c +++ b/drivers/crypto/ccree/cc_request_mgr.c @@ -404,6 +404,7 @@ static void cc_proc_backlog(struct cc_dr spin_lock(&mgr->bl_lock); list_del(&bli->list); --mgr->bl_len; + kfree(bli); } spin_unlock(&mgr->bl_lock);