Bug 453038

Summary: Missing functions in UP kernel
Product: Red Hat Enterprise Linux 5 Reporter: Steve Snyder <swsnyder>
Component: kernelAssignee: Prarit Bhargava <prarit>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: low    
Version: 5.2CC: dzickus, johnny
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:25:43 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:
Attachments:
Description Flags
Add header file to satisfy need for function defs none

Description Steve Snyder 2008-06-26 20:09:34 UTC
Description of problem:

Attempts to build a uni-processor (non-SMP) kernel fail due to the use of
undefined functions

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

2.6.18-92.el5, 2.6.18-92.1.1.el5, 2.6.18-92.1.6.el5

How reproducible:

Always

Steps to Reproduce:
1. Unpack kernel-2.6.18-92.1.6.el5.src.rpm
2. Disable the SMP config option in kernel
3. Attempt to build kernel
  
Actual results:

crypto/chainiv.c: In function ‘chainiv_givencrypt’:
crypto/chainiv.c:63: error: implicit declaration of function ‘local_bh_disable’
crypto/chainiv.c:77: error: implicit declaration of function ‘local_bh_enable’
make[1]: *** [crypto/chainiv.o] Error 1

Expected results:

Successful completion of kernel build.

Additional info:

Here's the situation:

File chainiv.c includes "linux/spinlock.h", which in turn includes different
header files depending on UP or SMP configurations:

#ifdef CONFIG_SMP
# include <asm/spinlock.h>
#else
# include <linux/spinlock_up.h>
#endif

That "linux/spinlock_up.h" file references the missing functions.

Just pretend I inserted that standard boilerplate here about how I know Red Hat
doesn't support user-configured kernels.  Image also that I suggested Red Hat
might some day want to build a UP kernel, which is impossible with the code in
its current condition.

Comment 1 Steve Snyder 2008-06-26 21:26:26 UTC
It is actually file "linux/spinlock_api_up.h" that references the "missing"
functions, not "linux/spinlock_up.h" as claimed above.

From a differnet location in spinlock.h:

#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
# include <linux/spinlock_api_smp.h>
#else
# include <linux/spinlock_api_up.h>
#endif

Sorry about the confusion.


Comment 2 Steve Snyder 2008-06-26 21:47:17 UTC
Created attachment 310386 [details]
Add header file to satisfy need for function defs

Comment 3 Prarit Bhargava 2008-06-27 11:59:21 UTC
Thanks Steve. :)

P.

Comment 5 RHEL Program Management 2008-07-22 18:43:09 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 Don Zickus 2008-07-23 18:55:59 UTC
in kernel-2.6.18-99.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 11 errata-xmlrpc 2009-01-20 20:25:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-0225.html