From: Hannes Frederic Sowa <redacted>
Date: Fri, 27 Sep 2013 00:56:35 +0200
quoted hunk
+/* BE CAREFUL: this function is not interrupt safe */
+#define net_get_random_once(buf, nbytes) \
+ ({ \
+ static bool ___done = false; \
+ bool ___ret = false; \
+ if (unlikely(!___done)) \
+ ___ret = __net_get_random_once(buf, \
+ nbytes, \
+ &___done); \
+ ___ret; \
+ })
I don't want to see this happening in every fast path, it's silly to test
this every time after the first iteration.
Maybe... _maybe_ I can be convinced if you use a static branch for this so
that it _really_ costs next to nothing.
But as-is I am not going to apply this series, sorry.