Explorar o código

[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 <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhu Yi %!s(int64=19) %!d(string=hai) anos
pai
achega
b9bec768c3
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      drivers/net/wireless/ipw2200.h

+ 8 - 1
drivers/net/wireless/ipw2200.h

@@ -1950,10 +1950,17 @@ struct host_cmd {
 	u32 *param;
 	u32 *param;
 } __attribute__ ((packed));
 } __attribute__ ((packed));
 
 
+struct cmdlog_host_cmd {
+	u8 cmd;
+	u8 len;
+	u16 reserved;
+	char param[124];
+} __attribute__ ((packed));
+
 struct ipw_cmd_log {
 struct ipw_cmd_log {
 	unsigned long jiffies;
 	unsigned long jiffies;
 	int retcode;
 	int retcode;
-	struct host_cmd cmd;
+	struct cmdlog_host_cmd cmd;
 };
 };
 
 
 /* SysConfig command parameters ... */
 /* SysConfig command parameters ... */