From: Dan Carpenter <dan.carpenter@oracle.com>
To: liuzy@marvell.com
Cc: linux-wireless@vger.kernel.org
Subject: re: mwifiex: add dump data debug support
Date: Fri, 29 May 2015 18:00:25 +0300 [thread overview]
Message-ID: <20150529150025.GB10313@mwanda> (raw)
Hello Zhaoyang Liu,
This is a semi-automatic email about new static checker warnings.
The patch 868093a9df75: "mwifiex: add dump data debug support" from
May 12, 2015, leads to the following Smatch complaint:
drivers/net/wireless/mwifiex/cmdevt.c:475 mwifiex_process_event()
error: we previously assumed 'skb' could be null (see line 467)
drivers/net/wireless/mwifiex/cmdevt.c
466
467 if (skb) {
^^^
Old check for NULL.
468 rx_info = MWIFIEX_SKB_RXCB(skb);
469 memset(rx_info, 0, sizeof(*rx_info));
470 rx_info->bss_num = priv->bss_num;
471 rx_info->bss_type = priv->bss_type;
472 }
473
474 mwifiex_dbg(adapter, EVENT, "EVENT: cause: %#x\n", eventcause);
475 mwifiex_dbg_dump(adapter, EVT_D, "Event Buf:", skb->data, skb->len);
^^^^^
Patch introduces unchecked dereference.
476
477 if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP)
regards,
dan carpenter
reply other threads:[~2015-05-29 15:00 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=20150529150025.GB10313@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-wireless@vger.kernel.org \
--cc=liuzy@marvell.com \
/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