android,lowmemorykiller: Don't abuse TIF_MEMDIE.
Dan Carpenter
dan.carpenter at oracle.com
Wed Apr 6 18:28:02 UTC 2016
Hello Tetsuo Handa,
This is a semi-automatic email about new static checker warnings.
The patch 77ed2c5745d9: "android,lowmemorykiller: Don't abuse
TIF_MEMDIE." from Mar 8, 2016, leads to the following Smatch
complaint:
drivers/staging/android/lowmemorykiller.c:145 lowmem_scan()
error: we previously assumed 'p->mm' could be null (see line 134)
drivers/staging/android/lowmemorykiller.c
133
134 if (task_lmk_waiting(p) && p->mm &&
^^^^^
Patch adds a new check.
135 time_before_eq(jiffies, lowmem_deathpending_timeout)) {
136 task_unlock(p);
137 rcu_read_unlock();
138 return 0;
139 }
140 oom_score_adj = p->signal->oom_score_adj;
141 if (oom_score_adj < min_score_adj) {
142 task_unlock(p);
143 continue;
144 }
145 tasksize = get_mm_rss(p->mm);
^^^^^
Old unchecked dereference inside function call.
146 task_unlock(p);
147 if (tasksize <= 0)
regards,
dan carpenter
More information about the devel
mailing list