Bug 54393

Summary: sprintf format strings wrong in ide drivers
Product: [Retired] Red Hat Linux Reporter: Philip Pokorny <ppokorny>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: 7.3   
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: 2001-10-05 17:05:46 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 Philip Pokorny 2001-10-05 17:05:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.2.16-3 i586)

Description of problem:
Several variables in the ide driver have been upgraded to 64 bit.  These
values sometimes need to be printed.  The IDE drivers use %llu or %lld to
print them, but the kernel implementation of vnsprintf uses %Lu and %Ld for
'long long' values.

The result is that 'cat /proc/ide/hda/capacity' produces '%lu' instead of
'123456789'

The following is a count of %ll's in files below the 'drivers' directory.

[root@av drivers]# find . -type f -print | xargs grep '%ll' | awk -F:
'{print $1}' | uniq -c
      7 ./ide/ide-disk.c
      1 ./ide/ide-proc.c
      2 ./ide/ide-taskfile.c
      1 ./ide/ide.c
[root@av drivers]# 


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


How reproducible:
Always

Steps to Reproduce:
1. cat /proc/ide/hda/capacity
	

Actual Results:  %lu

Expected Results:  123456789

Additional info:

I'm classifying this "loss of data" since I've "lost the data" in the /proc
filesystem of the capacity of the drive...

Comment 1 Arjan van de Ven 2001-10-05 17:15:11 UTC
Thank you for this report; I've fixed all occurences in the IDE drivers;
will be in 2.4.9-0.20.2 or later (available from the same place once they are
built, probably tomorrow)