netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: netdev@vger.kernel.org, "John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH 10/14] ipw2200: Fix kernel Oops if cmdlog debug is enabled
Date: Mon, 21 Aug 2006 11:38:28 +0800	[thread overview]
Message-ID: <20060821033828.GA5407@mail.intel.com> (raw)

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>

---

 drivers/net/wireless/ipw2200.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

b1822c22dbc0bd552b41f714ce38324325ecd8a5
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index 32b4ef8..a1df67f 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 ... */
-- 
1.2.6

                 reply	other threads:[~2006-08-21  3:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060821033828.GA5407@mail.intel.com \
    --to=yi.zhu@intel.com \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).