Bug 180568 - typo in spinlock.h? line 407
Summary: typo in spinlock.h? line 407
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jason Baron
QA Contact: Brian Brock
URL: http://bugs.digium.com/view.php?id=6425
Whiteboard:
Depends On:
Blocks: 181409
TreeView+ depends on / blocked
 
Reported: 2006-02-09 00:48 UTC by guenter strubinsky
Modified: 2013-03-06 05:59 UTC (History)
6 users (show)

Fixed In Version: RHSA-2006-0575
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-10 22:11:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch we're planning to inlucde for completeness (489 bytes, text/x-patch)
2006-03-29 18:11 UTC, Jason Baron
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0575 0 normal SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 4 Update 4 2006-08-10 04:00:00 UTC

Description guenter strubinsky 2006-02-09 00:48:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

Description of problem:
spinlock.h

line 407:

#define DEFINE_RWLOCK(x) rw_lock_t x = RW__LOCK_UNLOCK

gives compile error since rw_lock_t isn't defined.

However 

#define DEFINE_RWLOCK(x) rwlock_t x = RW__LOCK_UNLOCK

DOES compile because rwlock_t has been defined in lines 203-209 of the same include.

Since the difference is an underscore resp. the lack of an underscore in the name I could very well imagine that it's a typo.



Version-Release number of selected component (if applicable):
2.6.9-27-* (all)

How reproducible:
Always

Steps to Reproduce:
1.download from asterisk zaptel-1.2.3
2.make
3. See error messages

other solution (probbaly)

write a simple main() {}  program and #include the spinlock.h. I would assume the comilation fails too.
  

Actual Results:  compile error datatype assumed int (since not declared) but the value assigned is cast to a (rwlock_t) !!!

Expected Results:  clean compile.

Additional info:

Comment 1 Jason Baron 2006-02-09 20:45:46 UTC
AGreed. looks like a typo. will fix this up for U4. thanks.

Comment 2 guenter strubinsky 2006-02-10 00:42:54 UTC
Okay. Thanks!

Comment 4 Jared Smith 2006-03-29 15:46:24 UTC
One quick comment:

There's a typo in the fix shown above -- simple replace "rw_lock_t" with
"rwlock_t".  (The fix above accidentally changes RW__LOCK_UNLOCKED to
RW__LOCK_UNLOCK.)

I just wanted to make sure that this didn't bite anyone.  (I just had to make
that change on 22 machines for an Asterisk training class.)

Comment 5 guenter strubinsky 2006-03-29 17:39:47 UTC
Hah! A typo in the correction of a typo!

Comment 6 Jason Baron 2006-03-29 18:11:44 UTC
Created attachment 127008 [details]
patch we're planning to inlucde for completeness

Comment 7 Jared Smith 2006-03-29 20:40:35 UTC
Yes, the patch that Jason Baron attached correct :-)

Comment 8 Jason Baron 2006-03-30 23:00:23 UTC
committed in stream u3 build 34.10. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 10 Kurt Bauer 2006-05-16 14:51:39 UTC
Unfortunatly the typo still exists in 2.6.9-34.ELsmp, which happens to be the
latest kernel update via RHN for EL4.



Comment 11 Jason Baron 2006-05-16 15:05:37 UTC
indeed. -34 is the U3 kernel, and this bug is slated for inclusion in U4. thanks.

Comment 13 Mike Gahagan 2006-06-14 14:44:16 UTC
verified by code inspection pm -39.EL and the build of zaptel gets past where it
blew up on this bit of code in -34

Comment 15 Red Hat Bugzilla 2006-08-10 22:11:41 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 the 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-2006-0575.html



Note You need to log in before you can comment on or make changes to this bug.