Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73114 - (kernel) Hardened kernel versions 2.6.7-r15 and -r16 do not compile with CAPI-support due to a mistake in patch CAN-2004-0814.
Summary: (kernel) Hardened kernel versions 2.6.7-r15 and -r16 do not compile with CAPI...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-02 02:20 UTC by Felix Tiede
Modified: 2005-01-13 11:30 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Tiede 2004-12-02 02:20:08 UTC
In patch CAN-2004-0814 about line 3215 (file drivers/isdn/capi/capi.c, Hunk #3) reads
<code>
+ if (mp->tty)
+ tty_wakeup(tty);
</code>
This doesn't compile when CAPI-support is compiled into the kernel (I haven't tested with modules, but I assume, this bug applies to both).
The compiler reports "drivers/isdn/capi/capi.c line 649: tty undefined".
I've manually edited drivers/isdn/capi/capi.c, line 649 to read "tty_wakeup(mp->tty)".

This works, but as I'm no expert in C and much less in understanding the kernel, someone should check if my editing is correct and fix the patch.

Reproducible: Always
Steps to Reproduce:
1. emerge "=sys-kernel/hardened-dev-sources-2.6.7-r15"
2. Select CAPI support to be compiled into the kernel
3. Compile the kernel

Actual Results:  
The compiler reports that in "drivers/isdn/capi/capi.c" at line 649 variable
"tty" is undefined and first used here. The kernel doesn't compile further until
CAPI-support is deactivated.

Expected Results:  
The compiler shouldn't have complained about an undefined variable and built a
kernel with CAPI-support compiled in.

Since I've seen this bug on at least two different systems with different
hardware (also different CPUs), it seems to be independent from the system's
configuration.
Comment 1 M Grundman 2004-12-03 03:00:33 UTC
another problem :

drivers/char/generic_serial.c: In function `gs_close':
drivers/char/generic_serial.c:696: error: syntax error before "if"


there is no ";" at the end of the line "func_enter ()"
Comment 2 M Grundman 2004-12-03 03:03:20 UTC
other problems :
1/
drivers/char/moxa.c: In function `moxa_poll':
drivers/char/moxa.c:949: error: `tty' undeclared (first use in this function)
drivers/char/moxa.c:949: error: (Each undeclared identifier is reported only once
drivers/char/moxa.c:949: error: for each function it appears in.)
drivers/char/moxa.c: In function `check_xmit_empty':
drivers/char/moxa.c:1116: error: `tty' undeclared (first use in this function)

2/
drivers/char/generic_serial.c: In function `gs_close':
drivers/char/generic_serial.c:696: error: syntax error before "if"

there is no ";" at the end of the line "func_enter ()"
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-12-03 11:54:48 UTC
{usermode, uclinux, xbox}-sources all fixed with a corrected CAN-2004-0814 patch for all three issues which is in my devspace; see http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security...
Comment 4 Adam Mondl (RETIRED) gentoo-dev 2004-12-06 13:02:02 UTC
Patch should be fixed in hardened-dev-sources -r17
Comment 5 Brandon Hale (RETIRED) gentoo-dev 2004-12-21 11:52:43 UTC
Fixed
Comment 6 Felix Tiede 2005-01-13 06:04:50 UTC
The bug described in the original bug report disappeared in hardened-dev-sources -r17 as stated by comment #4, but reappeared as exactly the same in hardened-dev-sources -r18.

In "hardened-patches-2.6.7-7.12.tar.bz2" the file "1404_CAN-2004-0814.patch" contains the not-compiling code "tty_wakeup(tty)" at line 3320.
Comment 7 Adam Mondl (RETIRED) gentoo-dev 2005-01-13 11:30:48 UTC
Hardened-dev-sources-2.6.7-r18 fixed in CVS.