]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ccwgroup: Fix memory corruption
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 23 Apr 2014 18:58:45 +0000 (20:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2014 19:25:14 +0000 (12:25 -0700)
commit9b7776d2ef5591aad1390256a59117038cfe9c8a
tree0a166093a460b69fc1ec02e6f216708155f70710
parent586aaa52bf7a9e2cf8ac802a16445a7bbed11583
s390/ccwgroup: Fix memory corruption

commit 9e73fc9226119c51ae5231aa722b38b5eb1afe97 (s390: use
device_remove_file_self() instead of device_schedule_callback())

caused random memory corruption on my s390 box. Turns out that the
last element of the ccwgroup structure is of dynamic size, so we
must move the newly introduced work structure _before_ the zero
length array.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: Tejun Heo <tj@kernel.org>
CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
CC: Sebastian Ott <sebott@linux.vnet.ibm.com>
CC: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/include/asm/ccwgroup.h