[BusyBox] insmod with uClibc mystery bugs
Larry Doolittle
ldoolitt at recycle.lbl.gov
Tue Apr 24 22:26:06 UTC 2001
Erik -
> Regardless, ending up with an xmalloc(0) is sloppy. I'll change
> insmod.c to do 'if (nks <= 0) ' instead to avoid the issue.
That's not exactly right, either. The system call did not
fail (according to the API), so errno will not be set, and
perror_msg will give a useless and/or incorrect message.
> > In new_get_kernel_symbols, would it be worth checking for a
> > double-fault on query_module? Something like
> > if (errno == ENOSPC && bufsize == 256) {
>
> i.e. so we only pass the goto once? [ chop ]
> I think it should be safe as is.
I was more concerned that we or the kernel might have an
off-by-one error (if not now, at some future patch level),
and insmod would loop forever waiting for one more byte
to magically appear.
How about
if (errno == ENOSPC && bufsize < ret) {
?
- Larry
More information about the busybox
mailing list