Skip to content

Commit

Permalink
zero the stack buffer before giving random garbage to the SCU
Browse files Browse the repository at this point in the history
some messages take 4 bytes, but only fill 3 bytes....
this patch makes sure that whatever we send to the SCU is zeroed first

Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
fenrus75 authored and Matthew Garrett committed Aug 3, 2010
1 parent 51cd525 commit ed6f2b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/platform/x86/intel_scu_ipc.c
Original file line number Diff line number Diff line change
@@ -162,6 +162,8 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)

mutex_lock(&ipclock);

memset(cbuf, 0, sizeof(cbuf));

if (ipcdev.pdev == NULL) {
mutex_unlock(&ipclock);
return -ENODEV;

0 comments on commit ed6f2b4

Please sign in to comment.