Repository navigation
Commit bb7efee
committed
signal: cleanup sys_rt_sigprocmask()
sys_rt_sigprocmask() looks unnecessarily complicated, simplify it.
We can just read current->blocked lockless unconditionally before
anything else and then copy-to-user it if needed. At worst we
copy 4 words on mips.
We could copy-to-user the old mask first and simplify the code even
more, but the patch tries to keep the current behaviour: we change
current->block even if copy_to_user(oset) fails.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Matt Fleming <matt.fleming@linux.intel.com>
Acked-by: Tejun Heo <tj@kernel.org>1 parent e9bd3f0 commit bb7efee
1 file changed
Lines changed: 16 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2364 | 2364 | | |
2365 | 2365 | | |
2366 | 2366 | | |
2367 | | - | |
| 2367 | + | |
2368 | 2368 | | |
2369 | 2369 | | |
2370 | | - | |
2371 | 2370 | | |
| 2371 | + | |
2372 | 2372 | | |
2373 | 2373 | | |
2374 | 2374 | | |
2375 | | - | |
| 2375 | + | |
2376 | 2376 | | |
2377 | | - | |
2378 | | - | |
2379 | | - | |
2380 | | - | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
2381 | 2382 | | |
2382 | 2383 | | |
2383 | | - | |
| 2384 | + | |
2384 | 2385 | | |
2385 | | - | |
2386 | | - | |
2387 | | - | |
2388 | | - | |
2389 | | - | |
2390 | | - | |
2391 | | - | |
| 2386 | + | |
| 2387 | + | |
2392 | 2388 | | |
2393 | | - | |
2394 | | - | |
2395 | | - | |
2396 | | - | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
2397 | 2392 | | |
2398 | | - | |
2399 | | - | |
2400 | | - | |
| 2393 | + | |
| 2394 | + | |
2401 | 2395 | | |
2402 | 2396 | | |
2403 | 2397 | | |
| |||
0 commit comments