Bug 144374

Summary: process state TASK_ZOMBIE changed to EXIT_ZOMBIE applied in kernel 2.6.9-1.724, should be 2.6.10
Product: [Fedora] Fedora Reporter: Joe Wilde <jwilde2>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-06 21:24:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Wilde 2005-01-06 16:14:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
The planned change slated for 2.6.10 of using EXIT_ZOMBIE and
EXIT_DEAD rather than TASK_ZOMBIE and TASK_DEAD (along with
corresponding ->state vs ->exit_state changes) appears to have found
it's way into the 2.6.9-1.724 release:

$ diff /lib/modules/2.6.9-1.681_FC3/source/include/linux/sched.h
/lib/modules/2.6.9-1.724_FC3/source/include/linux/sched.h
113,114c113,114
< #define TASK_ZOMBIE           16
< #define TASK_DEAD             32
---
> #define EXIT_ZOMBIE           16
> #define EXIT_DEAD             32

This is causing problems with drbd v0.7.6 and v0.7.7 which allow for
the change with the 2.6.10 and greater kernel, but expect the api to
be maintained throughout 2.6.9-x versions.  It looks like this also
affects openAFS, as it uses the same hooks, and has implemented
similar future support, but only for 2.6.10 and greater.


Version-Release number of selected component (if applicable):
kernel-2.6.9-1.724

How reproducible:
Always

Steps to Reproduce:
1. compile code containing following:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
  set_current_state(TASK_ZOMBIE);
#else
  current->exit_state = EXIT_ZOMBIE;
#endif

2. first using kernel 2.6.9-1.681_FC3
3. code compiles fine
4. second using kernel 2.6.10-x
5. code compiles fine
6. third using kernel 2.6.9-1.724_FC3


Actual Results:  error `TASK_ZOMBIE' undeclared (first use in this
function)

Expected Results:  code to compile without error

Additional info:

while this could be accomadated by hacking individual third party
packages, they would have to have specific hacks for the fc3
2.6.9-1.xxx kernels, not just for 2.6.9 vs 2.6.10.   In my very
limited C experience, this solution looks inconvenient at best for
thrid party maintainers, the solution within the third party package
does not appear to be as simple as a preprocessor directive based on
LINUX_VERSION_CODE.

Comment 1 Dave Jones 2005-01-06 21:24:17 UTC
testing on LINUX_VERSION_CODE is very fragile, and this isn't just a
Fedora problem.

It contains the same value for 2.6.9, 2.6.9-ac, 2.6.9-mm, and the
feature-set across all of those is incoherent. You need to check for the
presence of something before using it..

#ifdef TASK_ZOMBIE should do the trick.