Bug 54393 - sprintf format strings wrong in ide drivers
Summary: sprintf format strings wrong in ide drivers
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.3
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-05 17:05 UTC by Philip Pokorny
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-10-05 17:05:46 UTC
Embargoed:


Attachments (Terms of Use)

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)


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