All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] When opening /tmp/uml.ctl fails, what do we get?
@ 2007-02-21 23:54 Blaisorblade
  2007-02-22 17:42 ` Jeff Dike
  2007-02-22 19:59 ` Jeff Dike
  0 siblings, 2 replies; 6+ messages in thread
From: Blaisorblade @ 2007-02-21 23:54 UTC (permalink / raw)
  To: Jeff Dike, user-mode-linux-devel

I started uml_daemon as root by mistake, so /tmp/uml.ctl even if /dev/net/tun 
was world-readable. Ok, I did it. This is the result (after trying many times 
to do 'ifconfig eth0 up' inside UML):

[42949710.290000] Choosing a random ethernet address for device eth0
[42949710.290000] Netdevice 0 (3a:9d:6f:12:83:b2) : daemon backend (uml_switch 
version 3) - unix:/tmp/uml.ctl
[42949710.290000] daemon_open : control connect failed, errno = 13
(13 = EPERM)
[42949720.360000] Registering fd 0 twice
[42949720.360000] Irqs : 2, 5
[42949720.360000] Ids : 0x0000000061a795f8, 0x0000000061d181c0
[42949720.360000] uml_net_open: failed to get irq(-12)

(-12 is -ENOMEM, not -13 + 1, but is caused by 'registering XXX twice').

[42949720.360000] Registering fd 0 twice
[42949720.360000] Irqs : 2, 5
[42949720.360000] Ids : 0x0000000061a795f8, 0x0000000061d181c0
[42949720.360000] uml_net_open: failed to get irq(-12)

Looking into the code, I saw that:
1) daemon_user_init is confusing because it saved any error into pri->fd, 
instead of returning it to the caller. Also, it would make sense to move this 
into daemon_open.
2) connect_to_switch uses the same errno twice - it shouldn't, and we're 
hitting this. um_interrupt is called with fd => 0 because errno is cleared 
after printk (verified under debugging, I did not trace it fully to where 
it's changing but it's sufficient for a patch anyway).
-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-05 18:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-21 23:54 [uml-devel] When opening /tmp/uml.ctl fails, what do we get? Blaisorblade
2007-02-22 17:42 ` Jeff Dike
2007-02-22 19:59 ` Jeff Dike
2007-03-04 19:13   ` Blaisorblade
2007-03-05 15:51     ` Jeff Dike
2007-03-05 18:27       ` Blaisorblade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.