mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
crypto: cavium/zip - Add missing single_release()
commitc552ffb5c9
upstream. When using single_open() for opening, single_release() should be used instead of seq_release(), otherwise there is a memory leak. Fixes:09ae5d37e0
("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>
This commit is contained in:
parent
cd8e0a5d94
commit
3683dd7074
1 changed files with 3 additions and 0 deletions
|
@ -593,6 +593,7 @@ static const struct file_operations zip_stats_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = zip_stats_open,
|
.open = zip_stats_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
.release = single_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int zip_clear_open(struct inode *inode, struct file *file)
|
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,
|
.owner = THIS_MODULE,
|
||||||
.open = zip_clear_open,
|
.open = zip_clear_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
.release = single_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int zip_regs_open(struct inode *inode, struct file *file)
|
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,
|
.owner = THIS_MODULE,
|
||||||
.open = zip_regs_open,
|
.open = zip_regs_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
.release = single_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Root directory for thunderx_zip debugfs entry */
|
/* Root directory for thunderx_zip debugfs entry */
|
||||||
|
|
Loading…
Reference in a new issue