similar to: [PATCH] If copy_to_user fails, return EFAULT

Displaying 20 results from an estimated 11000 matches similar to: "[PATCH] If copy_to_user fails, return EFAULT"

2011 Mar 19
1
[patch 1/2] xen-gntdev: return -EFAULT on copy_to_user failure
copy_to_user() returns the amount of data remaining to be copied. We want to return a negative error code here. The upper layers just call WARN_ON() if we return non-zero so this doesn't change the behavior. But returning -EFAULT is still cleaner. Signed-off-by: Dan Carpenter <error27 at gmail.com> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 017ce60..b0f9e8f
2011 Mar 19
1
[patch 1/2] xen-gntdev: return -EFAULT on copy_to_user failure
copy_to_user() returns the amount of data remaining to be copied. We want to return a negative error code here. The upper layers just call WARN_ON() if we return non-zero so this doesn't change the behavior. But returning -EFAULT is still cleaner. Signed-off-by: Dan Carpenter <error27 at gmail.com> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 017ce60..b0f9e8f
2011 Mar 19
1
[patch 1/2] xen-gntdev: return -EFAULT on copy_to_user failure
copy_to_user() returns the amount of data remaining to be copied. We want to return a negative error code here. The upper layers just call WARN_ON() if we return non-zero so this doesn't change the behavior. But returning -EFAULT is still cleaner. Signed-off-by: Dan Carpenter <error27 at gmail.com> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 017ce60..b0f9e8f
2012 Jul 24
1
[PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION
From: Nicholas Bellinger <nab at linux-iscsi.org> As requested by Anthony, here is a patch against target-pending/for-next-merge to expose an ABI version to userspace via a new VHOST_SCSI_GET_ABI_VERSION ioctl operation. As mentioned in the comment, ABI Rev 0 is for pre 2012 out-of-tree code, and ABI Rev 1 (the current rev) is for current WIP v3.6 kernel merge candiate code. I think this
2012 Jul 24
1
[PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION
From: Nicholas Bellinger <nab at linux-iscsi.org> As requested by Anthony, here is a patch against target-pending/for-next-merge to expose an ABI version to userspace via a new VHOST_SCSI_GET_ABI_VERSION ioctl operation. As mentioned in the comment, ABI Rev 0 is for pre 2012 out-of-tree code, and ABI Rev 1 (the current rev) is for current WIP v3.6 kernel merge candiate code. I think this
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty, These updated patches in the series return -EFAULT on copy_xx_user errors and also move the copy_from_user into fops_write() instead of it being in send_buf. This enables send_buf to just read from kernel buffers, making it simpler. This also allows write()s to write more to the host in one go, removingthe 4k limitation. I do limit the writes to 32k at once to not put too much
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty, These updated patches in the series return -EFAULT on copy_xx_user errors and also move the copy_from_user into fops_write() instead of it being in send_buf. This enables send_buf to just read from kernel buffers, making it simpler. This also allows write()s to write more to the host in one go, removingthe 4k limitation. I do limit the writes to 32k at once to not put too much
2007 Apr 18
0
[Bridge] [PATCH] (4/11) bridge - ioctl cleanup and consolidation
Merge the ioctl stub calls that just end up calling the sub-function to do the actual ioctl. Move br_get_XXX_ifindices into the ioctl file as well where they can be static. diff -Nru a/net/bridge/br_device.c b/net/bridge/br_device.c --- a/net/bridge/br_device.c 2004-05-20 10:51:05 -07:00 +++ b/net/bridge/br_device.c 2004-05-20 10:51:05 -07:00 @@ -19,21 +19,6 @@ #include <asm/uaccess.h>
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
From: Nicholas Bellinger <nab at linux-iscsi.org> This patch contains the post RFC-v5 (post-merge) changes, this includes: - Add locking comment - Move vhost_scsi_complete_cmd ahead of TFO callbacks in order to drop forward declarations - Drop extra '!= NULL' usage in vhost_scsi_complete_cmd_work() - Change vhost_scsi_*_handle_kick() to use pr_debug - Fix possible race in
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
From: Nicholas Bellinger <nab at linux-iscsi.org> This patch contains the post RFC-v5 (post-merge) changes, this includes: - Add locking comment - Move vhost_scsi_complete_cmd ahead of TFO callbacks in order to drop forward declarations - Drop extra '!= NULL' usage in vhost_scsi_complete_cmd_work() - Change vhost_scsi_*_handle_kick() to use pr_debug - Fix possible race in
2012 Aug 30
1
[PATCH 04/11] vmci_driver.patch: VMCI device driver.
Signed-off-by: George Zhang <georgezhang at vmware.com> --- drivers/misc/vmw_vmci/vmci_driver.c | 2293 +++++++++++++++++++++++++++++++++++ drivers/misc/vmw_vmci/vmci_driver.h | 48 + 2 files changed, 2341 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_driver.c create mode 100644 drivers/misc/vmw_vmci/vmci_driver.h diff --git
2012 Aug 30
1
[PATCH 04/11] vmci_driver.patch: VMCI device driver.
Signed-off-by: George Zhang <georgezhang at vmware.com> --- drivers/misc/vmw_vmci/vmci_driver.c | 2293 +++++++++++++++++++++++++++++++++++ drivers/misc/vmw_vmci/vmci_driver.h | 48 + 2 files changed, 2341 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_driver.c create mode 100644 drivers/misc/vmw_vmci/vmci_driver.h diff --git
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
On Tue, Feb 04, 2020 at 11:30:11AM +0800, Jason Wang wrote: > On 2020/1/31 ??11:36, Tiwei Bie wrote: > > This patch introduces a vDPA based vhost backend. This > > backend is built on top of the same interface defined > > in virtio-vDPA and provides a generic vhost interface > > for userspace to accelerate the virtio devices in guest. > > > > This backend is
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
On Mon, Jul 16, 2018 at 11:28:09AM +0800, Jason Wang wrote: [...] > @@ -1367,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > vq->last_avail_idx = s.num; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > +
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
On Mon, Jul 16, 2018 at 11:28:09AM +0800, Jason Wang wrote: [...] > @@ -1367,10 +1397,48 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > vq->last_avail_idx = s.num; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > +
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
From: Gonglei <arei.gonglei at huawei.com> In order to support to assign a boot order for vhost-scsi device, we should get the tpgt for user level (such as Qemu). and at present, we only support the minimum tpgt can boot. Signed-off-by: Gonglei <arei.gonglei at huawei.com> Signed-off-by: Bo Su <subo7 at huawei.com> --- drivers/vhost/scsi.c | 41
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
From: Gonglei <arei.gonglei at huawei.com> In order to support to assign a boot order for vhost-scsi device, we should get the tpgt for user level (such as Qemu). and at present, we only support the minimum tpgt can boot. Signed-off-by: Gonglei <arei.gonglei at huawei.com> Signed-off-by: Bo Su <subo7 at huawei.com> --- drivers/vhost/scsi.c | 41
2011 Jun 09
1
[PATCH 7/7] [v6] drivers/virt: introduce Freescale hypervisor management driver
Add the drivers/virt directory, which houses drivers that support virtualization environments, and add the Freescale hypervisor management driver. The Freescale hypervisor management driver provides several services to drivers and applications related to the Freescale hypervisor: 1. An ioctl interface for querying and managing partitions 2. A file interface to reading incoming doorbells 3. An