Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18292 - redhat-sources- doesn't compile devfs properly
Summary: redhat-sources- doesn't compile devfs properly
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: (DEPRECATED)
Depends on:
Reported: 2003-03-27 08:51 UTC by Paul Kronenwetter
Modified: 2003-05-08 21:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Paul Kronenwetter 2003-03-27 08:51:01 UTC
It looks (to me) like the redhat sources half-applied a devfs patch.  Since
(AFAIK) RedHat doesn't use devfs it's not a huge deal, but this is Gentoo!

I got this during the initial compile:
make[3]: Entering directory `/usr/src/linux-2.4.20-2.48/fs/devfs'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-2.48/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix include
base.c: In function `is_devfsd_or_child':
base.c:1417: structure has no member named `p_opptr'
base.c:1417: structure has no member named `p_opptr'
base.c: In function `devfsd_ioctl':
base.c:3433: warning: unused variable `lock'
make[3]: *** [base.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-2.48/fs/devfs'

p_opptr is the *new* way of referencing the (old) real_parent pointer in
include/linux/sched.h.  However sched.h (and the rest of the kernel) hadn't been
 patched to change to using the new nomenclature.

This is my patch to "fix" the devfs/base.c file.  *I HAVEN'T TESTED THIS YET*
but hope to soon.

--- linux-2.4.20-2.48-orig/fs/devfs/base.c      2002-11-28 18:53:15.000000000 -0500
+++ linux-2.4.20-2.48/fs/devfs/base.c   2003-03-27 08:35:18.000000000 -0500
@@ -1414,7 +1414,7 @@
     if (current == fs_info->devfsd_task) return (TRUE);
     if (current->pgrp == fs_info->devfsd_pgrp) return (TRUE);
-    for (p = current->p_opptr; p != &init_task; p = p->p_opptr)
+    for (p = current->real_parent; p != &init_task; p = p->real_parent)
        if (p == fs_info->devfsd_task) return (TRUE);

Reproducible: Always
Steps to Reproduce:
1. emerge redhat-sources
2. Enable devfs in configuration
3. make bzImage
4. Wait. :)

Actual Results:  
Kernel doesn't build.

Expected Results:  
Kernel builds.

I'm trying to see if the redhat kernel fixes bug#17571.  If it does I'll take
the ext3fs source tree and port it to gentoo-r2 & see if it works...
Comment 1 Paul Kronenwetter 2003-04-06 11:06:26 UTC
It looks like the included patch does fix the problem and the kernel runs.  However I haven't tested it much as the nvidia-kernel package doesn't work with the Red Hat kernel...

The ext3 stuff did work, but that's about all I've done...
Comment 2 Jay Pfeifer (RETIRED) gentoo-dev 2003-05-08 21:58:08 UTC
redhat-sources is not patched nor maintained by gentoo. reports bugs to Red Hat.