Skip to content

Commit

Permalink
[PATCH] ipw2200: Fix kernel Oops if cmdlog debug is enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhu Yi authored and John W. Linville committed Aug 29, 2006
1 parent d5f7ac2 commit b9bec76
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/wireless/ipw2200.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ... */
Expand Down

0 comments on commit b9bec76

Please sign in to comment.