diff options
author | Takashi Iwai | 2019-02-28 13:30:55 +0100 |
---|---|---|
committer | Takashi Iwai | 2019-02-28 13:30:55 +0100 |
commit | 70395a96bd882d8dba669f99b5cec0008690accd (patch) | |
tree | 37f3a4c2cf35828f153f3ce59c3daa4f39241c32 /security/keys/key.c | |
parent | ALSA: firewire-motu: fix construction of PCM frame for capture direction (diff) | |
parent | Merge branch 'asoc-5.1' into asoc-next (diff) | |
download | kernel-qcow2-linux-70395a96bd882d8dba669f99b5cec0008690accd.tar.gz kernel-qcow2-linux-70395a96bd882d8dba669f99b5cec0008690accd.tar.xz kernel-qcow2-linux-70395a96bd882d8dba669f99b5cec0008690accd.zip |
Merge tag 'asoc-v5.1-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More changes for v5.1
Another batch of changes for ASoC, no big core changes - it's mainly
small fixes and improvements for individual drivers.
- A big refresh and cleanup of the Samsung drivers, fixing a number of
issues which allow the driver to be used with a wider range of
userspaces.
- Fixes for the Intel drivers to make them more standard so less likely
to get bitten by core issues.
- New driver for Cirrus Logic CS35L26.
Diffstat (limited to 'security/keys/key.c')
-rw-r--r-- | security/keys/key.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/keys/key.c b/security/keys/key.c index 44a80d6741a1..696f1c092c50 100644 --- a/security/keys/key.c +++ b/security/keys/key.c @@ -265,8 +265,8 @@ struct key *key_alloc(struct key_type *type, const char *desc, spin_lock(&user->lock); if (!(flags & KEY_ALLOC_QUOTA_OVERRUN)) { - if (user->qnkeys + 1 >= maxkeys || - user->qnbytes + quotalen >= maxbytes || + if (user->qnkeys + 1 > maxkeys || + user->qnbytes + quotalen > maxbytes || user->qnbytes + quotalen < user->qnbytes) goto no_quota; } @@ -297,6 +297,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, key->gid = gid; key->perm = perm; key->restrict_link = restrict_link; + key->last_used_at = ktime_get_real_seconds(); if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) key->flags |= 1 << KEY_FLAG_IN_QUOTA; |