Bug in 2.6.16 Code

Nick Couchman <[email protected]>
Newsgroups gmane.linux.cluster.openmosix.devel
Organization SEAKR Engineering, Inc.
Message-ID <[email protected]>
Hi, all,

(Tried to post this once already, but something got messed up with my list
subscription and it did not go through.  Here goes, again...)

I think I've found a bug in the latest git repository code for Linux
2.6.16.  When compiling, I receive the following errors:

  CC      hpc/copyuser.o
hpc/copyuser.c: In function `deputy_strncpy_from_user':
hpc/copyuser.c:64: error: `n' undeclared (first use in this function)
hpc/copyuser.c:64: error: (Each undeclared identifier is reported only once
hpc/copyuser.c:64: error: for each function it appears in.)
hpc/copyuser.c: In function `remote_copy_user':
hpc/copyuser.c:259: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result
hpc/copyuser.c:270: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result
hpc/copyuser.c: In function `remote_strncpy_from_user':
hpc/copyuser.c:295: warning: ignoring return value of `strncpy_from_user', declared with attribute warn_unused_result
make[1]: *** [hpc/copyuser.o] Error 1
make: *** [hpc] Error 2

When I go look at the hpc/copyuser.c file around line 64, I see this:

unsigned long deputy_strncpy_from_user(char *dst, const char __user *src,
                                                        long count)
{
        struct omp_usercopy_req u;
        int error;

        if (in_atomic())
                return n;
...
}

It does indeed appear that the variable "n" is undeclared here.  If I
change the "n" to a "0" the kernel compiles cleanly.  If I install the
kernel, it seems to work okay, minus some instability during some of the
migration.  I'm not sure whether or not that instability can be attributed
to my putting the wrong value in that return line.  I'm not familiar with
the OM code, so I'm not sure what value should be on that line, or if
there is a variable "n" somewhere that needs to be passed/declared/etc.

Thanks,
Nick



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.