aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/gcc-generate-rtl-pass.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <[email protected]>2021-10-25 18:16:34 +0000
committerLinus Torvalds <[email protected]>2021-10-25 18:27:31 +0000
commitcb685432398122053f3e1dc6a1d68924e5b77be4 (patch)
treeb106a405cf11e949a1495c9605c6cbc2c435a105 /scripts/gcc-plugins/gcc-generate-rtl-pass.h
parentspi: Fix tegra20 build with CONFIG_PM=n once again (diff)
downloadkernel-cb685432398122053f3e1dc6a1d68924e5b77be4.tar.gz
kernel-cb685432398122053f3e1dc6a1d68924e5b77be4.zip
secretmem: Prevent secretmem_users from wrapping to zero
Commit 110860541f44 ("mm/secretmem: use refcount_t instead of atomic_t") attempted to fix the problem of secretmem_users wrapping to zero and allowing suspend once again. But it was reverted in commit 87066fdd2e30 ("Revert 'mm/secretmem: use refcount_t instead of atomic_t'") because of the problems it caused - a refcount_t was not semantically the right type to use. Instead prevent secretmem_users from wrapping to zero by forbidding new users if the number of users has wrapped from positive to negative. This stops a long way short of reaching the necessary 4 billion users where it wraps to zero again, so there's no need to be clever with special anti-wrap types or checking the return value from atomic_inc(). Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Cc: Jordy Zomer <[email protected]> Cc: Kees Cook <[email protected]>, Cc: James Bottomley <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-rtl-pass.h')
0 files changed, 0 insertions, 0 deletions