All of lore.kernel.org
 help / color / mirror / Atom feed
* re: mac80211: correct size the argument to kzalloc in
@ 2012-07-02 11:59 Dan Carpenter
       [not found] ` <4FF18E57.7040704@net.t-labs.tu-berlin.de>
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-07-02 11:59 UTC (permalink / raw)
  To: thomas; +Cc: linux-wireless

minstrel_ht

Hello Thomas Huehn,

The patch 0a08adeb773c: "mac80211: correct size the argument to
kzalloc in minstrel_ht" from Jun 29, 2012, leads to the following
Sparse warning:
	net/mac80211/rc80211_minstrel_ht.c:816:33:
		warning: expression using sizeof(void)

-       msp->ratelist = kzalloc(sizeof(struct minstrel_rate) * max_rates, gfp);
+       msp->ratelist = kzalloc(sizeof(*msp->ratelist) * max_rates, gfp);
        if (!msp->ratelist)
                goto error;

"msp->ratelist" is a void pointer so that will cause memory corruption.
You could consider making it a struct minstrel_rate pointer.  I haven't
looked at this.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-02 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 11:59 mac80211: correct size the argument to kzalloc in Dan Carpenter
     [not found] ` <4FF18E57.7040704@net.t-labs.tu-berlin.de>
2012-07-02 12:26   ` Dan Carpenter
2012-07-02 12:41     ` Thomas Huehn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.