dect
/
linux-2.6
Archived
13
0
Fork 0

powerpc/iseries: Initialise on-stack completion

get_viotape_info() declares a vio_waitevent on the stack, which
contains a completion, but never initialises the completion.

I have no idea how this ever worked, and on recent kernels it causes
an oops in handle_tape_event() when we access the non-initialised
completion.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Michael Ellerman 2010-01-12 21:10:56 +00:00 committed by Benjamin Herrenschmidt
parent aa8b83cb0b
commit b0ff153cd6
1 changed files with 2 additions and 0 deletions

View File

@ -474,6 +474,8 @@ static void __init get_viotape_info(struct device_node *vio_root)
struct vio_waitevent we;
int ret;
init_completion(&we.com);
ret = viopath_open(viopath_hostLp, viomajorsubtype_tape, 2);
if (ret) {
printk(KERN_WARNING "get_viotape_info: "