On 6/16/23 17:27, Bin Meng wrote:
+int qemu_close_range(unsigned int first, unsigned int last)
+{
+    DIR *dir = NULL;
+
+#ifdef CONFIG_CLOSE_RANGE
+    int r = close_range(first, last, 0);
+    if (!r) {
+        /* Success, no need to try other ways. */
+        return 0;
+    }
+#endif

What about first > last?

close_range will yield EINVAL, and your other fallbacks will burn lots of cpu.


r~

Reply via email to