2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

Post by Miles Lan » Fri, 22 Feb 2002 03:20:17



This has been reported by someone else, but the .config
information was not included in the report.  Hopefully,
this will help.

Here you go:

CONFIG_QUOTA=y
CONFIG_AUTOFS4_FS=y
CONFIG_EXT3_FS=y
CONFIG_JBD=y
CONFIG_JBD_DEBUG=y
CONFIG_FAT_FS=m
CONFIG_VFAT_FS=m
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_EXT2_FS=y

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=athlon  
-DKBUILD_BASENAME=filesystems  -DEXPORT_SYMTAB -c filesystems.c
filesystems.c: In function `sys_nfsservctl':
filesystems.c:30: dereferencing pointer to incomplete type
filesystems.c:30: dereferencing pointer to incomplete type
filesystems.c:30: warning: value computed is not used
filesystems.c:32: dereferencing pointer to incomplete type
filesystems.c:33: dereferencing pointer to incomplete type
filesystems.c:33: dereferencing pointer to incomplete type
filesystems.c:33: warning: value computed is not used
make[2]: *** [filesystems.o] Error 1
make[2]: Leaving directory `/usr/src/linux/fs'

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

Post by Steven Col » Fri, 22 Feb 2002 05:10:15



Quote:> This has been reported by someone else, but the .config
> information was not included in the report.  Hopefully,
> this will help.

[Config info snipped]

Quote:

> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=athlon
> -DKBUILD_BASENAME=filesystems  -DEXPORT_SYMTAB -c filesystems.c
> filesystems.c: In function `sys_nfsservctl':
> filesystems.c:30: dereferencing pointer to incomplete type

You could try this small patch.  The 2.5.5-pre1 version of filesystems.c
used #if defined (CONFIG_NFSD_MODULE) around most of this code,
so perhaps this will be correct.

Steven

--- linux-2.5.5/fs/filesystems.c.orig   Wed Feb 20 07:52:36 2002

 {
        int ret = -ENOSYS;

-#if defined(CONFIG_MODULES)
+#if defined(CONFIG_NFSD_MODULE)
        lock_kernel();

        if (nfsd_linkage ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

Post by Neil Brow » Fri, 22 Feb 2002 05:40:08



Quote:> This has been reported by someone else, but the .config
> information was not included in the report.  Hopefully,
> this will help.

> Here you go:
....

> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=athlon  
> -DKBUILD_BASENAME=filesystems  -DEXPORT_SYMTAB -c filesystems.c
> filesystems.c: In function `sys_nfsservctl':
> filesystems.c:30: dereferencing pointer to incomplete type
> filesystems.c:30: dereferencing pointer to incomplete type

...

Opps, my mistake.

Please try this.

NeilBrown

--- ./include/linux/nfsd/interface.h    2002/02/18 22:58:10     1.3

-#ifdef CONFIG_NFSD_MODULE
+#ifndef CONFIG_NFSD
+#ifdef CONFIG_MODULE

 extern struct nfsd_linkage {

 # define nfsd_find_fh_dentry (nfsd_linkage->find_fh_dentry)

 #else
-# ifndef CONFIG_NFSD
 #  define nfsd_find_fh_dentry(a,b,c,d,e) *((char*)0)=0
 /* filesystems can use "#ifndef NO_CONFIG_NFSD" to exclude code that is only needed
  * by knfsd
  */
 #  define NO_CONFIG_NFSD
-# endif
 #endif

 #endif /* LINUX_NFSD_INTERFACE_H */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

Post by Robert Lov » Fri, 22 Feb 2002 06:00:09



> Opps, my mistake.

> Please try this.

This does not apply to my include/linux/nfsd/interface.h ?

In 2.5.5, that file is 24 lines long.  The first hunk applies, but the
second, at line 155, obviously does not.

        Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

Post by Miles Lan » Fri, 22 Feb 2002 06:10:13




> > Opps, my mistake.

> > Please try this.

> This does not apply to my include/linux/nfsd/interface.h ?

> In 2.5.5, that file is 24 lines long.  The first hunk applies, but the
> second, at line 155, obviously does not.

FWIW, when I compiled using Steven Cole's patch, it compiles.
I haven't run the kernel yet, though.

--- linux-2.5.5/fs/filesystems.c.orig   Wed Feb 20 07:52:36 2002

 {
        int ret = -ENOSYS;

-#if defined(CONFIG_MODULES)
+#if defined(CONFIG_NFSD_MODULE)
        lock_kernel();

        if (nfsd_linkage ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

Post by Neil Brow » Fri, 22 Feb 2002 09:00:12




> > Opps, my mistake.

> > Please try this.

> This does not apply to my include/linux/nfsd/interface.h ?

> In 2.5.5, that file is 24 lines long.  The first hunk applies, but the
> second, at line 155, obviously does not.

Post in haste ... repent at leisure....

I made that patch against my current, heavily patches tree as I though
that the changes to interface.h wouldn't conflict... I was wrong.

The correct patch, which applies against 2.5.5 and compiles with out
errors for several combinationg of CONFIG_MODULES enabled or not, and
CONFIG_NFSD being Y, M, or N, is below.

NeilBrown

 ----------- Diffstat output ------------
 ./include/linux/nfsd/interface.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- ./include/linux/nfsd/interface.h    2002/02/20 21:58:11     1.1

 #include <linux/config.h>

-#ifdef CONFIG_NFSD_MODULE
+#ifndef CONFIG_NFSD
+#ifdef CONFIG_MODULES

 extern struct nfsd_linkage {
        long (*do_nfsservctl)(int cmd, void *argp, void *resp);
        struct module *owner;
 } * nfsd_linkage;

+#endif
 #endif

 #endif /* LINUX_NFSD_INTERFACE_H */

Quote:

>    Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

Post by Robert Lov » Fri, 22 Feb 2002 10:00:15



> Post in haste ... repent at leisure....

> I made that patch against my current, heavily patches tree as I though
> that the changes to interface.h wouldn't conflict... I was wrong.

> The correct patch, which applies against 2.5.5 and compiles with out
> errors for several combinationg of CONFIG_MODULES enabled or not, and
> CONFIG_NFSD being Y, M, or N, is below.

Worked for me, at least in my combination (CONFIG_MODULE=y,
CONFIG_NFSD=n).  Thanks.

Don't forget to pass it to Linus ;)

        Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/