@@ -115,11 +115,10 @@ static void delayed_put_pid(struct rcu_head *rhp)
115
115
void free_pid (struct pid * pid )
116
116
{
117
117
int i ;
118
- unsigned long flags ;
119
118
120
119
lockdep_assert_not_held (& tasklist_lock );
121
120
122
- spin_lock_irqsave (& pidmap_lock , flags );
121
+ spin_lock (& pidmap_lock );
123
122
for (i = 0 ; i <= pid -> level ; i ++ ) {
124
123
struct upid * upid = pid -> numbers + i ;
125
124
struct pid_namespace * ns = upid -> ns ;
@@ -142,7 +141,7 @@ void free_pid(struct pid *pid)
142
141
idr_remove (& ns -> idr , upid -> nr );
143
142
}
144
143
pidfs_remove_pid (pid );
145
- spin_unlock_irqrestore (& pidmap_lock , flags );
144
+ spin_unlock (& pidmap_lock );
146
145
147
146
call_rcu (& pid -> rcu , delayed_put_pid );
148
147
}
@@ -210,7 +209,7 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
210
209
}
211
210
212
211
idr_preload (GFP_KERNEL );
213
- spin_lock_irq (& pidmap_lock );
212
+ spin_lock (& pidmap_lock );
214
213
215
214
if (tid ) {
216
215
nr = idr_alloc (& tmp -> idr , NULL , tid ,
@@ -237,7 +236,7 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
237
236
nr = idr_alloc_cyclic (& tmp -> idr , NULL , pid_min ,
238
237
pid_max , GFP_ATOMIC );
239
238
}
240
- spin_unlock_irq (& pidmap_lock );
239
+ spin_unlock (& pidmap_lock );
241
240
idr_preload_end ();
242
241
243
242
if (nr < 0 ) {
@@ -271,7 +270,7 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
271
270
272
271
upid = pid -> numbers + ns -> level ;
273
272
idr_preload (GFP_KERNEL );
274
- spin_lock_irq (& pidmap_lock );
273
+ spin_lock (& pidmap_lock );
275
274
if (!(ns -> pid_allocated & PIDNS_ADDING ))
276
275
goto out_unlock ;
277
276
pidfs_add_pid (pid );
@@ -280,18 +279,18 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
280
279
idr_replace (& upid -> ns -> idr , pid , upid -> nr );
281
280
upid -> ns -> pid_allocated ++ ;
282
281
}
283
- spin_unlock_irq (& pidmap_lock );
282
+ spin_unlock (& pidmap_lock );
284
283
idr_preload_end ();
285
284
286
285
return pid ;
287
286
288
287
out_unlock :
289
- spin_unlock_irq (& pidmap_lock );
288
+ spin_unlock (& pidmap_lock );
290
289
idr_preload_end ();
291
290
put_pid_ns (ns );
292
291
293
292
out_free :
294
- spin_lock_irq (& pidmap_lock );
293
+ spin_lock (& pidmap_lock );
295
294
while (++ i <= ns -> level ) {
296
295
upid = pid -> numbers + i ;
297
296
idr_remove (& upid -> ns -> idr , upid -> nr );
@@ -301,17 +300,17 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
301
300
if (ns -> pid_allocated == PIDNS_ADDING )
302
301
idr_set_cursor (& ns -> idr , 0 );
303
302
304
- spin_unlock_irq (& pidmap_lock );
303
+ spin_unlock (& pidmap_lock );
305
304
306
305
kmem_cache_free (ns -> pid_cachep , pid );
307
306
return ERR_PTR (retval );
308
307
}
309
308
310
309
void disable_pid_allocation (struct pid_namespace * ns )
311
310
{
312
- spin_lock_irq (& pidmap_lock );
311
+ spin_lock (& pidmap_lock );
313
312
ns -> pid_allocated &= ~PIDNS_ADDING ;
314
- spin_unlock_irq (& pidmap_lock );
313
+ spin_unlock (& pidmap_lock );
315
314
}
316
315
317
316
struct pid * find_pid_ns (int nr , struct pid_namespace * ns )
0 commit comments