diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-09-04 14:18:09 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-11 18:20:53 +0200 |
commit | 3683dd7074dcda394cc4f976c5ef26fbb9dfb11c (patch) | |
tree | add2061934fd2f362e679f0e1cb02c4df77b314e /drivers/crypto | |
parent | cd8e0a5d94fba7c6032484ac89254940bad9b537 (diff) | |
download | linux-stable-3683dd7074dcda394cc4f976c5ef26fbb9dfb11c.tar.gz linux-stable-3683dd7074dcda394cc4f976c5ef26fbb9dfb11c.tar.bz2 linux-stable-3683dd7074dcda394cc4f976c5ef26fbb9dfb11c.zip |
crypto: cavium/zip - Add missing single_release()
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: <stable@vger.kernel.org>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/cavium/zip/zip_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/cavium/zip/zip_main.c b/drivers/crypto/cavium/zip/zip_main.c index 6183f9128a8a..ea901bc5733c 100644 --- 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_stats_fops = { .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_clear_fops = { .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_regs_fops = { .owner = THIS_MODULE, .open = zip_regs_open, .read = seq_read, + .release = single_release, }; /* Root directory for thunderx_zip debugfs entry */ |