From: Zhu Yi Date: Mon, 21 Aug 2006 03:38:28 +0000 (+0800) Subject: [PATCH] ipw2200: Fix kernel Oops if cmdlog debug is enabled X-Git-Tag: v2.6.19-rc1~1263^2~60^2~7 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9bec768c321e51a8da00d56230bc795464992b2;p=linux-2.6-omap-h63xx.git [PATCH] ipw2200: Fix kernel Oops if cmdlog debug is enabled When command error log debug is enabled, we write every host command and parameters into a buffer. But we didn't alloc the parameter buffer for this case. The patch adds struct cmdlog_host_cmd so that the buffer is allocated from the stack. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index 32b4ef883aa..a1df67f3ede 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h @@ -1950,10 +1950,17 @@ struct host_cmd { u32 *param; } __attribute__ ((packed)); +struct cmdlog_host_cmd { + u8 cmd; + u8 len; + u16 reserved; + char param[124]; +} __attribute__ ((packed)); + struct ipw_cmd_log { unsigned long jiffies; int retcode; - struct host_cmd cmd; + struct cmdlog_host_cmd cmd; }; /* SysConfig command parameters ... */