diff options
Diffstat (limited to 'ipc')
| -rw-r--r-- | ipc/sem.c | 10 |
1 files changed, 2 insertions, 8 deletions
| @@ -689,12 +689,6 @@ static int count_semzcnt (struct sem_array * sma, ushort semnum) | |||
| 689 | return semzcnt; | 689 | return semzcnt; |
| 690 | } | 690 | } |
| 691 | 691 | ||
| 692 | static void free_un(struct rcu_head *head) | ||
| 693 | { | ||
| 694 | struct sem_undo *un = container_of(head, struct sem_undo, rcu); | ||
| 695 | kfree(un); | ||
| 696 | } | ||
| 697 | |||
| 698 | /* Free a semaphore set. freeary() is called with sem_ids.rw_mutex locked | 692 | /* Free a semaphore set. freeary() is called with sem_ids.rw_mutex locked |
| 699 | * as a writer and the spinlock for this semaphore set hold. sem_ids.rw_mutex | 693 | * as a writer and the spinlock for this semaphore set hold. sem_ids.rw_mutex |
| 700 | * remains locked on exit. | 694 | * remains locked on exit. |
| @@ -714,7 +708,7 @@ static void freeary(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp) | |||
| 714 | un->semid = -1; | 708 | un->semid = -1; |
| 715 | list_del_rcu(&un->list_proc); | 709 | list_del_rcu(&un->list_proc); |
| 716 | spin_unlock(&un->ulp->lock); | 710 | spin_unlock(&un->ulp->lock); |
| 717 | call_rcu(&un->rcu, free_un); | 711 | kfree_rcu(un, rcu); |
| 718 | } | 712 | } |
| 719 | 713 | ||
| 720 | /* Wake up all pending processes and let them fail with EIDRM. */ | 714 | /* Wake up all pending processes and let them fail with EIDRM. */ |
| @@ -1612,7 +1606,7 @@ void exit_sem(struct task_struct *tsk) | |||
| 1612 | sem_unlock(sma); | 1606 | sem_unlock(sma); |
| 1613 | wake_up_sem_queue_do(&tasks); | 1607 | wake_up_sem_queue_do(&tasks); |
| 1614 | 1608 | ||
| 1615 | call_rcu(&un->rcu, free_un); | 1609 | kfree_rcu(un, rcu); |
| 1616 | } | 1610 | } |
| 1617 | kfree(ulp); | 1611 | kfree(ulp); |
| 1618 | } | 1612 | } |
