The patch titled wireless: iwlwifi3945/4965 - fix incorrect counting of memory has been added to the -mm tree. Its filename is wireless-iwlwifi3945-4965-fix-incorrect-counting-of-memory.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: wireless: iwlwifi3945/4965 - fix incorrect counting of memory From: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Fix incorrect counting of memory allocated by kmalloc. It seems that could lead to allocated memory overrun and corrupt nearlaid memory area. Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Acked-by: "Tomas Winkler" <tomasw@xxxxxxxxx> Cc: "John W. Linville" <linville@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +- drivers/net/wireless/iwlwifi/iwl4965-base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/net/wireless/iwlwifi/iwl3945-base.c~wireless-iwlwifi3945-4965-fix-incorrect-counting-of-memory drivers/net/wireless/iwlwifi/iwl3945-base.c --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c~wireless-iwlwifi3945-4965-fix-incorrect-counting-of-memory +++ a/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -6646,7 +6646,7 @@ static void iwl3945_bg_request_scan(stru * that based on the direct_mask added to each channel entry */ scan->tx_cmd.len = cpu_to_le16( iwl3945_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data, - IWL_MAX_SCAN_SIZE - sizeof(scan), 0)); + IWL_MAX_SCAN_SIZE - sizeof(*scan), 0)); scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id; scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; diff -puN drivers/net/wireless/iwlwifi/iwl4965-base.c~wireless-iwlwifi3945-4965-fix-incorrect-counting-of-memory drivers/net/wireless/iwlwifi/iwl4965-base.c --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c~wireless-iwlwifi3945-4965-fix-incorrect-counting-of-memory +++ a/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -7066,7 +7066,7 @@ static void iwl4965_bg_request_scan(stru * that based on the direct_mask added to each channel entry */ scan->tx_cmd.len = cpu_to_le16( iwl4965_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data, - IWL_MAX_SCAN_SIZE - sizeof(scan), 0)); + IWL_MAX_SCAN_SIZE - sizeof(*scan), 0)); scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id; scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; _ Patches currently in -mm which might be from gorcunov@xxxxxxxxx are cris-add-missed-local_irq_restore-call.patch git-powerpc.patch tcm825xfix-logical-typo-error.patch wireless-iwlwifi3945-4965-fix-incorrect-counting-of-memory.patch git-x86.patch driver-ip27-rtc-convert-ioctl-to-unlocked_ioctl-v2.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html