Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware

From
Peter Zijlstra <hidden>
Date
2012-03-24 12:54:19
Also in
linux-arm-kernel, linux-mm, linux-sh, linux-um, lkml
Reply to
Anton Vorontsov, 2012-03-24
On Sat, 2012-03-24 at 14:31 +0400, Anton Vorontsov wrote:
This is needed so that callers would not get 'context imbalance'
warnings from the sparse tool.
=20
As a side effect, this patch fixes the following sparse warnings:
=20
  CHECK   mm/oom_kill.c
  mm/oom_kill.c:201:28: warning: context imbalance in 'oom_badness' -
  unexpected unlock
  include/linux/rcupdate.h:249:30: warning: context imbalance in
  'dump_tasks' - unexpected unlock
  mm/oom_kill.c:453:9: warning: context imbalance in 'oom_kill_task' -
  unexpected unlock
  CHECK   mm/memcontrol.c
  ...
  mm/memcontrol.c:1130:17: warning: context imbalance in
  'task_in_mem_cgroup' - unexpected unlock
=20
p.s. I know Peter Zijlstra detest the __cond_lock() stuff, but untill
     we have anything better in sparse, let's use it. This particular
     patch helped me to detect one bug that I myself made during
     task->mm fixup series. So, it is useful.
Yeah, so Nacked-by: Peter Zijlstra [off-list ref]

Also, why didn't lockdep catch it?

Fix sparse already instead of smearing ugly all over.
Thread (27 messages) 27 messages, 6 authors, last reply 2012-03-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help