search for: kstrdup

Displaying 19 results from an estimated 19 matches for "kstrdup".

Did you mean: strdup
2013 Jun 25
3
[PATCH] btrfs-progs: avoid memory leak in btrfs_close_devices
Three kind of structures need to be freed on close: * All struct btrfs_device managed by fs_devices * The name field for each struct btrfs_device * The above items for seed_devices Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> --- volumes.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/volumes.c b/volumes.c index
2012 Jan 24
0
[PATCH] linux-2.6.18/xenbus_dev: add missing error checks to watch handling
...tch = kzalloc(sizeof(*watch), GFP_KERNEL); - watch->watch.node = kmalloc(strlen(path)+1, - GFP_KERNEL); - strcpy((char *)watch->watch.node, path); + if (watch == NULL) { + rc = -ENOMEM; + goto out; + } + watch->watch.node = kstrdup(path, GFP_KERNEL); watch->watch.callback = watch_fired; - watch->token = kmalloc(strlen(token)+1, GFP_KERNEL); - strcpy(watch->token, token); + watch->token = kstrdup(token, GFP_KERNEL); watch->dev_data = u; - err = register_xenbus_watch(&watch->watch); + e...
2018 Jul 12
1
[PATCH] drm/nouveau: Don't forget to label dp_aux devices
...rm_device *dev, int index) case DRM_MODE_CONNECTOR_eDP: nv_connector->aux.dev = dev->dev; nv_connector->aux.transfer = nouveau_connector_aux_xfer; + snprintf(aux_name, sizeof(aux_name), "sor-%04x-%04x", + dcbe->hasht, dcbe->hashm); + nv_connector->aux.name = kstrdup(aux_name, GFP_KERNEL); ret = drm_dp_aux_register(&nv_connector->aux); if (ret) { NV_ERROR(drm, "failed to register aux channel\n"); diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h index a4d1a059bd3d..2c5cb51c7c33 1006...
2018 Aug 28
0
[PATCH v2 3/4] drm/dp_mst: Add dp_mst_status debugfs node for all drivers
..._dp_mst_topology_mgr *mgr, + struct drm_connector *connector) +{ + struct drm_dp_mst_debugfs_init_data *init_data; + + if (!connector) + return; + + init_data = kmalloc(sizeof(*init_data), GFP_KERNEL); + if (!init_data) + return; + + init_data->mgr = mgr; + init_data->connector_name = kstrdup(connector->name, GFP_KERNEL); + if (!init_data->connector_name) { + kfree(init_data); + return; + } + + drm_debugfs_register_callback(mgr->dev->primary, + drm_dp_mst_debugfs_init, + drm_dp_mst_debugfs_cleanup_cb, + init_data, &mgr->debugfs_init_cb); +...
2010 May 20
0
[GIT PULL] ocfs2 updates for 2.6.35
...ions. ocfs2: Block signals for mkdir/link/symlink/O_CREAT. Merge branch 'discontig-bg' of git://oss.oracle.com/git/tma/linux-2.6 into ocfs2-merge-window ocfs2: Silence a gcc warning. Julia Lawall (2): fs/ocfs2/dlm: Drop memory allocation cast fs/ocfs2/dlm: Use kstrdup Mark Fasheh (9): ocfs2: allocation reservations ocfs2: use allocation reservations during file write ocfs2: use allocation reservations for directory data ocfs2: allocate btree internal block groups from the global bitmap ocfs2: remove ocfs2_local_alloc_in_range()...
2007 Aug 23
2
give me some works
hello, Chris In the next several months, I will have a lot of spare time. I will be happy if you assign some work to me. I have learn linux kernel for years but only fix a few small bugs in IP stack. In the past few months, I read some EXT4/VFS codes. I began reading source of btrfs ten days ago and have read it twice now. Regards YZ
2012 Jun 14
0
[ocfs2-announce] OCFS2 1.4.10-1 released
...er ocfs2: fix o2dlm dlm run purgelist rev 3 ocfs2: dlm fix a dead lock ocfs2: dlm Remove BUG_ON from migration in the rare case of a down node ocfs2: dlm don t access beyond bitmap size ocfs2/dlm: Add missing spin_unlock ocfs2/dlm: avoid dlm ast_lock lockres spinlock dependency break ocfs2/dlm: Use kstrdup ocfs2/dlm: Drop memory allocation cast ocfs2 dlm Make o2dlm domain join leave messages KERN_NOTICE o2net: log socket state changes ocfs2: Fix a race in o2dlm lockres mastery FEEDBACK Please do not hesitate to email us at the ocfs2-users at oss.oracle.com with any questions and comments. The OCF...
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
...ep(&virtio_mmio_cmdline_devices, ",;")) != NULL) { + struct resource resources[] = { + { + .flags = IORESOURCE_IRQ, + }, { + .flags = IORESOURCE_MEM, + } + }; + char *size, *base; + unsigned long long val; + + if (!*token) + continue; + + kfree(device); + device = kstrdup(token, GFP_KERNEL); + + /* Split memory and IRQ resources */ + base = strsep(&token, ":"); + if (base == token || !token || !*token) { + pr_err("No IRQ in '%s'!\n", device); + continue; + } + + /* Get IRQ */ + if (kstrtoull(token, 0, &val) != 0) { + p...
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
...ep(&virtio_mmio_cmdline_devices, ",;")) != NULL) { + struct resource resources[] = { + { + .flags = IORESOURCE_IRQ, + }, { + .flags = IORESOURCE_MEM, + } + }; + char *size, *base; + unsigned long long val; + + if (!*token) + continue; + + kfree(device); + device = kstrdup(token, GFP_KERNEL); + + /* Split memory and IRQ resources */ + base = strsep(&token, ":"); + if (base == token || !token || !*token) { + pr_err("No IRQ in '%s'!\n", device); + continue; + } + + /* Get IRQ */ + if (kstrtoull(token, 0, &val) != 0) { + p...
2009 Jan 13
28
Warning and BUG with btrfs and corrupted image
...8>] read_tree_block+0x4c/0x58 [ 297.414339] [<c049264a>] open_ctree+0xa51/0xeff [ 297.414493] [<c01cc814>] ? disk_name+0x2a/0x6c [ 297.414624] [<c050d6e7>] ? strlcpy+0x17/0x48 [ 297.414770] [<c047b7e5>] btrfs_get_sb+0x20c/0x3d3 [ 297.414913] [<c017888e>] ? kstrdup+0x2f/0x51 [ 297.415110] [<c0191558>] vfs_kern_mount+0x40/0x7b [ 297.415242] [<c01915e1>] do_kern_mount+0x37/0xbf [ 297.415401] [<c01a2c78>] do_mount+0x5cc/0x609 [ 297.415533] [<c07c6db3>] ? lock_kernel+0x19/0x8c [ 297.415679] [<c01a2d0b>] ? sys_mount+0x56/0xa...
2024 Jan 29
0
[PATCH] [v2] nouveau: add command-line GSP-RM registry support
...tries = NV_GSP_REG_NUM_ENTRIES; + /* + * The NVreg_RegistryDwords parameter is a string of key=value + * pairs separated by semicolons. We need to extract and trim each + * substring, and then parse the substring to extract the key and + * value. + */ + if (NVreg_RegistryDwords) { + char *p = kstrdup(NVreg_RegistryDwords, GFP_KERNEL); + char *start, *next = p, *equal; + size_t length; + + /* Remove any whitespace from the parameter string */ + length = strip(p, " \t\n"); + + while ((start = strsep(&next, ";"))) { + long value; + + equal = strchr(start, '=...
2024 Feb 20
2
[PATCH] [v4] nouveau: add command-line GSP-RM registry support
...sp); + return ret; + } + } + + /* + * The NVreg_RegistryDwords parameter is a string of key=value + * pairs separated by semicolons. We need to extract and trim each + * substring, and then parse the substring to extract the key and + * value. + */ + if (NVreg_RegistryDwords) { + char *p = kstrdup(NVreg_RegistryDwords, GFP_KERNEL); + char *start, *next = p, *equal; + size_t length; + + /* Remove any whitespace from the parameter string */ + length = strip(p, " \t\n"); + + while ((start = strsep(&next, ";"))) { + long value; + + equal = strchr(start, '=...
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
''bh'' is forgot to release if no error is detected Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> --- fs/btrfs/volumes.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8b9fb8c..69fc902 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -631,6 +631,7 @@ static int
2022 Dec 01
8
[PATCH v7 0/6] evm: Do HMAC of multiple per LSM xattrs for new inodes
From: Roberto Sassu <roberto.sassu at huawei.com> One of the major goals of LSM stacking is to run multiple LSMs side by side without interfering with each other. The ultimate decision will depend on individual LSM decision. Several changes need to be made to the LSM infrastructure to be able to support that. This patch set tackles one of them: gives to each LSM the ability to specify one
2023 Mar 14
7
[PATCH v8 0/6] evm: Do HMAC of multiple per LSM xattrs for new inodes
From: Roberto Sassu <roberto.sassu at huawei.com> One of the major goals of LSM stacking is to run multiple LSMs side by side without interfering with each other. The ultimate decision will depend on individual LSM decision. Several changes need to be made to the LSM infrastructure to be able to support that. This patch set tackles one of them: gives to each LSM the ability to specify one
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
2020 May 07
17
[PATCH v4 00/15] virtio-mem: paravirtualized memory
This series is based on v5.7-rc4. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v4 This is basically a resend of v3 [1], now based on v5.7-rc4 and restested. One patch was reshuffled and two ACKs I missed to add were added. The rebase did not require any modifications to patches. Details about virtio-mem can be found in the cover letter of v2 [2]. A
2020 May 07
20
[PATCH v3 00/15] virtio-mem: paravirtualized memory
This series is based on latest linux-next. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v3 Patch #1 - #10 where contained in v2 and only contain minor modifications (mostly smaller fixes). The remaining patches are new and contain smaller optimizations. Details about virtio-mem can be found in the cover letter of v2 [1]. A basic QEMU implementation was
2020 May 07
20
[PATCH v3 00/15] virtio-mem: paravirtualized memory
This series is based on latest linux-next. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v3 Patch #1 - #10 where contained in v2 and only contain minor modifications (mostly smaller fixes). The remaining patches are new and contain smaller optimizations. Details about virtio-mem can be found in the cover letter of v2 [1]. A basic QEMU implementation was