[PATCH] IDE: memset kmalloced gendisk structures

From: Kurt Garloff (garloff@suse.de)
Date: Wed Jul 17 2002 - 15:49:38 EST


Hi,

the IDE driver does kmalloc() memory for filling in the gendisk structure.
But it does neither copy an initialized structure in there nor does it
memset(,0,) the structure, so the fields not initialized explicitly
are filled with random values, often with 0x5a5a5a5a (slab poisoning) ...

This is bound to break as soon as some field gets added to the gendisk
struct; normally authors assume that the unknown/unused fields are
initialized to zero by the compiler.

Patch against 2.4.19rc1 attached.

-- 
Kurt Garloff                   <kurt@garloff.de>         [Eindhoven, NL]
Physics: Plasma simulations    <K.Garloff@TUE.NL>     [TU Eindhoven, NL]
Linux: SCSI, Security          <garloff@suse.de>    [SuSE Nuernberg, DE]
 (See mail header or public key servers for PGP2 and GPG public keys.)



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



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:24 EST