DragonFly kernel List (threaded) for 2007-07
DragonFly BSD
DragonFly kernel List (threaded) for 2007-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: link(2) and EFAULT


From: Michael Galassi <nerd@xxxxxxx>
Date: Thu, 26 Jul 2007 12:40:35 -0700

>Under what conditions does link() return EFAULT? The man
>page says:
>
>  [EFAULT]  One of the pathnames specified is outside the
>            process's allocated address space.
>
>However I would think that if I had a (char *) pointing
>outside the address space that I would get a segfault
>somewhere before getting this error. How would you even
>handle this error, should your code get it?

copyin() is called by the system call code and returns efault after
validating the address, before actually touching it.

-michael



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]