Revert "mm/secretmem: use refcount_t instead of atomic_t"

This reverts commit 110860541f443f950c1274f217a1a3e298670a33.

Converting the "secretmem_users" counter to a refcount is incorrect,
because a refcount is special in zero and can't just be incremented (but
a count of users is not, and "no users" is actually perfectly valid and
not a sign of a free'd resource).

Cc: Jordy Zomer <>
Cc: Kees Cook <>,
Cc: Jordy Zomer <>
Cc: James Bottomley <>
Cc: Mike Rapoport <>
Cc: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
1 file changed