search for: single_release

Displaying 20 results from an estimated 32 matches for "single_release".

2019 Sep 04
1
[PATCH] drm/nouveau: add missing single_release()
When using single_open() for opening, single_release() should be used, otherwise there is a memory leak. This is detected by Coccinelle semantic patch. Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs") Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com> --- drivers/gpu/drm/nouveau/...
2019 Sep 05
0
[PATCH] drm/nouveau: add missing single_release()
Reviewed-by: Karol Herbst <kherbst at redhat.com> On Thu, Sep 5, 2019 at 9:14 AM Wei Yongjun <weiyongjun1 at huawei.com> wrote: > > When using single_open() for opening, single_release() should be > used, otherwise there is a memory leak. > > This is detected by Coccinelle semantic patch. > > Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs") > Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com> &...
2020 Jul 21
0
[PATCH -next] drm/nouveau/kms/nvd9-: Fix file release memory leak
Reviewed-by: Lyude Paul <lyude at redhat.com> Thanks! On Tue, 2020-07-21 at 15:17 +0000, Wei Yongjun wrote: > When using single_open() for opening, single_release() should be > used instead of seq_release(), otherwise there is a memory leak. > > Fixes: 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support") > Reported-by: Hulk Robot <hulkci at huawei.com> > Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com> > ---...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...+ return 0; +} + +static int proc_vmi_info_open(struct inode *inode, struct file *file) +{ + return single_open(file, proc_vmi_info_show, NULL); +} + +static struct file_operations proc_vmi_info_operations = { + .open = proc_vmi_info_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +#define VDEF(call) #call , +static char *vmi_call_name[] = { + VMI_CALLS +}; +#undef VDEF + +static void print_annotation(struct seq_file *m, struct vmi_annotation *a) +{ + seq_printf(m, "%s %p %d %p %d %d\n", + vmi_call_name[a->vmi_call], a->nativeEIP, a->native_s...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...+ return 0; +} + +static int proc_vmi_info_open(struct inode *inode, struct file *file) +{ + return single_open(file, proc_vmi_info_show, NULL); +} + +static struct file_operations proc_vmi_info_operations = { + .open = proc_vmi_info_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +#define VDEF(call) #call , +static char *vmi_call_name[] = { + VMI_CALLS +}; +#undef VDEF + +static void print_annotation(struct seq_file *m, struct vmi_annotation *a) +{ + seq_printf(m, "%s %p %d %p %d %d\n", + vmi_call_name[a->vmi_call], a->nativeEIP, a->native_s...
2023 Jul 20
1
[PATCH drm-misc-next v8 02/12] drm: debugfs: provide infrastructure to dump a DRM GPU VA space
...lt;drm/drm_file.h> #include <drm/drm_gem.h> #include <drm/drm_managed.h> +#include <drm/drm_gpuva_mgr.h> #include "drm_crtc_internal.h" #include "drm_internal.h" @@ -175,6 +176,45 @@ static const struct file_operations drm_debugfs_fops = { .release = single_release, }; +/** + * drm_debugfs_gpuva_info - dump the given DRM GPU VA space + * @m: pointer to the &seq_file to write + * @mgr: the &drm_gpuva_manager representing the GPU VA space + * + * Dumps the GPU VA mappings of a given DRM GPU VA manager. + * + * For each DRM GPU VA space drivers should...
2013 Sep 05
0
[PATCH RESEND v3 3/7] Intel MIC Host Driver, card OS state management.
..._unlock(&mdev->mic_mutex); + kfree(kva); +done: + return 0; +} + +static int mic_log_buf_open(struct inode *inode, struct file *file) +{ + return single_open(file, mic_log_buf_show, inode->i_private); +} + +static int mic_log_buf_release(struct inode *inode, struct file *file) +{ + return single_release(inode, file); +} + +static const struct file_operations log_buf_ops = { + .owner = THIS_MODULE, + .open = mic_log_buf_open, + .read = seq_read, + .llseek = seq_lseek, + .release = mic_log_buf_release +}; + +static int mic_smpt_show(struct seq_file *s, void *pos) +{ + int i; + struct mic_de...
2018 Aug 28
0
[PATCH v2 3/4] drm/dp_mst: Add dp_mst_status debugfs node for all drivers
...logy_mgr *mgr = inode->i_private; + + return single_open(file, drm_dp_mst_debugfs_state_show, mgr); +} + +static const struct file_operations drm_dp_mst_debugfs_state_fops = { + .owner = THIS_MODULE, + .open = drm_dp_mst_debugfs_state_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +struct drm_dp_mst_debugfs_init_data { + struct drm_dp_mst_topology_mgr *mgr; + char *connector_name; +}; + +static void +drm_dp_mst_debugfs_init(void *data) +{ + struct drm_dp_mst_debugfs_init_data *init_data = data; + struct drm_dp_mst_topology_mgr *mgr = init_data->mgr; + struct drm_mi...
2016 Mar 11
0
[PATCH v1 07/19] zsmalloc: reordering function parameter
...+++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 3c82011cc405..156edf909046 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -564,7 +564,7 @@ static const struct file_operations zs_stat_size_ops = { .release = single_release, }; -static int zs_pool_stat_create(const char *name, struct zs_pool *pool) +static int zs_pool_stat_create(struct zs_pool *pool, const char *name) { struct dentry *entry; @@ -604,7 +604,7 @@ static void __exit zs_stat_exit(void) { } -static inline int zs_pool_stat_create(const char *na...
2018 Aug 28
4
[PATCH v2 0/4] drm/dp_mst: Add DP MST debugfs nodes for all drivers
This is the next version of my patch series for teaching DRM how to automatically create debugfs nodes for drivers with MST topologies. This was originally intended just for nouveau, but has since been expanded to all DRM drivers. Changes since previous version: - Fix documentation error that got noticed by the kbuild bot in "drm/dp_mst: Pass entire connector to
2018 Aug 28
0
[PATCH v2 1/4] drm/debugfs: Add support for dynamic debugfs initialization
...void (*cleanup_cb)(void *data); + void *data; + struct list_head list; +}; + /*************************************************** * Initialization, etc. **************************************************/ @@ -67,6 +74,113 @@ static const struct file_operations drm_debugfs_fops = { .release = single_release, }; +/** + * drm_debugfs_register_callback - Register a callback for initializing + * dynamic driver-agnostic debugfs files + * @minor: device minor number + * @init: The callback to invoke to perform the debugfs initialization + * @cleanup_cb: The callback to inv...
2013 Jul 25
0
[PATCH 1/5] Intel MIC Host Driver for X100 family.
...+ mutex_unlock(&mdev->mic_mutex); + kfree(kva); +done: + return 0; +} + +static int log_buf_open(struct inode *inode, struct file *file) +{ + return single_open(file, log_buf_seq_show, inode->i_private); +} + +static int log_buf_release(struct inode *inode, struct file *file) +{ + return single_release(inode, file); +} + +static const struct file_operations log_buf_ops = { + .owner = THIS_MODULE, + .open = log_buf_open, + .read = seq_read, + .llseek = seq_lseek, + .release = log_buf_release +}; + +static int smpt_seq_show(struct seq_file *s, void *pos) +{ + int i; + struct mic_device *md...
2012 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
...ce(&_dev->core); struct ps3disk_private *priv; diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index f58cdcf..75e112d 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c @@ -536,7 +536,7 @@ static const struct file_operations ps3vram_proc_fops = { .release = single_release, }; -static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) +static void ps3vram_proc_init(struct ps3_system_bus_device *dev) { struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); struct proc_dir_entry *pde; @@ -618,7 +618,7 @@ static void ps3vram_make_request(s...
2012 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
...ce(&_dev->core); struct ps3disk_private *priv; diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index f58cdcf..75e112d 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c @@ -536,7 +536,7 @@ static const struct file_operations ps3vram_proc_fops = { .release = single_release, }; -static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) +static void ps3vram_proc_init(struct ps3_system_bus_device *dev) { struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); struct proc_dir_entry *pde; @@ -618,7 +618,7 @@ static void ps3vram_make_request(s...
2013 Jul 25
16
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
An Intel MIC X100 device is a PCIe form factor add-in coprocessor card based on the Intel Many Integrated Core (MIC) architecture that runs a Linux OS. It is a PCIe endpoint in a platform and therefore implements the three required standard address spaces i.e. configuration, memory and I/O. The host OS loads a device driver as is typical for PCIe devices. The card itself runs a bootstrap after
2013 Jul 25
16
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
An Intel MIC X100 device is a PCIe form factor add-in coprocessor card based on the Intel Many Integrated Core (MIC) architecture that runs a Linux OS. It is a PCIe endpoint in a platform and therefore implements the three required standard address spaces i.e. configuration, memory and I/O. The host OS loads a device driver as is typical for PCIe devices. The card itself runs a bootstrap after
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)