Thread (10 messages) 10 messages, 2 authors, 2020-03-18

Re: [PATCH v4 4/4] KEYS: Avoid false positive ENOMEM error on key read

From: David Howells <dhowells@redhat.com>
Date: 2020-03-18 08:27:50
Also in: keyrings, linux-integrity, lkml, netdev

Waiman Long [off-list ref] wrote:
+static inline void __kvzfree(const void *addr, size_t len)
+{
+	if (addr) {
+		memset((void *)addr, 0, len);
+		kvfree(addr);
+	}
+}
I wonder if that would be better as "kvfree(memset(...))" as memset() will
return the address parameter.  If memset is not inline, it avoids the need for
the compiler to save the parameter.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help