Message ID | 3881684.1586876468@warthog.procyon.org.uk (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | keys: Fix proc_keys_next to increase position index | expand |
On Tue, Apr 14, 2020 at 04:01:08PM +0100, David Howells wrote: > Hi Jarkko, > > I'm planning on passing this on to Linus if you're okay with it. Note that > I've altered the subject and the body slightly. Absolutely fine. /Jarkko
diff --git a/security/keys/proc.c b/security/keys/proc.c index 415f3f1c2da0..d0cde6685627 100644 --- a/security/keys/proc.c +++ b/security/keys/proc.c @@ -139,6 +139,8 @@ static void *proc_keys_next(struct seq_file *p, void *v, loff_t *_pos) n = key_serial_next(p, v); if (n) *_pos = key_node_serial(n); + else + (*_pos)++; return n; }