]> git.baikalelectronics.ru Git - kernel.git/commit
idr: Warn if old iterators see large IDs
authorMatthew Wilcox <mawilcox@microsoft.com>
Tue, 28 Nov 2017 20:50:12 +0000 (15:50 -0500)
committerMatthew Wilcox <mawilcox@microsoft.com>
Tue, 6 Feb 2018 21:41:28 +0000 (16:41 -0500)
commit4c6d854888150120b199665491059268304b80e0
tree43cedfc096c74d6240c51b77d6ed2b5a1042621c
parentdbc3131ee955144de4b76a8eb872917d102fb68f
idr: Warn if old iterators see large IDs

Now that the IDR can be used to store large IDs, it is possible somebody
might only partially convert their old code and use the iterators which
can only handle IDs up to INT_MAX.  It's probably unwise to show them a
truncated ID, so settle for spewing warnings to dmesg, and terminating
the iteration.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
lib/idr.c