Bug 180568 - typo in spinlock.h? line 407
typo in spinlock.h? line 407
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Baron
Brian Brock
Depends On:
Blocks: 181409
  Show dependency treegraph
Reported: 2006-02-08 19:48 EST by guenter strubinsky
Modified: 2013-03-06 00:59 EST (History)
6 users (show)

See Also:
Fixed In Version: RHSA-2006-0575
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-10 18:11:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description guenter strubinsky 2006-02-08 19:48:19 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060111 Firefox/

Description of problem:

line 407:

#define DEFINE_RWLOCK(x) rw_lock_t x = RW__LOCK_UNLOCK

gives compile error since rw_lock_t isn't defined.


#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:

Steps to Reproduce:
1.download from asterisk zaptel-1.2.3
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 15:45:46 EST
AGreed. looks like a typo. will fix this up for U4. thanks.
Comment 2 guenter strubinsky 2006-02-09 19:42:54 EST
Okay. Thanks!
Comment 4 Jared Smith 2006-03-29 10:46:24 EST
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

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 12:39:47 EST
Hah! A typo in the correction of a typo!
Comment 6 Jason Baron 2006-03-29 13:11:44 EST
Created attachment 127008 [details]
patch we're planning to inlucde for completeness
Comment 7 Jared Smith 2006-03-29 15:40:35 EST
Yes, the patch that Jason Baron attached correct :-)
Comment 8 Jason Baron 2006-03-30 18:00:23 EST
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 10:51:39 EDT
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 11:05:37 EDT
indeed. -34 is the U3 kernel, and this bug is slated for inclusion in U4. thanks.
Comment 13 Mike Gahagan 2006-06-14 10:44:16 EDT
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 18:11:41 EDT
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.


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