3.2.17-stable review
Subsystems (87)
PATCH 163/167 iwlwifi: use 6000G2B for 6030 device series
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wey-Yi Guy <[email protected]>
commit 1ed2ec37b44e86eaa8e0a03b908a39c80f65ee45 upstream.
"iwlwifi: use correct released ucode version" change the ucode api ok from 6000G2 to 6000G2B, but it shall belong to 6030 device series, not the 6005 device series. Fix it
--- drivers/net/wireless/iwlwifi/iwl-6000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-6000.c +2 -2
@@ -361,7 +361,7 @@#define IWL_DEVICE_6005 \ .fw_name_pre = IWL6005_FW_PRE, \ .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ - .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ + .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \ .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
@@ -402,7 +402,7 @@#define IWL_DEVICE_6030 \ .fw_name_pre = IWL6030_FW_PRE, \ .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ - .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ + .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
PATCH 164/167 exit_signal: simplify the "we have changed execution domain" logic
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <[email protected]>
commit e636825346b36a07ccfc8e30946d52855e21f681 upstream.
exit_notify() checks "tsk->self_exec_id != tsk->parent_exec_id" to handle the "we have changed execution domain" case.
We can change do_thread() to always set ->exit_signal = SIGCHLD and remove this check to simplify the code.
We could change setup_new_exec() instead, this looks more logical because it increments ->self_exec_id. But note that de_thread() already resets ->exit_signal if it changes the leader, let's keep both changes close to each other.
Note that we change ->exit_signal lockless, this changes the rules. Thereafter ->exit_signal is not stable under tasklist but this is fine, the only possible change is OLDSIG -> SIGCHLD. This can race with eligible_child() but the race is harmless. We can race with reparent_leader() which changes our ->exit_signal in parallel, but it does the same change to SIGCHLD.
The noticeable user-visible change is that the execing task is not "visible" to do_wait()->eligible_child(__WCLONE) right after exec. To me this looks more logical, and this is consistent with mt case.
--- fs/exec.c | 3 +++ kernel/exit.c | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-)
fs/exec.c +3 -0
@@ -977,6 +977,9 @@ static int de_thread(struct task_struct *tsk) sig->notify_count =0 ; no_thread_group: +/* we have changed execution domain */ + tsk->exit_signal =SIGCHLD ; +if (current->mm)setmax_mm_hiwater_rss (&sig->maxrss, current->mm);
kernel/exit.c +1 -6
@@ -827,14 +827,9 @@ static void exit_notify(struct task_struct *tsk, int group_dead)* If the parent exec id doesn't match the exec id we saved * when we started then we know the parent has changed security * domain. -* -* If our self_exec id doesn't match our parent_exec_id then -* we have changed execution domain as these two values started -* the same after a fork. */ if (thread_group_leader (tsk) && tsk->exit_signal !=SIGCHLD && - (tsk->parent_exec_id != tsk->real_parent->self_exec_id || - tsk->self_exec_id != tsk->parent_exec_id)) + tsk->parent_exec_id != tsk->real_parent->self_exec_id) tsk->exit_signal =SIGCHLD ;if (unlikely (tsk->ptrace)) {
Signature · 1 line
1.7.10
PATCH 165/167 exit_signal: fix the "parent has changed security domain" logic
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <[email protected]>
commit b6e238dceed36891cc633167afe7151f1f3d83c5 upstream.
exit_notify() changes ->exit_signal if the parent already did exec. This doesn't really work, we are not going to send the signal now if there is another live thread or the exiting task is traced. The parent can exec before the last dies or the tracer detaches.
Move this check into do_notify_parent() which actually sends the signal.
The user-visible change is that we do not change ->exit_signal, and thus the exiting task is still "clone children" for do_wait()->eligible_child(__WCLONE). Hopefully this is fine, the current logic is racy anyway.
--- kernel/exit.c | 14 -------------- kernel/signal.c | 9 +++++++++ 2 files changed, 9 insertions(+), 14 deletions(-)
kernel/exit.c +0 -14
@@ -818,20 +818,6 @@ static void exit_notify(struct task_struct *tsk, int group_dead)if (group_dead)kill_orphaned_pgrp (tsk->group_leader,NULL ); -/* Let father know we died -* -* Thread signals are configurable, but you aren't going to use -* that to send signals to arbitrary processes. -* That stops right now. -* -* If the parent exec id doesn't match the exec id we saved -* when we started then we know the parent has changed security -* domain. -*/ -if (thread_group_leader (tsk) && tsk->exit_signal !=SIGCHLD && - tsk->parent_exec_id != tsk->real_parent->self_exec_id) - tsk->exit_signal =SIGCHLD ; -if (unlikely (tsk->ptrace)) {int sig =thread_group_leader (tsk) && thread_group_empty(tsk) &&
kernel/signal.c +9 -0
@@ -1652,6 +1652,15 @@ bool do_notify_parent(struct task_struct *tsk, int sig)BUG_ON (!tsk->ptrace && (tsk->group_leader != tsk || !thread_group_empty (tsk))); +if (sig !=SIGCHLD ) { +/* +* This is only possible if parent == real_parent. +* Check if it has changed security domain. +*/ +if (tsk->parent_exec_id != tsk->parent->self_exec_id) + sig =SIGCHLD ; + } + info.si_signo = sig; info.si_errno =0 ;/*
Signature · 1 line
1.7.10
PATCH 166/167 staging: r8712u: Fix regression caused by commit 8c213fa
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <[email protected]>
commit 2080913e017ab9f88379d93fd09546ad95faf87b upstream.
In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading", the command to release the firmware was placed in the wrong routine.
In combination with the bug introduced in commit a5ee652 "staging: r8712u:
Interface-state not fully tracked", the driver attempts to upload firmware that had already been released. This bug is the source of one of the problems in https://bugs.archlinux.org/task/27996#comment89833.
--- drivers/staging/rtl8712/os_intfs.c | 3 --- drivers/staging/rtl8712/usb_intf.c | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/os_intfs.c +0 -3
@@ -475,9 +475,6 @@ static int netdev_close(struct net_device *pnetdev)r8712_free_assoc_resources (padapter);/*s2-4.*/ r8712_free_network_queue (padapter); -release_firmware (padapter->fw); -/* never exit with a firmware callback pending */ -wait_for_completion (&padapter->rtl8712_fw_ready);return 0 ; }
drivers/staging/rtl8712/usb_intf.c +5 -0
@@ -30,6 +30,7 @@#include <linux/usb.h> #include <linux/module.h> +#include <linux/firmware.h> #include "osdep_service.h" #include "drv_types.h"
@@ -620,6 +621,10 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)struct _adapter *padapter =netdev_priv (pnetdev);struct usb_device *udev =interface_to_usbdev (pusb_intf); +if (padapter->fw_found) +release_firmware (padapter->fw); +/* never exit with a firmware callback pending */ +wait_for_completion (&padapter->rtl8712_fw_ready);usb_set_intfdata (pusb_intf,NULL );if (padapter) {if (drvpriv.drv_registered == true)
Signature · 1 line
1.7.10
Re: [ 166/167] [PATCH] staging: r8712u: Fix regression caused by commit 8c213fa
Quoted 53 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <[email protected]>
commit
2080913e017ab9f88379d93fd09546ad95faf87bupstream.In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading", the command to release the firmware was placed in the wrong routine.
In combination with the bug introduced in commit a5ee652 "staging: r8712u:
Interface-state not fully tracked", the driver attempts to upload firmware that had already been released. This bug is the source of one of the problems in https://bugs.archlinux.org/task/27996#comment89833.Tested-by Adrian <[email protected]>Signed-off-by Larry Finger <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Signed-off-by Ben Hutchings <[email protected]>--- drivers/staging/rtl8712/os_intfs.c | 3 --- drivers/staging/rtl8712/usb_intf.c | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-)drivers/staging/rtl8712/os_intfs.c +0
-3@@ -475,9 +475,6 @@ static int netdev_close(struct net_device *pnetdev)r8712_free_assoc_resources (padapter);/*s2-4.*/ r8712_free_network_queue (padapter); -release_firmware (padapter->fw); -/* never exit with a firmware callback pending */ -wait_for_completion (&padapter->rtl8712_fw_ready);return 0 ; }drivers/staging/rtl8712/usb_intf.c +1
-0@@ -30,6 +30,7 @@#include <linux/usb.h> #include <linux/module.h> +#include <linux/firmware.h> #include "osdep_service.h" #include "drv_types.h"
drivers/staging/rtl8712/usb_intf.c static void r871xu_dev_remove(struct usb_interface *pusb_intf) · line 627
Quoted 7 lines
drivers/staging/rtl8712/usb_intf.c +4
-0@@ -620,6 +621,10 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)struct _adapter *padapter =netdev_priv (pnetdev);struct usb_device *udev =interface_to_usbdev (pusb_intf); +if (padapter->fw_found) +release_firmware (padapter->fw); +/* never exit with a firmware callback pending */ +wait_for_completion (&padapter->rtl8712_fw_ready);
We also need to apply commit ee6aeff71e2f16b9fe95ce908d098c169e0f4004 after this, due to the possible invalid padapter dereference.
Quoted 13 lines
drivers/staging/rtl8712/usb_intf.c +0
-0usb_set_intfdata (pusb_intf,NULL );if (padapter) {if (drvpriv.drv_registered == true)Signature · 8 lines
1.7.10 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [ 166/167] [PATCH] staging: r8712u: Fix regression caused by commit 8c213fa
Quoted 8 lines · Herton Ronaldo Krzesinski
Quoted 7 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <[email protected]>
commit
2080913e017ab9f88379d93fd09546ad95faf87bupstream.
[...]
Quoted 14 lines
Quoted 14 lines
drivers/staging/rtl8712/usb_intf.c +1
-0@@ -30,6 +30,7 @@#include <linux/usb.h> #include <linux/module.h> +#include <linux/firmware.h> #include "osdep_service.h" #include "drv_types.h" @@ -620,6 +621,10 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)struct _adapter *padapter =netdev_priv (pnetdev);struct usb_device *udev =interface_to_usbdev (pusb_intf);
Quoted 7 lines
drivers/staging/rtl8712/usb_intf.c static void r871xu_dev_remove(struct usb_interface *pusb_intf) · line 627
Quoted 4 lines
drivers/staging/rtl8712/usb_intf.c +4
-0+if (padapter->fw_found) +release_firmware (padapter->fw); +/* never exit with a firmware callback pending */ +wait_for_completion (&padapter->rtl8712_fw_ready);We also need to apply commit
ee6aeff71e2f16b9fe95ce908d098c169e0f4004after this, due to the possible invalid padapter dereference.
[...]
That 'fix' makes no sense since netdev_priv() never returns NULL.
Larry, you should remove the test for pAdapter completely, or if pnetdev can somehow be NULL then test *that*.
Ben.
Signature · 3 lines
Ben Hutchings
Life is what happens to you while you're busy making other plans.
- John LennonRe: [ 166/167] [PATCH] staging: r8712u: Fix regression caused by commit 8c213fa
Quoted 31 lines · Ben Hutchings
Quoted 8 lines · Herton Ronaldo Krzesinski
Quoted 7 lines · Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger<[email protected]>
commit
2080913e017ab9f88379d93fd09546ad95faf87bupstream.[...]
Quoted 14 lines
Quoted 14 lines
drivers/staging/rtl8712/usb_intf.c +1
-0@@ -30,6 +30,7 @@#include <linux/usb.h> #include <linux/module.h> +#include <linux/firmware.h> #include "osdep_service.h" #include "drv_types.h" @@ -620,6 +621,10 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)struct _adapter *padapter =netdev_priv (pnetdev);struct usb_device *udev =interface_to_usbdev (pusb_intf);Quoted 7 lines
drivers/staging/rtl8712/usb_intf.c static void r871xu_dev_remove(struct usb_interface *pusb_intf) · line 627
Quoted 4 lines
drivers/staging/rtl8712/usb_intf.c +4
-0+if (padapter->fw_found) +release_firmware (padapter->fw); +/* never exit with a firmware callback pending */ +wait_for_completion (&padapter->rtl8712_fw_ready);We also need to apply commit
ee6aeff71e2f16b9fe95ce908d098c169e0f4004after this, due to the possible invalid padapter dereference.
Quoted 6 lines
[...]
That 'fix' makes no sense since
netdev_priv()never returns NULL.Larry, you should remove the test for pAdapter completely, or if pnetdev can somehow be NULL then test *that*.
Thanks. I have a patch under testing.
Larry
PATCH 167/167 smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Pisati <[email protected]>
commit 07d69d4238418746a7b85c5d05ec17c658a2a390 upstream.
Without this patch sysfs reports the cable as present
flag@flag-desktop:~$ cat /sys/class/net/eth0/carrier 1
while it's not:
flag@flag-desktop:~$ sudo mii-tool eth0 eth0: no link
Tested on my Beagle XM.
v2: added mantainer to the list of recipient
--- drivers/net/usb/smsc95xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/smsc95xx.c +1 -1
@@ -1192,7 +1192,7 @@ static const struct driver_info smsc95xx_info = { .rx_fixup = smsc95xx_rx_fixup, .tx_fixup = smsc95xx_tx_fixup, .status = smsc95xx_status, - .flags = FLAG_ETHER | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_SEND_ZLP | FLAG_LINK_INTR, };static const struct usb_device_id products[] = {
Signature · 1 line
1.7.10