* [PATCH] Fix lguest oops when guest dies while receiving I/O
@ 2007-04-26 10:45 Rusty Russell
2007-04-26 10:46 ` [PATCH] Fix lguest documentation error Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2007-04-26 10:45 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml - Kernel Mailing List, virtualization
lguest needs to hold a reference to its task in case it exits while
another Guest is sending it I/O. Otherwise we can oops in
access_process_vm->get_task_mm->task_lock().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/lguest_user.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
===================================================================
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -107,7 +107,8 @@ static int initialize(struct file *file,
setup_regs(lg->regs, args[2]);
setup_guest_gdt(lg);
lg->tsk = current;
- lg->mm = get_task_mm(current);
+ get_task_struct(lg->tsk);
+ lg->mm = get_task_mm(lg->tsk);
lg->last_pages = NULL;
mutex_unlock(&lguest_lock);
@@ -160,6 +161,7 @@ static int close(struct inode *inode, st
mutex_lock(&lguest_lock);
release_all_dma(lg);
free_guest_pagetable(lg);
+ put_task_struct(lg->tsk);
mmput(lg->mm);
if (!IS_ERR(lg->dead))
kfree(lg->dead);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Fix lguest documentation error
2007-04-26 10:45 [PATCH] Fix lguest oops when guest dies while receiving I/O Rusty Russell
@ 2007-04-26 10:46 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2007-04-26 10:46 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml - Kernel Mailing List, virtualization, James Morris
[ How embarrassing, I got the iptables command wrong! --RR ]
From: James Morris <jmorris@namei.org>
Fix up nat example in documentation.
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
Documentation/lguest/lguest.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
===================================================================
--- a/Documentation/lguest/lguest.txt
+++ b/Documentation/lguest/lguest.txt
@@ -69,7 +69,7 @@ Running Lguest:
kernel boot parameters.
- Configuring networking. I usually have the host masquerade, using
- "iptables -t nat -o eth0 -j MASQUERADE" and "echo 1 >
+ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" and "echo 1 >
/proc/sys/net/ipv4/ip_forward". In this example, I would configure
eth0 inside the guest at 192.168.19.2.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-26 10:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-26 10:45 [PATCH] Fix lguest oops when guest dies while receiving I/O Rusty Russell
2007-04-26 10:46 ` [PATCH] Fix lguest documentation error Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®