Re: sockets in kernel space

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

 



On Sat, Jul 19, 2003 at 10:40:53PM +0200, Patrick Kilian wrote:
> > That exists in kernel?!?! I really, really, really doubt that.
> Well as you noticed its is a uml kernel, and there (and only there) I 
> can use it.

No, you can't. It prints complete garbage there, because kernel function
don't pass around errors in errno, but rather use return values.

> > Are you sure you know where the "Operation not permitted" comes from?
> > (Hint: the "perror" function was not passed the error argument, so it
> > can't know what it was!)
> I don't understand what you want to say, I always use perror like that 
> and it's just the way as the doc's of glibc describe it.

Yes. But the error is returned from the function, *NOT* passed in errno.
So perror will print what happens to be in errno, which remained there from
ages ago.

> >> Kernel panic: Segfault with no mm
> > This looks like an umlinux error, right?
> Yes, I should have mentioned it.
> 
> > If so, get a debugger, attach and inspect ;-).
> I did try to, but I weren't able to pinpoint the bug.

You almost were ;-). The value of error (and you got that) is what's
actually wrong.

> > Especially try to get value of "error".
> EAFNOSUPPORT

Then it seems ... either the value is wrong for some reason, or your
kernel config is wrong for some reason (does not have some important
part of networking turned on). I'd bet the later is true!

> Thanks for your answer,
> Patrick "Petschge" Kilian
> 
> -- 
> ++++[>++++++++<-]>.<++++++++[>++++++++++<-]>-.<++++++++++[>----------<-]
> >-.[<+++++>-]<---.>++++++++[<++++++++++>-]<---.>++++[<-------->-]<.>
> +++++++++[<--------->-]<-.[>+++++<-]>---.<+++[>-----<-]>.<++++++
> [>++++++++++<-]>.<+++++++++[>---------<-]>-.
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux