search for: read_buffer

Displaying 4 results from an estimated 4 matches for "read_buffer".

2010 Aug 25
7
A bug in Xenbus driver
...(ret != sz) { if (i == 0) i = -EFAULT; goto out; } /* Clear out buffer if it has been consumed */ if (rb->cons == rb->len) { list_del(&rb->list); kfree(rb); if (list_empty(&u->read_buffers)) break; rb = list_entry(u->read_buffers.next, struct read_buffer, list); } It should be like this: // if (ret != sz) { if (ret != 0) { if (i == 0) i = -EFAULT; goto out;...
2006 Aug 02
2
[PATCH][RFC] permit domU userspace to watch xenstore
...ed Aug 02 08:20:06 2006 -0400 @@ -58,6 +58,9 @@ struct xenbus_dev_data { /* In-progress transaction. */ struct list_head transactions; + /* Active watches. */ + struct list_head watches; + /* Partial request. */ unsigned int len; union { @@ -70,6 +73,8 @@ struct xenbus_dev_data { char read_buffer[PAGE_SIZE]; unsigned int read_cons, read_prod; wait_queue_head_t read_waitq; + + struct mutex reply_mutex; }; static struct proc_dir_entry *xenbus_dev_intf; @@ -100,13 +105,59 @@ static void queue_reply(struct xenbus_de { int i; + mutex_lock(&u->reply_mutex); + for (i = 0; i &...
2013 May 15
6
xenfs: race condition on xenstore watch
...tex_lock(&u->reply_mutex); + if (msg_type == XS_WATCH) { watch = alloc_watch_adapter(path, token); if (watch == NULL) { @@ -401,12 +403,11 @@ static int xenbus_write_watch(unsigned m "OK" }; - mutex_lock(&u->reply_mutex); rc = queue_reply(&u->read_buffers, &reply, sizeof(reply)); - mutex_unlock(&u->reply_mutex); } out: + mutex_unlock(&u->reply_mutex); return rc; }
2014 Apr 30
1
3TB non-system disk reports wrong size on Centos 6 x86_64
root at five-72 ~ # dd if=/dev/zero of=/dev/sdb bs=1M count=1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 8.67101 s, 121 MB/s root at five-72 ~ # parted /dev/sdb GNU Parted 2.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mklabel gpt (parted) print Model: ATA ST3000DM001-1CH1 (scsi) -->