Bug in set/gethostname.

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 17 May 98 22:16 BST


Both single and SMP sethostname/gethostname have a problem. If you get a page
fault during the copy in a gethostname can return a corrupt nodename. If it
has overwritten the previous 0 byte you can get a lot of crap in theory
but I've never seen it do that

If you do two sethostnames and one of them sleeps you can get a mixed up
or shortened hostname.

sethostname/sys_newuname/sys_gethostname/sys_setdomainname need a reader/writer
lock on them.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu