Skip to content

Commit

Permalink
powerpc/iseries: Initialise on-stack completion
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Stephen Rothwell <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
mpe authored and ozbenh committed Jan 15, 2010
1 parent aa8b83c commit b0ff153
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/platforms/iseries/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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: "
Expand Down

0 comments on commit b0ff153

Please sign in to comment.