[doc] Full audit of 'make allmodconfig' uninit warnings

From: Jeff Garzik
Date: Sun Oct 01 2006 - 15:59:58 EST



Ok, done with the first pass on x86_64. I break down each and every
uninit warning. There were more Real Bugs than I would have guessed.

There are three categories:

1) gcc bugs, and things highly difficult for the compiler to figure out.
2) confirmed kernel bugs. already created patches for several of these.
3) other stuff. explanations inline.


1) COMPILER ANALYSIS DIFFICULTIES AND BUGS
------------------------------------------
arch/x86_64/kernel/../../i386/kernel/microcode.c:387: warning: ânew_mcâ may be used uninitialized in this function
drivers/ata/pata_artop.c:429: warning: âinfoâ may be used uninitialized in this function
drivers/infiniband/hw/mthca/mthca_qp.c:1529: warning: âf0â may be used uninitialized in this function
drivers/infiniband/hw/mthca/mthca_qp.c:1872: warning: âf0â may be used uninitialized in this function
drivers/net/r8169.c:2221: warning: âtxdâ may be used uninitialized in this function
drivers/net/wan/sbni.c:598: warning: âframelenâ may be used uninitialized in this function
drivers/usb/misc/auerswald.c:667: warning: âlengthâ may be used uninitialized in this function
drivers/usb/net/kaweth.c:1213: warning: âlengthâ may be used uninitialized in this function
drivers/video/matrox/matroxfb_maven.c:287: warning: âpâ may be used uninitialized in this function
drivers/video/matrox/matroxfb_maven.c:718: warning: âaâ may be used uninitialized in this function
drivers/video/matrox/matroxfb_maven.c:718: warning: âbâ may be used uninitialized in this function
drivers/video/matrox/matroxfb_maven.c:718: warning: âh2â may be used uninitialized in this function
fs/bio.c:169: warning: âidxâ may be used uninitialized in this function
fs/eventpoll.c:500: warning: âfdâ may be used uninitialized in this function
fs/jfs/jfs_txnmgr.c:1922: warning: âpxd.addr1â may be used uninitialized in this function
fs/jfs/jfs_txnmgr.c:1922: warning: âpxd.addr2â may be used uninitialized in this function
fs/jfs/jfs_txnmgr.c:1922: warning: âpxd.lenâ may be used uninitialized in this function
ipc/msg.c:341: warning: âsetbuf.gidâ may be used uninitialized in this function
ipc/msg.c:341: warning: âsetbuf.modeâ may be used uninitialized in this function
ipc/msg.c:341: warning: âsetbuf.qbytesâ may be used uninitialized in this function
ipc/msg.c:341: warning: âsetbuf.uidâ may be used uninitialized in this function
ipc/sem.c:809: warning: âsetbuf.gidâ may be used uninitialized in this function
ipc/sem.c:809: warning: âsetbuf.modeâ may be used uninitialized in this function
ipc/sem.c:809: warning: âsetbuf.uidâ may be used uninitialized in this function
fs/ocfs2/dlm/dlmdomain.c:918: warning: âresponseâ may be used uninitialized in this function
fs/ocfs2/vote.c:667: warning: âresponseâ may be used uninitialized in this function
fs/udf/balloc.c:751: warning: âgoal_eloc.logicalBlockNumâ may be used uninitialized in this function
fs/udf/super.c:1363: warning: âino.partitionReferenceNumâ may be used uninitialized in this function
kernel/auditfilter.c:1164: warning: ândpâ may be used uninitialized in this function
kernel/auditfilter.c:1164: warning: ândwâ may be used uninitialized in this function
kernel/auditfilter.c:1599: warning: âstateâ may be used uninitialized in this function
sound/pci/pcxhr/pcxhr.c:640: warning: âstreamâ may be used uninitialized in this function

2) KERNEL BUGS
--------------
drivers/ata/pata_atiixp.c:118: warning: âwanted_pioâ may be used uninitialized in this function
--> Needs BUG() to be marked 'noreturn'
drivers/atm/ambassador.c:1049: warning: âtx_rate_bitsâ may be used uninitialized in this function
drivers/atm/firestream.c:870: warning: âtmc0â may be used uninitialized in this function
drivers/atm/zatm.c:919: warning: âpcrâ may be used uninitialized in this function
--> ATM bug descriptions on LKML
drivers/char/ipmi/ipmi_si_intf.c:1733: warning: âdata.irqâ may be used uninitialized in this function
--> Patch sent to LKML
drivers/net/wan/pc300_drv.c:2870: warning: âbrâ may be used uninitialized in this function
--> Description sent to LKML, netdev, maintainer
drivers/scsi/ips.c:7123: warning: âindexâ may be used uninitialized in this function
--> Description sent to LKML, linux-scsi
drivers/video/aty/aty128fb.c:1511: warning: âpll.post_dividerâ may be used uninitialized in this function
--> Might be OK, might need to return an error. Prefer the latter.
drivers/video/riva/riva_hw.c:1241: warning: âmâ may be used uninitialized in this function
drivers/video/riva/riva_hw.c:1241: warning: ânâ may be used uninitialized in this function
drivers/video/riva/riva_hw.c:1241: warning: âpâ may be used uninitialized in this function
drivers/video/riva/riva_hw.c:1241: warning: âVClkâ may be used uninitialized in this function
--> Unhandled error return... but error propagation is difficult.


3) MISCELLANEOUS
----------------
drivers/telephony/ixj.c:3448: warning: âblankword.highâ may be used uninitialized in this function
drivers/telephony/ixj.c:3448: warning: âblankword.lowâ may be used uninitialized in this function
drivers/telephony/ixj.c:4847: warning: âbytes.highâ may be used uninitialized in this function

--> Difficult to answer without knowning the hardware well,
or doing a _really_ deep analysis.


fs/jffs2/readinode.c:664: warning: âfd_listâ may be used uninitialized in this function
fs/jffs2/readinode.c:667: warning: âlatest_mctimeâ may be used uninitialized in this function

--> Code makes my fscking eyes bleed. Gave up.



net/ipv4/tcp_input.c:2262: warning: âtv.tv_secâ may be used uninitialized in this function
net/ipv4/tcp_input.c:2262: warning: âtv.tv_usecâ may be used uninitialized in this function

--> Difficult to analyze. Requires knowing about flags and
conditions that occur in other parts of the code.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/