diff options
author | David Laight <David.Laight@ACULAB.COM> | 2023-09-18 08:19:25 +0000 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-10-18 14:43:22 -0700 |
commit | 867046cc7027703f60a46339ffde91a1970f2901 (patch) | |
tree | 44c8e04be08cea180b6ad3114cf3f7d802df6a7c /fs/proc | |
parent | 4ead534fba42fc4fd41163297528d2aa731cd121 (diff) | |
download | linux-stable-867046cc7027703f60a46339ffde91a1970f2901.tar.gz linux-stable-867046cc7027703f60a46339ffde91a1970f2901.tar.bz2 linux-stable-867046cc7027703f60a46339ffde91a1970f2901.zip |
minmax: relax check to allow comparison between unsigned arguments and signed constants
Allow (for example) min(unsigned_var, 20).
The opposite min(signed_var, 20u) is still errored.
Since a comparison between signed and unsigned never makes the unsigned
value negative it is only necessary to adjust the __types_ok() test.
Link: https://lkml.kernel.org/r/633b64e2f39e46bb8234809c5595b8c7@AcuMS.aculab.com
Signed-off-by: David Laight <david.laight@aculab.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/proc')
0 files changed, 0 insertions, 0 deletions