Commit 0c8c77d35582c3f7989f1316368da5ae7f14ad4b

Authored by Christian Borntraeger
Committed by Greg Kroah-Hartman
1 parent b44b214026

s390/ccwgroup: Fix memory corruption

commit 0b60f9ead5d4816e7e3d6e28f4a0d22d4a1b2513 (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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/s390/include/asm/ccwgroup.h
... ... @@ -22,8 +22,8 @@
22 22 /* public: */
23 23 unsigned int count;
24 24 struct device dev;
25   - struct ccw_device *cdev[0];
26 25 struct work_struct ungroup_work;
  26 + struct ccw_device *cdev[0];
27 27 };
28 28  
29 29 /**