+static unsigned long last_stack = 0;
+static ssize_t read_page_owner_stacks(struct file *file, char __user *buf,
+ size_t count, loff_t *pos)
+{
+ char *kbuf;
+ int ret = 0;
+
+ count = min_t(size_t, count, PAGE_SIZE);
+ kbuf = kmalloc(count, GFP_KERNEL);
+ if (!kbuf)
+ return ENOMEM;
+ ret += stack_depot_print_stacks_threshold(kbuf, count, pos, &last_stack);
+ if (copy_to_user(buf, kbuf, ret))
+ ret = -EFAULT;
+
+ if (!ret)
+ last_stack = 0;
+
+ kfree(kbuf);
+ return ret;
+}