search for: memdup_user

Displaying 20 results from an estimated 64 matches for "memdup_user".

2016 Aug 18
1
[PATCH] virtio-gpu: Use memdup_user() rather than duplicating its implementation
From: Markus Elfring <elfring at users.sourceforge.net> Date: Thu, 18 Aug 2016 22:35:14 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring at users.sourceforge.net> --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git...
2016 Aug 18
1
[PATCH] virtio-gpu: Use memdup_user() rather than duplicating its implementation
From: Markus Elfring <elfring at users.sourceforge.net> Date: Thu, 18 Aug 2016 22:35:14 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring at users.sourceforge.net> --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git...
2013 Oct 25
8
[PATCH] btrfs: add framework to read fs info from btrfs-control
...s_type = { }; MODULE_ALIAS_FS("btrfs"); +static int btrfs_ioc_get_fslist(void __user *arg) +{ + int ret = 0; + u64 sz_fslist_arg; + u64 sz_fslist; + struct btrfs_ioctl_fslist_args *fslist_arg; + struct btrfs_ioctl_fslist *fslist; + + sz_fslist_arg = sizeof(*fslist_arg); + fslist_arg = memdup_user(arg, sz_fslist_arg); + + sz_fslist = sizeof(*fslist) * fslist_arg->count; + kfree(fslist_arg); + fslist_arg = memdup_user(arg, sz_fslist_arg + sz_fslist); + fslist = (struct btrfs_ioctl_fslist *) (fslist_arg + sz_fslist_arg); + + ret = btrfs_get_fslist(fslist_arg, fslist); + + fslist->self_sz...
2019 Jun 18
2
[PATCH v2 07/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...; + buflist[i] = gobj; } kvfree(bo_handles); bo_handles = NULL; } - ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + ret = drm_gem_lock_reservations(buflist, exbuf->num_bo_handles, &ticket); if (ret) - goto out_free; + goto out_unused_fd; buf = memdup_user(u64_to_user_ptr(exbuf->command), exbuf->size); if (IS_ERR(buf)) { @@ -222,21 +216,25 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, vfpriv->ctx_id, out_fence); - ttm_eu_fence_buffer_objects(&am...
2019 Jun 18
2
[PATCH v2 07/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...; + buflist[i] = gobj; } kvfree(bo_handles); bo_handles = NULL; } - ret = virtio_gpu_object_list_validate(&ticket, &validate_list); + ret = drm_gem_lock_reservations(buflist, exbuf->num_bo_handles, &ticket); if (ret) - goto out_free; + goto out_unused_fd; buf = memdup_user(u64_to_user_ptr(exbuf->command), exbuf->size); if (IS_ERR(buf)) { @@ -222,21 +216,25 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, vfpriv->ctx_id, out_fence); - ttm_eu_fence_buffer_objects(&am...
2020 Aug 11
3
[PATCH] drm/nouveau/gem: Use vmemdup_user() rather than duplicating its implementation
From: Markus Elfring <elfring at users.sourceforge.net> Date: Tue, 11 Aug 2020 19:25:22 +0200 Reuse existing functionality from vmemdup_user() instead of keeping duplicate source code. Generated by: scripts/coccinelle/api/memdup_user.cocci Signed-off-by: Markus Elfring <elfring at users.sourceforge.net> --- drivers/gpu/drm/nouveau/nouveau_gem.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dri...
2013 May 20
2
[PATCH] Btrfs: fix estale with btrfs send
...trans) != -ENOENT) { + ret = PTR_ERR(trans); + goto out; + } + /* ENOENT means theres no transaction */ + } else { + ret = btrfs_commit_transaction(trans, send_root); + if (ret) + goto out; + } + } else { + up_read(&send_root->fs_info->extent_commit_sem); + } + arg = memdup_user(arg_, sizeof(*arg)); if (IS_ERR(arg)) { ret = PTR_ERR(arg); -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2014 Oct 30
3
kernel BUG at drivers/block/virtio_blk.c:172
...18] [<ffffffff811eee89>] mount_fs+0x39/0x1b0 [ 2.807018] [<ffffffff81194505>] ? __alloc_percpu+0x15/0x20 [ 2.807018] [<ffffffff8120ab2b>] vfs_kern_mount+0x6b/0x110 [ 2.807018] [<ffffffff8120d91c>] do_mount+0x22c/0xb30 [ 2.807018] [<ffffffff8118f2b6>] ? memdup_user+0x46/0x80 [ 2.807018] [<ffffffff8120e562>] SyS_mount+0xa2/0x110 [ 2.807018] [<ffffffff81671269>] system_call_fastpath+0x12/0x17 [ 2.807018] Code: fe ff ff 90 0f b7 86 f4 00 00 00 c7 86 78 01 00 00 02 00 00 00 48 c7 86 80 01 00 00 00 00 00 00 89 86 7c 01 00 00 e9 12 fe ff ff &...
2014 Oct 30
3
kernel BUG at drivers/block/virtio_blk.c:172
...18] [<ffffffff811eee89>] mount_fs+0x39/0x1b0 [ 2.807018] [<ffffffff81194505>] ? __alloc_percpu+0x15/0x20 [ 2.807018] [<ffffffff8120ab2b>] vfs_kern_mount+0x6b/0x110 [ 2.807018] [<ffffffff8120d91c>] do_mount+0x22c/0xb30 [ 2.807018] [<ffffffff8118f2b6>] ? memdup_user+0x46/0x80 [ 2.807018] [<ffffffff8120e562>] SyS_mount+0xa2/0x110 [ 2.807018] [<ffffffff81671269>] system_call_fastpath+0x12/0x17 [ 2.807018] Code: fe ff ff 90 0f b7 86 f4 00 00 00 c7 86 78 01 00 00 02 00 00 00 48 c7 86 80 01 00 00 00 00 00 00 89 86 7c 01 00 00 e9 12 fe ff ff &...
2014 Nov 07
2
kernel BUG at drivers/block/virtio_blk.c:172!
...[<ffffffff81202c15>] ? __alloc_percpu+0x15/0x20 [ 64.670008] [<ffffffff812908f8>] vfs_kern_mount+0x68/0x160 [ 64.670008] [<ffffffff81293d6c>] do_mount+0x22c/0xc20 [ 64.670008] [<ffffffff8120d92e>] ? might_fault+0x5e/0xc0 [ 64.670008] [<ffffffff811fcf1b>] ? memdup_user+0x4b/0x90 [ 64.670008] [<ffffffff81294a8e>] SyS_mount+0x9e/0x100 [ 64.670008] [<ffffffff8185e169>] system_call_fastpath+0x12/0x17 [ 64.670008] Code: 00 00 c7 86 78 01 00 00 02 00 00 00 48 c7 86 80 01 00 00 00 00 00 00 89 86 7c 01 00 00 e9 02 fe ff ff 66 0f 1f 84 00 00 00 00 00 &...
2014 Nov 07
2
kernel BUG at drivers/block/virtio_blk.c:172!
...[<ffffffff81202c15>] ? __alloc_percpu+0x15/0x20 [ 64.670008] [<ffffffff812908f8>] vfs_kern_mount+0x68/0x160 [ 64.670008] [<ffffffff81293d6c>] do_mount+0x22c/0xc20 [ 64.670008] [<ffffffff8120d92e>] ? might_fault+0x5e/0xc0 [ 64.670008] [<ffffffff811fcf1b>] ? memdup_user+0x4b/0x90 [ 64.670008] [<ffffffff81294a8e>] SyS_mount+0x9e/0x100 [ 64.670008] [<ffffffff8185e169>] system_call_fastpath+0x12/0x17 [ 64.670008] Code: 00 00 c7 86 78 01 00 00 02 00 00 00 48 c7 86 80 01 00 00 00 00 00 00 89 86 7c 01 00 00 e9 02 fe ff ff 66 0f 1f 84 00 00 00 00 00 &...
2019 Jun 28
2
[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...andles); bo_handles = NULL; } - ret = virtio_gpu_object_list_validate(&ticket, &validate_list); - if (ret) - goto out_free; + if (buflist) { + ret = drm_gem_lock_reservations(buflist->objs, buflist->nents, + &ticket); + if (ret) + goto out_unused_fd; + } buf = memdup_user(u64_to_user_ptr(exbuf->command), exbuf->size); if (IS_ERR(buf)) { @@ -219,25 +208,28 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, fd_install(out_fence_fd, sync_file->file); } + if (buflist) + for (i = 0; i < exbuf->num_bo_handles; i++) + r...
2019 Jun 28
2
[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...andles); bo_handles = NULL; } - ret = virtio_gpu_object_list_validate(&ticket, &validate_list); - if (ret) - goto out_free; + if (buflist) { + ret = drm_gem_lock_reservations(buflist->objs, buflist->nents, + &ticket); + if (ret) + goto out_unused_fd; + } buf = memdup_user(u64_to_user_ptr(exbuf->command), exbuf->size); if (IS_ERR(buf)) { @@ -219,25 +208,28 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, fd_install(out_fence_fd, sync_file->file); } + if (buflist) + for (i = 0; i < exbuf->num_bo_handles; i++) + r...
2014 Oct 13
2
Re: passthrough of PCI-device
...+0x10a/0x1f0 [vfio_pci] Oct 7 11:32:53 artemis2 kernel: [<ffffffffa08670e8>] vfio_pci_set_intx_trigger+0xc8/0x1b0 [vfio_pci] Oct 7 11:32:53 artemis2 kernel: [<ffffffffa086799b>] vfio_pci_set_irqs_ioctl+0x7b/0x100 [vfio_pci] Oct 7 11:32:53 artemis2 kernel: [<ffffffff8115d352>] ? memdup_user+0x42/0x70 Oct 7 11:32:53 artemis2 kernel: [<ffffffffa0865e74>] vfio_pci_ioctl+0x314/0xa00 [vfio_pci] Oct 7 11:32:53 artemis2 kernel: [<ffffffff81194b6a>] ? kmem_cache_alloc+0x1ba/0x1d0 Oct 7 11:32:53 artemis2 kernel: [<ffffffff811b156c>] ? get_empty_filp+0x5c/0x190 Oct 7 11:32...
2014 Apr 23
0
[PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume
...fs_root *root = BTRFS_I(inode)->root; + struct btrfs_trans_handle *trans; + u64 root_flags; + u64 flags; + int ret = 0; + + ret = mnt_want_write_file(file); + if (ret) + goto out; + + if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) { + ret = -EINVAL; + goto out_drop_write; + } + vol_args = memdup_user(arg, sizeof(*vol_args)); + if (IS_ERR(vol_args)) + goto out_drop_write; + vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0'; + flags = vol_args->flags; + if (!inode_owner_or_capable(inode)) { + ret = -EACCES; + goto out_drop_write; + } + + down_write(&root->fs_info->subvol_sem...
2019 Jul 02
2
[PATCH v6 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...NT; + goto out_unused_fd; } kvfree(bo_handles); bo_handles = NULL; } - ret = virtio_gpu_object_list_validate(&ticket, &validate_list); - if (ret) - goto out_free; + if (buflist) { + ret = virtio_gpu_array_lock_resv(buflist); + if (ret) + goto out_unused_fd; + } buf = memdup_user(u64_to_user_ptr(exbuf->command), exbuf->size); if (IS_ERR(buf)) { @@ -220,24 +206,18 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, } virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, - vfpriv->ctx_id, out_fence); - - ttm_eu_fence_buffer_objec...
2019 Jul 02
2
[PATCH v6 08/18] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...NT; + goto out_unused_fd; } kvfree(bo_handles); bo_handles = NULL; } - ret = virtio_gpu_object_list_validate(&ticket, &validate_list); - if (ret) - goto out_free; + if (buflist) { + ret = virtio_gpu_array_lock_resv(buflist); + if (ret) + goto out_unused_fd; + } buf = memdup_user(u64_to_user_ptr(exbuf->command), exbuf->size); if (IS_ERR(buf)) { @@ -220,24 +206,18 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, } virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, - vfpriv->ctx_id, out_fence); - - ttm_eu_fence_buffer_objec...
2019 Jun 18
0
[PATCH v2 07/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...); > bo_handles = NULL; > } > > - ret = virtio_gpu_object_list_validate(&ticket, &validate_list); > + ret = drm_gem_lock_reservations(buflist, exbuf->num_bo_handles, &ticket); > if (ret) > - goto out_free; > + goto out_unused_fd; > > buf = memdup_user(u64_to_user_ptr(exbuf->command), exbuf->size); > if (IS_ERR(buf)) { > @@ -222,21 +216,25 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, > virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, > vfpriv->ctx_id, out_fence); > > - t...
2014 Oct 30
0
kernel BUG at drivers/block/virtio_blk.c:172
...1eee89>] mount_fs+0x39/0x1b0 > [ 2.807018] [<ffffffff81194505>] ? __alloc_percpu+0x15/0x20 > [ 2.807018] [<ffffffff8120ab2b>] vfs_kern_mount+0x6b/0x110 > [ 2.807018] [<ffffffff8120d91c>] do_mount+0x22c/0xb30 > [ 2.807018] [<ffffffff8118f2b6>] ? memdup_user+0x46/0x80 > [ 2.807018] [<ffffffff8120e562>] SyS_mount+0xa2/0x110 > [ 2.807018] [<ffffffff81671269>] system_call_fastpath+0x12/0x17 > [ 2.807018] Code: fe ff ff 90 0f b7 86 f4 00 00 00 c7 86 78 01 00 00 02 00 00 00 48 c7 86 80 01 00 00 00 00 00 00 89 86 7c 01 00 00 e...
2014 Nov 10
0
kernel BUG at drivers/block/virtio_blk.c:172!
...15>] ? __alloc_percpu+0x15/0x20 > [ 64.670008] [<ffffffff812908f8>] vfs_kern_mount+0x68/0x160 > [ 64.670008] [<ffffffff81293d6c>] do_mount+0x22c/0xc20 > [ 64.670008] [<ffffffff8120d92e>] ? might_fault+0x5e/0xc0 > [ 64.670008] [<ffffffff811fcf1b>] ? memdup_user+0x4b/0x90 > [ 64.670008] [<ffffffff81294a8e>] SyS_mount+0x9e/0x100 > [ 64.670008] [<ffffffff8185e169>] system_call_fastpath+0x12/0x17 > [ 64.670008] Code: 00 00 c7 86 78 01 00 00 02 00 00 00 48 c7 86 80 01 00 00 00 00 00 00 89 86 7c 01 00 00 e9 02 fe ff ff 66 0f 1f 84 0...