Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1c856e0f1a4c946c6329cff126548ef4288735f Commit: d1c856e0f1a4c946c6329cff126548ef4288735f Parent: 2ffbb8377c7a0713baf6644e285adc27a5654582 Author: Rusty Russell <[EMAIL PROTECTED]> AuthorDate: Mon Nov 19 11:20:40 2007 -0500 Committer: Rusty Russell <[EMAIL PROTECTED]> CommitDate: Mon Nov 19 11:20:41 2007 +1100
lguest: Fix uninitialized members in example launcher Thanks valgrind! Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- Documentation/lguest/lguest.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 4200839..9b0e322 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c @@ -1040,6 +1040,11 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, / getpagesize(); p = get_pages(pages); + /* Initialize the virtqueue */ + vq->next = NULL; + vq->last_avail_idx = 0; + vq->dev = dev; + /* Initialize the configuration. */ vq->config.num = num_descs; vq->config.irq = devices.next_irq++; @@ -1057,9 +1062,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, for (i = &dev->vq; *i; i = &(*i)->next); *i = vq; - /* Link virtqueue back to device. */ - vq->dev = dev; - /* Set the routine to call when the Guest does something to this * virtqueue. */ vq->handle_output = handle_output; @@ -1093,6 +1095,7 @@ static struct device *new_device(const char *name, u16 type, int fd, dev->desc = new_dev_desc(type); dev->handle_input = handle_input; dev->name = name; + dev->vq = NULL; return dev; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html