linux-um archives
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: Jeff Dike <jdike@addtoit.com>,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] When opening /tmp/uml.ctl fails, what do we get?
Date: Thu, 22 Feb 2007 00:54:04 +0100	[thread overview]
Message-ID: <200702220054.04938.blaisorblade@yahoo.it> (raw)

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

             reply	other threads:[~2007-02-21 23:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21 23:54 Blaisorblade [this message]
2007-02-22 17:42 ` [uml-devel] When opening /tmp/uml.ctl fails, what do we get? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200702220054.04938.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox