summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNadav Amit <namit@vmware.com>2019-07-18 15:57:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-18 17:08:06 -0700
commit49f17c26c123b60fd1c74629eef077740d16ffc2 (patch)
tree2cb82f376c2f79d4cf299b853e8ff8c1f683727b /include
parentc06306696f8368b08774e2a743dbc52d92a61693 (diff)
downloadlinux-49f17c26c123b60fd1c74629eef077740d16ffc2.tar.bz2
resource: fix locking in find_next_iomem_res()
Since resources can be removed, locking should ensure that the resource is not removed while accessing it. However, find_next_iomem_res() does not hold the lock while copying the data of the resource. Keep holding the lock while the data is copied. While at it, change the return value to a more informative value. It is disregarded by the callers. [akpm@linux-foundation.org: fix find_next_iomem_res() documentation] Link: http://lkml.kernel.org/r/20190613045903.4922-2-namit@vmware.com Fixes: ff3cc952d3f00 ("resource: Add remove_resource interface") Signed-off-by: Nadav Amit <namit@vmware.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: Toshi Kani <toshi.kani@hpe.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions