提交 0c8c77d3 编写于 作者: C Christian Borntraeger 提交者: Greg Kroah-Hartman

s390/ccwgroup: Fix memory corruption

commit 0b60f9ea (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: NChristian 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: NTejun Heo <tj@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b44b2140
......@@ -22,8 +22,8 @@ struct ccwgroup_device {
/* public: */
unsigned int count;
struct device dev;
struct ccw_device *cdev[0];
struct work_struct ungroup_work;
struct ccw_device *cdev[0];
};
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册