Bug 499202 - New compilation warning in ext4 rebase
New compilation warning in ext4 rebase
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Eric Sandeen
Red Hat Kernel QE team
: Regression
Depends On:
  Show dependency treegraph
Reported: 2009-05-05 11:25 EDT by Eric Sandeen
Modified: 2009-09-02 04:57 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 04:57:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1243 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.4 kernel security and bug fix update 2009-09-01 04:53:34 EDT

  None (edit)
Description Eric Sandeen 2009-05-05 11:25:13 EDT
(A bit embarrasing, I re-introduced this after fixing it in 5.3, during the rebase - setting "regression" for this reason).

The ext4 code generates a warning when built on x86:

fs/ext4/inode.c: In function 'ext4_do_update_inode':
fs/ext4/inode.c:3047: warning: right shift count >= width of type

This is because upstream, the vfs i_version is a long long, but in rhel5 it's
only a long (so 32 bits on 32 bit machines) and we over-shift in that case.

Even though a 32-bit i_version might not be terribly useful for the intended
purpose, this should probably be fixed to avoid unexpected results.


Index: rhel5-kernel/fs/ext4/inode.c
--- rhel5-kernel.orig/fs/ext4/inode.c	2008-09-22 13:30:02.000000000 -0500
+++ rhel5-kernel/fs/ext4/inode.c	2008-09-22 14:55:39.493001278 -0500
@@ -3043,8 +3043,13 @@ static int ext4_do_update_inode(handle_t
 	raw_inode->i_disk_version = cpu_to_le32(inode->i_version);
 	if (ei->i_extra_isize) {
 		if (EXT4_FITS_IN_INODE(raw_inode, ei, i_version_hi))
+			/* in RHEL5 i_version is an unsigned long */
+#if BITS_PER_LONG == 64
 			raw_inode->i_version_hi =
 			cpu_to_le32(inode->i_version >> 32);
+			raw_inode->i_version_hi = 0;
 		raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
Comment 1 RHEL Product and Program Management 2009-05-05 11:29:08 EDT
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
Comment 4 Don Zickus 2009-05-12 13:41:49 EDT
in kernel-2.6.18-146.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.
Comment 8 errata-xmlrpc 2009-09-02 04:57:28 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 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.


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