search for: get_f

Displaying 20 results from an estimated 40 matches for "get_f".

Did you mean: get_fb
2020 Apr 04
0
[PATCH 6/6] kernel: set USER_DS in kthread_use_mm
...usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -824,13 +824,9 @@ static void ffs_user_copy_worker(struct work_struct *work) bool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD; if (io_data->read && ret > 0) { - mm_segment_t oldfs = get_fs(); - - set_fs(USER_DS); kthread_use_mm(io_data->mm); ret = ffs_copy_to_iter(io_data->buf, ret, &io_data->data); kthread_unuse_mm(io_data->mm); - set_fs(oldfs); } io_data->kiocb->ki_complete(io_data->kiocb, ret, ret); diff --git a/drivers/vhost/vhost.c b/dr...
2020 Apr 16
0
[PATCH 3/3] kernel: set USER_DS in kthread_use_mm
...usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -824,13 +824,9 @@ static void ffs_user_copy_worker(struct work_struct *work) bool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD; if (io_data->read && ret > 0) { - mm_segment_t oldfs = get_fs(); - - set_fs(USER_DS); kthread_use_mm(io_data->mm); ret = ffs_copy_to_iter(io_data->buf, ret, &io_data->data); kthread_unuse_mm(io_data->mm); - set_fs(oldfs); } io_data->kiocb->ki_complete(io_data->kiocb, ret, ret); diff --git a/drivers/vhost/vhost.c b/dr...
2003 Apr 25
0
[Bug 85] New: couldn't write file ,call syscall ,ex. sys_open
...<asm-i386/segment.h> #include <asm-i386/uaccess.h> #include <linux/netfilter_ipv4.h> static unsigned int myfirewall(unsigned int hooknum,struct sk_buff **skb, const struct net_device *in, const struct net_device *out,int (*okfn)(struct sk_buff*)) { mm_segment_t old_fs =get_fs() ; mm_segment_t new_fs =get_ds(); printk("The old fs is [%lu]\n",old_fs.seg) ; printk("The neww fs is [%lu]\n ",new_fs.seg) ; /* I found the old_fs and new_fs is in the same address * But in other module is different ,why,can you tell me */ int fd = 0; char pa...
2020 Apr 16
8
improve use_mm / unuse_mm v2
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API. Changes since v1: - drop a few patches - fix a comment typo - cover the newly merged use_mm/unuse_mm caller in vfio
2020 Apr 16
8
improve use_mm / unuse_mm v2
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API. Changes since v1: - drop a few patches - fix a comment typo - cover the newly merged use_mm/unuse_mm caller in vfio
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2016 Apr 26
2
[PATCH 1/2] vhost: simplify work flushing
...ueue_seq++; spin_unlock_irqrestore(&dev->work_lock, flags); wake_up_process(dev->worker); } else { @@ -310,7 +306,6 @@ static int vhost_worker(void *data) { struct vhost_dev *dev = data; struct vhost_work *work = NULL; - unsigned uninitialized_var(seq); mm_segment_t oldfs = get_fs(); set_fs(USER_DS); @@ -321,11 +316,6 @@ static int vhost_worker(void *data) set_current_state(TASK_INTERRUPTIBLE); spin_lock_irq(&dev->work_lock); - if (work) { - work->done_seq = seq; - if (work->flushing) - wake_up_all(&work->done); - } if (kthread_...
2016 Apr 26
2
[PATCH 1/2] vhost: simplify work flushing
...ueue_seq++; spin_unlock_irqrestore(&dev->work_lock, flags); wake_up_process(dev->worker); } else { @@ -310,7 +306,6 @@ static int vhost_worker(void *data) { struct vhost_dev *dev = data; struct vhost_work *work = NULL; - unsigned uninitialized_var(seq); mm_segment_t oldfs = get_fs(); set_fs(USER_DS); @@ -321,11 +316,6 @@ static int vhost_worker(void *data) set_current_state(TASK_INTERRUPTIBLE); spin_lock_irq(&dev->work_lock); - if (work) { - work->done_seq = seq; - if (work->flushing) - wake_up_all(&work->done); - } if (kthread_...
2020 Apr 04
0
[PATCH 5/6] kernel: better document the use_mm/unuse_mm API contract
...a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index c57b1b2507c6..d9e48bd7c692 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -827,9 +827,9 @@ static void ffs_user_copy_worker(struct work_struct *work) mm_segment_t oldfs = get_fs(); set_fs(USER_DS); - use_mm(io_data->mm); + kthread_use_mm(io_data->mm); ret = ffs_copy_to_iter(io_data->buf, ret, &io_data->data); - unuse_mm(io_data->mm); + kthread_unuse_mm(io_data->mm); set_fs(oldfs); } diff --git a/drivers/usb/gadget/legacy/inode.c b/...
2020 Apr 16
0
[PATCH 2/3] kernel: better document the use_mm/unuse_mm API contract
...a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index c57b1b2507c6..d9e48bd7c692 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -827,9 +827,9 @@ static void ffs_user_copy_worker(struct work_struct *work) mm_segment_t oldfs = get_fs(); set_fs(USER_DS); - use_mm(io_data->mm); + kthread_use_mm(io_data->mm); ret = ffs_copy_to_iter(io_data->buf, ret, &io_data->data); - unuse_mm(io_data->mm); + kthread_unuse_mm(io_data->mm); set_fs(oldfs); } diff --git a/drivers/usb/gadget/legacy/inode.c b/...
2013 Oct 18
0
[RFC/PATCH 3/3] Wire up MultiFS support.
From: Raphael S. Carvalho <raphael.scarv at gmail.com> This patch finishes the MultiFS support. init_multifs gets called in the main (startup) function of ldlinux.c32, so MultiFS will be initialized automatically. init_multifs calls enable_multifs (lives in the core) to hook get_fs_info. Subsequent accesses will callback the get_fs_info living in ldlinux.c32. Signed-off-by: Raphael S. Carvalho <raphael.scarv at gmail.com> --- com32/elflink/ldlinux/ldlinux.c | 2 + com32/include/syslinux/multifs_utils.h | 51 +++++ com32/lib/syslinux/multifs_utils.c |...
2020 Apr 17
0
improve use_mm / unuse_mm v2
...his series improves the use_mm / unuse_mm interface by better > documenting the assumptions, and my taking the set_fs manipulations > spread over the callers into the core API. I appreciate all the work you're doing here. Do you have plans to introduce a better-named API than set_fs() / get_fs()? Also, having set_fs() return the previous value of 'fs' would simplify a lot of the callers.
2005 Nov 05
2
[PATCH 00/25] reduce code in fs/compat_ioctl.c
...so maybe I can get a quick ack or nack on them. In general, I'm just moving over the handlers to the respective subsystem without changing the logic, so the patch should not have any effect on the ioctl operation itself, but it also means that the handlers still use compat_alloc_user_space or get_fs/set_fs when it's not really necessary. Arnd <>< drivers/block/ioctl.c | 549 +++++ drivers/block/loop.c | 76 drivers/block/paride/pcd.c | 1 drivers/block/paride/pd.c | 1 drivers/block/parid...
2005 Nov 05
2
[PATCH 00/25] reduce code in fs/compat_ioctl.c
...so maybe I can get a quick ack or nack on them. In general, I'm just moving over the handlers to the respective subsystem without changing the logic, so the patch should not have any effect on the ioctl operation itself, but it also means that the handlers still use compat_alloc_user_space or get_fs/set_fs when it's not really necessary. Arnd <>< drivers/block/ioctl.c | 549 +++++ drivers/block/loop.c | 76 drivers/block/paride/pcd.c | 1 drivers/block/paride/pd.c | 1 drivers/block/parid...
2016 Apr 26
0
[PATCH 2/2] vhost: lockless enqueuing
...PORT_SYMBOL_GPL(vhost_has_work); @@ -305,7 +306,8 @@ static void vhost_vq_reset(struct vhost_dev *dev, static int vhost_worker(void *data) { struct vhost_dev *dev = data; - struct vhost_work *work = NULL; + struct vhost_work *work, *work_next; + struct llist_node *node; mm_segment_t oldfs = get_fs(); set_fs(USER_DS); @@ -315,29 +317,25 @@ static int vhost_worker(void *data) /* mb paired w/ kthread_stop */ set_current_state(TASK_INTERRUPTIBLE); - spin_lock_irq(&dev->work_lock); - if (kthread_should_stop()) { - spin_unlock_irq(&dev->work_lock); __set_curren...
2012 Jul 12
2
[PATCH 3/5] vhost: Make vhost a separate module
Currently, vhost-net is the only consumer of vhost infrastructure. So vhost infrastructure and vhost-net driver are in a single module. Separating this as a vhost.ko module and a vhost-net.ko module makes it is easier to share code with other vhost drivers, e.g. vhost-blk.ko, tcm-vhost.ko. Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/Kconfig | 10 +++++++++-
2012 Jul 12
2
[PATCH 3/5] vhost: Make vhost a separate module
Currently, vhost-net is the only consumer of vhost infrastructure. So vhost infrastructure and vhost-net driver are in a single module. Separating this as a vhost.ko module and a vhost-net.ko module makes it is easier to share code with other vhost drivers, e.g. vhost-blk.ko, tcm-vhost.ko. Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/Kconfig | 10 +++++++++-
2016 Apr 26
2
[PATCH 2/2] vhost: lockless enqueuing
...@@ -305,7 +306,8 @@ static void vhost_vq_reset(struct vhost_dev *dev, > static int vhost_worker(void *data) > { > struct vhost_dev *dev = data; > - struct vhost_work *work = NULL; > + struct vhost_work *work, *work_next; > + struct llist_node *node; > mm_segment_t oldfs = get_fs(); > > set_fs(USER_DS); > @@ -315,29 +317,25 @@ static int vhost_worker(void *data) > /* mb paired w/ kthread_stop */ > set_current_state(TASK_INTERRUPTIBLE); > > - spin_lock_irq(&dev->work_lock); > - > if (kthread_should_stop()) { > - spin_un...
2016 Apr 26
2
[PATCH 2/2] vhost: lockless enqueuing
...@@ -305,7 +306,8 @@ static void vhost_vq_reset(struct vhost_dev *dev, > static int vhost_worker(void *data) > { > struct vhost_dev *dev = data; > - struct vhost_work *work = NULL; > + struct vhost_work *work, *work_next; > + struct llist_node *node; > mm_segment_t oldfs = get_fs(); > > set_fs(USER_DS); > @@ -315,29 +317,25 @@ static int vhost_worker(void *data) > /* mb paired w/ kthread_stop */ > set_current_state(TASK_INTERRUPTIBLE); > > - spin_lock_irq(&dev->work_lock); > - > if (kthread_should_stop()) { > - spin_un...