summaryrefslogtreecommitdiffhomepage
path: root/test/util
diff options
context:
space:
mode:
authorYong He <chenglang.hy@antfin.com>2019-06-28 22:20:57 +0800
committerYong He <chenglang.hy@antfin.com>2019-06-28 22:20:57 +0800
commitc61d7761b42392d6c28ab6932707e0d3236e0b74 (patch)
treee2f77ca266ed78b1c2ea5aeb35b68ff24e5cd56a /test/util
parentb2907595e5e974d2b011ea011033aa06d796e090 (diff)
Fix deadloop in proc subtask list
Readdir of /proc/x/task/ will get direntry entries from tasks of specified taskgroup. Now the tasks slice is unsorted, use sort.SearchInts search entry from the slice may cause infinity loops. The fix is sort the slice before search. This issue could be easily reproduced via following steps, revise Readdir in pkg/sentry/fs/proc/task.go, force set taskInts into test slice []int{1, 11, 7, 5, 10, 6, 8, 3, 9, 2, 4}, then run docker image and run ls /proc/1/task, the command will cause infinity loops.
Diffstat (limited to 'test/util')
0 files changed, 0 insertions, 0 deletions