sgi-xp: fix writing past the end of kzalloc()'d space
authorDean Nelson <dcn@sgi.com>
Wed, 4 Feb 2009 23:12:24 +0000 (15:12 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Feb 2009 17:31:03 +0000 (09:31 -0800)
commit70a7607eecf3cf7dd4cd03627ff244ae7b3729e5
treee0e6e7fba7f3f9bacae04777c371475ac1d7252c
parentbdb6a508be1efd20d813f4e09203d42da94c9f54
sgi-xp: fix writing past the end of kzalloc()'d space

commit 361916a943cd9dbda1c0b00879d0225cc919d868 upstream.

A missing type cast results in writing way beyond the end of a kzalloc()'d
memory segment resulting in slab corruption. But it seems like the better
solution is to define ->recv_msg_slots as a 'void *' rather than a
'struct xpc_notify_mq_msg_uv *' and add the type cast.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/misc/sgi-xp/xpc.h
drivers/misc/sgi-xp/xpc_uv.c