mac80211: correct size the argument to kzalloc in
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Thomas Huehn
Hi Dan,
I allready fixed this in my patch v3 on the list a couple of days ago.
You'll have to sent a patch which applies on top of linux-next because your other patch was already applied.
Please don't drop the list from the CC.
regards,
dan carpenter
Quoted 6 lines · Dan Carpenter
Quoted 4 lines · Thomas Huehn
Hi Dan,
I allready fixed this in my patch v3 on the list a couple of days ago.
Quoted 7 lines
You'll have to sent a patch which applies on top of linux-next because your other patch was already applied.
Please don't drop the list from the CC.
regards,
dan carpenter
Thx Dan ...new patch is sent.
Bye Thomas