Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2072445ybp; Thu, 10 Oct 2019 01:40:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpB+aG/S+lZtVjc3dpzhHoVoDcxfpHmq7ezjSCoYliuigem4D15/g2ivXG/BYhXU3U9WqU X-Received: by 2002:a50:f198:: with SMTP id x24mr7378776edl.238.1570696845157; Thu, 10 Oct 2019 01:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570696845; cv=none; d=google.com; s=arc-20160816; b=n8oQzUWZcmuW57q4NcRwFCJU+KONAqNkROr7+JCJ6VHEsNGmgw5Yz6R7Zj6x1K3gk2 SW9AsDC2GGFUn2/3/ZgNGraIlnb0dwqbPK8NAkRrGUht2q4F3NdWpjIekLYH/Rg6fLA+ erHAPyHHDEo1cfvHe+yfxJmDh41O0p5hdK1gF9YBZUibfDiQ9pq+MZYoDw3zaKj5XWYZ eyaYPJFab5PghT0IqQpKafncNkGDPTGIhgkNba1Z85TqNL4enP2V8HoeKIk/1/pbQXKV bMGxgj8rb9diqjbxUTtGLR5rYWpctBy8+ROQYYZMW6xoYgc/B8vS0Qgy5//HnS/5hZWe TQ7g== 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=K92Anm6beEHx3FgQnZMG4gp1B8m0vnwFnTbZNlW6ilw=; b=E7Mo73Xk0quQk3hp9QCW4NJQZxY/tmdxp2+/Cc/r/5gv6bJh5MDjgizDo3K675c5bb GLOgiyVh6OMexWjKMFTqQjosMpqtfdCw1Sx1I1sf2hXFas74WHnfxTSPq+zNYEQTF8N0 ZdTCQzmXSvfJyRM5rh0E8IuERIq6CcXacMv/wz91Hhq9BCCpxgwFy+ZYTnaxJlwE5pPl qYWLeboAKfL7LdJ6OFLSfcDf0ybD+9oxdJapgykZzydh6qTKXMFmY5qScWnhUYOKNUVT rcBrr4wdHFWhi/Fk02c7/2fePPv4Azp6TLhQe3mio1PTsu1DoATuD2Es4QdV3gRItMiY jwQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZjkaaOlU; 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 w12si2785254edx.223.2019.10.10.01.40.21; Thu, 10 Oct 2019 01:40:45 -0700 (PDT) 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=ZjkaaOlU; 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 S2387839AbfJJIjV (ORCPT + 99 others); Thu, 10 Oct 2019 04:39:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:42652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387796AbfJJIjR (ORCPT ); Thu, 10 Oct 2019 04:39:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 2636621920; Thu, 10 Oct 2019 08:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696756; bh=VRTYunhUV9afr/tTCD6DJ8MgAzp+H1ZkWoEb2EMleVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZjkaaOlUfO48vj4nCCNmMprqCG0tflfntR5jrhNfkth0esSEqm8N7BFFpsGX+ppYm ct6ExSegNWp0x3Aj5EBAs/lJGhFoRrs20go9qIhk754k2eMUblBn44It29E5xM84vK bRX63s+8MjEY6nMjotph4anS4llnO17hHFJ/eTNc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Herbert Xu Subject: [PATCH 5.3 042/148] crypto: cavium/zip - Add missing single_release() Date: Thu, 10 Oct 2019 10:35:03 +0200 Message-Id: <20191010083613.686679057@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@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: Wei Yongjun commit c552ffb5c93d9d65aaf34f5f001c4e7e8484ced1 upstream. When using single_open() for opening, single_release() should be used instead of seq_release(), otherwise there is a memory leak. Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics") Cc: Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/cavium/zip/zip_main.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/crypto/cavium/zip/zip_main.c +++ b/drivers/crypto/cavium/zip/zip_main.c @@ -593,6 +593,7 @@ static const struct file_operations zip_ .owner = THIS_MODULE, .open = zip_stats_open, .read = seq_read, + .release = single_release, }; static int zip_clear_open(struct inode *inode, struct file *file) @@ -604,6 +605,7 @@ static const struct file_operations zip_ .owner = THIS_MODULE, .open = zip_clear_open, .read = seq_read, + .release = single_release, }; static int zip_regs_open(struct inode *inode, struct file *file) @@ -615,6 +617,7 @@ static const struct file_operations zip_ .owner = THIS_MODULE, .open = zip_regs_open, .read = seq_read, + .release = single_release, }; /* Root directory for thunderx_zip debugfs entry */