]> git.baikalelectronics.ru Git - kernel.git/commit
kernel/resource.c: handle reinsertion of an already-inserted resource
authorHuang Shijie <shijie8@gmail.com>
Wed, 27 Oct 2010 22:34:52 +0000 (15:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 01:03:18 +0000 (18:03 -0700)
commitfff13209c8ecfd348a8eed4bbb434cb995d0bde2
tree2f3dbb20f08bfbbdd1f4da144f9c18fec9cce7aa
parent77b8f66938e379a99c4ef5e4162eb4ec81971fa2
kernel/resource.c: handle reinsertion of an already-inserted resource

If the same resource is inserted to the resource tree (maybe not on
purpose), a dead loop will be created.  In this situation, The kernel does
not report any warning or error :(

  The command below will show a endless print.
  #cat /proc/iomem

[akpm@linux-foundation.org: add WARN_ON()]
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/resource.c