aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorChunyu Hu <[email protected]>2018-06-09 19:51:24 +0000
committerAl Viro <[email protected]>2018-06-28 00:44:38 +0000
commit877f919e192a09e77962a13d7165783027dee5fd (patch)
treecd5e37a5d4d3fc4483816d929d8c65626ebf1132 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentLinux 4.18-rc1 (diff)
downloadkernel-877f919e192a09e77962a13d7165783027dee5fd.tar.gz
kernel-877f919e192a09e77962a13d7165783027dee5fd.zip
proc: add proc_seq_release
kmemleak reported some memory leak on reading proc files. After adding some debug lines, find that proc_seq_fops is using seq_release as release handler, which won't handle the free of 'private' field of seq_file, while in fact the open handler proc_seq_open could create the private data with __seq_open_private when state_size is greater than zero. So after reading files created with proc_create_seq_private, such as /proc/timer_list and /proc/vmallocinfo, the private mem of a seq_file is not freed. Fix it by adding the paired proc_seq_release as the default release handler of proc_seq_ops instead of seq_release. Fixes: 44414d82cfe0 ("proc: introduce proc_create_seq_private") Reviewed-by: Christoph Hellwig <[email protected]> CC: Christoph Hellwig <[email protected]> Signed-off-by: Chunyu Hu <[email protected]> Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions