Commit 2caacaa
ipc,shm: shorten critical region for shmctl
With the *_INFO, *_STAT, IPC_RMID and IPC_SET commands already optimized,
deal with the remaining SHM_LOCK and SHM_UNLOCK commands. Take the
shm_perm lock after doing the initial auditing and security checks. The
rest of the logic remains unchanged.
Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent c97cb9c commit 2caacaa
1 file changed
+25
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
| 943 | + | |
| 944 | + | |
947 | 945 | | |
948 | 946 | | |
949 | 947 | | |
| |||
954 | 952 | | |
955 | 953 | | |
956 | 954 | | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
957 | 958 | | |
958 | 959 | | |
959 | 960 | | |
960 | 961 | | |
961 | 962 | | |
962 | | - | |
| 963 | + | |
| 964 | + | |
963 | 965 | | |
964 | 966 | | |
965 | | - | |
| 967 | + | |
966 | 968 | | |
967 | 969 | | |
968 | 970 | | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
969 | 974 | | |
| 975 | + | |
970 | 976 | | |
971 | 977 | | |
972 | 978 | | |
973 | 979 | | |
974 | 980 | | |
975 | | - | |
| 981 | + | |
976 | 982 | | |
977 | | - | |
| 983 | + | |
978 | 984 | | |
979 | 985 | | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | 986 | | |
985 | 987 | | |
986 | | - | |
| 988 | + | |
987 | 989 | | |
988 | 990 | | |
989 | 991 | | |
| |||
992 | 994 | | |
993 | 995 | | |
994 | 996 | | |
995 | | - | |
| 997 | + | |
996 | 998 | | |
997 | 999 | | |
998 | 1000 | | |
999 | 1001 | | |
1000 | | - | |
| 1002 | + | |
1001 | 1003 | | |
1002 | 1004 | | |
1003 | 1005 | | |
1004 | 1006 | | |
1005 | | - | |
| 1007 | + | |
| 1008 | + | |
1006 | 1009 | | |
| 1010 | + | |
1007 | 1011 | | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
1012 | | - | |
1013 | 1012 | | |
| 1013 | + | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1021 | 1022 | | |
1022 | 1023 | | |
1023 | 1024 | | |
| |||
0 commit comments