Merge branch 'tipc'
Jon Maloy says: ==================== tipc: corrections related to tasklet job mechanism These commits correct two bugs related to tipc' service for launching functions for asynchronous execution in a separate tasklet. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
231df15f1c
|
@ -113,7 +113,6 @@ int tipc_core_start_net(unsigned long addr)
|
||||||
static void tipc_core_stop(void)
|
static void tipc_core_stop(void)
|
||||||
{
|
{
|
||||||
tipc_netlink_stop();
|
tipc_netlink_stop();
|
||||||
tipc_handler_stop();
|
|
||||||
tipc_cfg_stop();
|
tipc_cfg_stop();
|
||||||
tipc_subscr_stop();
|
tipc_subscr_stop();
|
||||||
tipc_nametbl_stop();
|
tipc_nametbl_stop();
|
||||||
|
@ -146,9 +145,10 @@ static int tipc_core_start(void)
|
||||||
res = tipc_subscr_start();
|
res = tipc_subscr_start();
|
||||||
if (!res)
|
if (!res)
|
||||||
res = tipc_cfg_init();
|
res = tipc_cfg_init();
|
||||||
if (res)
|
if (res) {
|
||||||
|
tipc_handler_stop();
|
||||||
tipc_core_stop();
|
tipc_core_stop();
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +178,7 @@ static int __init tipc_init(void)
|
||||||
|
|
||||||
static void __exit tipc_exit(void)
|
static void __exit tipc_exit(void)
|
||||||
{
|
{
|
||||||
|
tipc_handler_stop();
|
||||||
tipc_core_stop_net();
|
tipc_core_stop_net();
|
||||||
tipc_core_stop();
|
tipc_core_stop();
|
||||||
pr_info("Deactivated\n");
|
pr_info("Deactivated\n");
|
||||||
|
|
|
@ -56,12 +56,13 @@ unsigned int tipc_k_signal(Handler routine, unsigned long argument)
|
||||||
{
|
{
|
||||||
struct queue_item *item;
|
struct queue_item *item;
|
||||||
|
|
||||||
|
spin_lock_bh(&qitem_lock);
|
||||||
if (!handler_enabled) {
|
if (!handler_enabled) {
|
||||||
pr_err("Signal request ignored by handler\n");
|
pr_err("Signal request ignored by handler\n");
|
||||||
|
spin_unlock_bh(&qitem_lock);
|
||||||
return -ENOPROTOOPT;
|
return -ENOPROTOOPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_bh(&qitem_lock);
|
|
||||||
item = kmem_cache_alloc(tipc_queue_item_cache, GFP_ATOMIC);
|
item = kmem_cache_alloc(tipc_queue_item_cache, GFP_ATOMIC);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
pr_err("Signal queue out of memory\n");
|
pr_err("Signal queue out of memory\n");
|
||||||
|
@ -112,10 +113,14 @@ void tipc_handler_stop(void)
|
||||||
struct list_head *l, *n;
|
struct list_head *l, *n;
|
||||||
struct queue_item *item;
|
struct queue_item *item;
|
||||||
|
|
||||||
if (!handler_enabled)
|
spin_lock_bh(&qitem_lock);
|
||||||
|
if (!handler_enabled) {
|
||||||
|
spin_unlock_bh(&qitem_lock);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
handler_enabled = 0;
|
handler_enabled = 0;
|
||||||
|
spin_unlock_bh(&qitem_lock);
|
||||||
|
|
||||||
tasklet_kill(&tipc_tasklet);
|
tasklet_kill(&tipc_tasklet);
|
||||||
|
|
||||||
spin_lock_bh(&qitem_lock);
|
spin_lock_bh(&qitem_lock);
|
||||||
|
|
Loading…
Reference in New Issue