All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KEYS: reaching the keys quotas correctly when instanttiating
@ 2020-02-27 10:25 Yang Xu
  2020-02-27 16:26 ` Jarkko Sakkinen
  0 siblings, 1 reply; 16+ messages in thread
From: Yang Xu @ 2020-02-27 10:25 UTC (permalink / raw)
  To: dhowells

I wrote a regression test[1]to test commit a08bf91ce28ed
("KEYS: allow reaching the keys quotas exactly"), but it
failed even I used lastest kernel. It looks like the previous
patch doesn't remove "=" when we instantiate the key.

[1]http://lists.linux.it/pipermail/ltp/2020-February/015331.html

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 security/keys/key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/keys/key.c b/security/keys/key.c
index 718bf7217420..e959b3c96b48 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -382,7 +382,7 @@ int key_payload_reserve(struct key *key, size_t datalen)
 		spin_lock(&key->user->lock);
 
 		if (delta > 0 &&
-		    (key->user->qnbytes + delta >= maxbytes ||
+		    (key->user->qnbytes + delta > maxbytes ||
 		     key->user->qnbytes + delta < key->user->qnbytes)) {
 			ret = -EDQUOT;
 		}
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-03-20  8:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27 10:25 [PATCH] KEYS: reaching the keys quotas correctly when instanttiating Yang Xu
2020-02-27 16:26 ` Jarkko Sakkinen
2020-02-28  2:32   ` [PATCH v2] KEYS: reaching the keys quotas(max_bytes) correctly Yang Xu
2020-02-28  3:30     ` Eric Biggers
2020-02-28  4:41       ` [PATCH v3] KEYS: reaching the keys quotas correctly Yang Xu
2020-03-02 12:52         ` Jarkko Sakkinen
2020-03-03  4:17         ` Eric Biggers
2020-03-03  4:33         ` Yang Xu
2020-03-03 20:18         ` Jarkko Sakkinen
2020-03-19 15:08         ` David Howells
2020-03-19 21:15         ` Jarkko Sakkinen
2020-03-19 21:30         ` David Howells
2020-03-20  1:45         ` Jarkko Sakkinen
2020-03-20  8:59         ` David Howells
2020-02-28  3:37     ` [PATCH v2] KEYS: reaching the keys quotas(max_bytes) correctly Yang Xu
2020-03-02 12:51     ` Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.