sched: fix the wrong mask_len, cleanup