search for: erestartsys

Displaying 20 results from an estimated 207 matches for "erestartsys".

2009 Oct 13
3
Dovecot lock problem
Hi, We have a few users experiencing locking problem. When starting Thunderbird, there is no new emails in Inbox. Dovecot createa a lock file /var/spool/mail/<user>.lock. It never completes openning Inbox. If closing the mail client, the open imap session does not get closed, nor the lock file get deleted. Here are the errors in log: dovecot: Oct 13 11:18:35 Warning: IMAP(user1): Our
2009 Aug 31
1
Garbage ERESTARTSYS in dlmdomain.c?
...ther node to the join, then we * need to back off temporarily and let them * complete. */ #define DLM_JOIN_TIMEOUT_MSECS 90000 if (status == -EAGAIN) { if (signal_pending(current)) { status = -ERESTARTSYS; goto bail; } if (total_backoff > msecs_to_jiffies(DLM_JOIN_TIMEOUT_MSECS)) { status = -ERESTARTSYS; mlog(ML_NOTICE, "...
2014 Sep 09
2
mutex
...mp;rng_mutex); + udelay(100); if (need_resched()) schedule_timeout_interruptible(1); @@ -233,10 +234,10 @@ static ssize_t hwrng_attr_current_store(struct device *dev, int err; struct hwrng *rng; + err = -ENODEV; err = mutex_lock_interruptible(&rng_mutex); if (err) return -ERESTARTSYS; - err = -ENODEV; list_for_each_entry(rng, &rng_list, list) { if (strcmp(rng->name, buf) == 0) { if (rng == current_rng) { @@ -270,8 +271,8 @@ static ssize_t hwrng_attr_current_show(struct device *dev, return -ERESTARTSYS; if (current_rng) name = current_rng->name; - ret...
2014 Sep 09
2
mutex
...mp;rng_mutex); + udelay(100); if (need_resched()) schedule_timeout_interruptible(1); @@ -233,10 +234,10 @@ static ssize_t hwrng_attr_current_store(struct device *dev, int err; struct hwrng *rng; + err = -ENODEV; err = mutex_lock_interruptible(&rng_mutex); if (err) return -ERESTARTSYS; - err = -ENODEV; list_for_each_entry(rng, &rng_list, list) { if (strcmp(rng->name, buf) == 0) { if (rng == current_rng) { @@ -270,8 +271,8 @@ static ssize_t hwrng_attr_current_show(struct device *dev, return -ERESTARTSYS; if (current_rng) name = current_rng->name; - ret...
2014 Sep 10
2
RFC virtio-rng: fail to read sysfs of a busy device
...ic ssize_t hwrng_attr_current_store(struct device *dev, > int err; > struct hwrng *rng; The following hunk doesn't work: > + err = -ENODEV; > err = mutex_lock_interruptible(&rng_mutex); err is being set to another value in the next line! > if (err) > return -ERESTARTSYS; > - err = -ENODEV; And all usage of err below now won't have -ENODEV but some other value. > list_for_each_entry(rng, &rng_list, list) { > if (strcmp(rng->name, buf) == 0) { > if (rng == current_rng) { > @@ -270,8 +271,8 @@ static ssize_t hwrng_attr_current_sho...
2014 Sep 10
2
RFC virtio-rng: fail to read sysfs of a busy device
...ic ssize_t hwrng_attr_current_store(struct device *dev, > int err; > struct hwrng *rng; The following hunk doesn't work: > + err = -ENODEV; > err = mutex_lock_interruptible(&rng_mutex); err is being set to another value in the next line! > if (err) > return -ERESTARTSYS; > - err = -ENODEV; And all usage of err below now won't have -ENODEV but some other value. > list_for_each_entry(rng, &rng_list, list) { > if (strcmp(rng->name, buf) == 0) { > if (rng == current_rng) { > @@ -270,8 +271,8 @@ static ssize_t hwrng_attr_current_sho...
2019 Jun 19
1
[PATCH v3 07/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
.../virtio/virtgpu_drv.h @@ -402,9 +402,9 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) { int r; - r = ttm_bo_reserve(&bo->tbo, true, false, NULL); + r = reservation_object_lock_interruptible(bo->gem_base.resv, NULL); if (unlikely(r != 0)) { - if (r != -ERESTARTSYS) { + if (r != -ERESTARTSYS && r != -EINTR) { struct virtio_gpu_device *qdev = bo->gem_base.dev->dev_private; dev_err(qdev->dev, "%p reserve failed\n", bo); @@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) stati...
2014 Sep 10
5
[PATCH 0/2] fix stuck in catting hwrng attributes
If we read hwrng by long-running dd process, it takes too much cpu time. When we check hwrng attributes from sysfs by cat, it gets stuck. The problem can only be reproduced with non-smp guest with slow backend. This patchset changed hwrng core to always delay 10 jiffies, cat process have chance to execute protected code, the problem is resolved. Thanks. Amos Kong (2): virtio-rng cleanup: move
2014 Sep 10
5
[PATCH 0/2] fix stuck in catting hwrng attributes
If we read hwrng by long-running dd process, it takes too much cpu time. When we check hwrng attributes from sysfs by cat, it gets stuck. The problem can only be reproduced with non-smp guest with slow backend. This patchset changed hwrng core to always delay 10 jiffies, cat process have chance to execute protected code, the problem is resolved. Thanks. Amos Kong (2): virtio-rng cleanup: move
2006 May 11
1
Re: [PATCH] smbfs: Fix slab corruption in samba error path
...om a smb filesystem over a wireless link. I guess there was some error > on the wireless link, which in turn caused an error condition for the > smb filesystem. > > In the log, smb_file_read reports error=4294966784 (0xfffffe00), which > also shows up in the slab dumps, and also is -ERESTARTSYS. Error code > 27499 corresponds to 0x6b6b, so the rq_errno field seems to be the only > one being set after freeing the slab. > > In smb_add_request (which is the only place in smbfs where I found > ERESTARTSYS), I found the following: > > if (!timeleft || signal_pend...
2014 Sep 15
7
[PATCH v2 0/3] fix stuck in accessing hwrng attributes
If we read hwrng by long-running dd process, it takes too much cpu time and almost hold the mutex lock. When we check hwrng attributes from sysfs by cat, it gets stuck in waiting the lock releaseing. The problem can only be reproduced with non-smp guest with slow backend. This patchset resolves the issue by changing rng_dev_read() to always schedule 10 jiffies after release mutex lock, then cat
2014 Sep 15
7
[PATCH v2 0/3] fix stuck in accessing hwrng attributes
If we read hwrng by long-running dd process, it takes too much cpu time and almost hold the mutex lock. When we check hwrng attributes from sysfs by cat, it gets stuck in waiting the lock releaseing. The problem can only be reproduced with non-smp guest with slow backend. This patchset resolves the issue by changing rng_dev_read() to always schedule 10 jiffies after release mutex lock, then cat
2014 Sep 15
1
[PATCH v2 1/3] virtio-rng cleanup: move some code out of mutex protection
...; > diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c > index aa30a25..c591d7e 100644 > --- a/drivers/char/hw_random/core.c > +++ b/drivers/char/hw_random/core.c > @@ -270,8 +270,8 @@ static ssize_t hwrng_attr_current_show(struct device *dev, > return -ERESTARTSYS; > if (current_rng) > name = current_rng->name; > - ret = snprintf(buf, PAGE_SIZE, "%s\n", name); > mutex_unlock(&rng_mutex); > + ret = snprintf(buf, PAGE_SIZE, "%s\n", name); I'm not sure this is safe. Name is just a pointer. What if the hwrng...
2014 Sep 15
1
[PATCH v2 1/3] virtio-rng cleanup: move some code out of mutex protection
...; > diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c > index aa30a25..c591d7e 100644 > --- a/drivers/char/hw_random/core.c > +++ b/drivers/char/hw_random/core.c > @@ -270,8 +270,8 @@ static ssize_t hwrng_attr_current_show(struct device *dev, > return -ERESTARTSYS; > if (current_rng) > name = current_rng->name; > - ret = snprintf(buf, PAGE_SIZE, "%s\n", name); > mutex_unlock(&rng_mutex); > + ret = snprintf(buf, PAGE_SIZE, "%s\n", name); I'm not sure this is safe. Name is just a pointer. What if the hwrng...
2014 Sep 10
0
RFC virtio-rng: fail to read sysfs of a busy device
...filp, char __user *buf, mutex_unlock(&rng_mutex); - if (need_resched()) - schedule_timeout_interruptible(1); + schedule_timeout_interruptible(1); if (signal_pending(current)) { err = -ERESTARTSYS; > > schedule_timeout_interruptible(1); > > @@ -233,10 +234,10 @@ static ssize_t hwrng_attr_current_store(struct device *dev, > > int err; > > struct hwrng *rng; > The following hunk doesn't work: > > > + err = -ENODEV; > > err = mutex_loc...
2014 Sep 09
0
RFC virtio-rng: fail to read sysfs of a busy device
...mp;rng_mutex); + udelay(100); if (need_resched()) schedule_timeout_interruptible(1); @@ -233,10 +234,10 @@ static ssize_t hwrng_attr_current_store(struct device *dev, int err; struct hwrng *rng; + err = -ENODEV; err = mutex_lock_interruptible(&rng_mutex); if (err) return -ERESTARTSYS; - err = -ENODEV; list_for_each_entry(rng, &rng_list, list) { if (strcmp(rng->name, buf) == 0) { if (rng == current_rng) { @@ -270,8 +271,8 @@ static ssize_t hwrng_attr_current_show(struct device *dev, return -ERESTARTSYS; if (current_rng) name = current_rng->name; - ret...
2014 Sep 18
9
[PATCH v2 0/6] fix hw_random stuck
When I hotunplug a busy virtio-rng device or try to access hwrng attributes in non-smp guest, it gets stuck. My original was pain, Rusty posted a real fix. This patchset fixed two issue in v1, and tested by my 6+ cases. | test 0: | hotunplug rng device from qemu monitor | | test 1: | guest) # dd if=/dev/hwrng of=/dev/null & | hotunplug rng device from qemu monitor | | test 2: |
2014 Sep 18
9
[PATCH v2 0/6] fix hw_random stuck
When I hotunplug a busy virtio-rng device or try to access hwrng attributes in non-smp guest, it gets stuck. My original was pain, Rusty posted a real fix. This patchset fixed two issue in v1, and tested by my 6+ cases. | test 0: | hotunplug rng device from qemu monitor | | test 1: | guest) # dd if=/dev/hwrng of=/dev/null & | hotunplug rng device from qemu monitor | | test 2: |
2014 Sep 18
0
[PATCH 2/5] hw_random: use reference counts on each struct hwrng.
...+ if (!current_rng) + return; + + kref_put(&current_rng->ref, cleanup_rng); + current_rng = NULL; +} + +/* Returns ERR_PTR(), NULL or refcounted hwrng */ +static struct hwrng *get_current_rng(void) +{ + struct hwrng *rng; + + if (mutex_lock_interruptible(&rng_mutex)) + return ERR_PTR(-ERESTARTSYS); + + rng = current_rng; + if (rng) + kref_get(&rng->ref); + + mutex_unlock(&rng_mutex); + return rng; +} + +static void put_rng(struct hwrng *rng) +{ + /* + * Hold rng_mutex here so we serialize in case they set_current_rng + * on rng again immediately. + */ + mutex_lock(&rng_mu...
2014 Sep 18
0
[PATCH v2 3/6] hw_random: use reference counts on each struct hwrng.
...+ if (!current_rng) + return; + + kref_put(&current_rng->ref, cleanup_rng); + current_rng = NULL; +} + +/* Returns ERR_PTR(), NULL or refcounted hwrng */ +static struct hwrng *get_current_rng(void) +{ + struct hwrng *rng; + + if (mutex_lock_interruptible(&rng_mutex)) + return ERR_PTR(-ERESTARTSYS); + + rng = current_rng; + if (rng) + kref_get(&rng->ref); + + mutex_unlock(&rng_mutex); + return rng; +} + +static void put_rng(struct hwrng *rng) +{ + /* + * Hold rng_mutex here so we serialize in case they set_current_rng + * on rng again immediately. + */ + mutex_lock(&rng_mu...