20 buf = kzalloc(buf_size, GFP_KERNEL);
24 f = filp_open(path, O_RDONLY, 0);
32 while ((ret = kernel_read(f, buf + tot, buf_size - tot - 1, &pos)) > 0) {
35 if (tot >= buf_size - 1) {
36 size_t new_size = buf_size * 2;
37 char *resized = krealloc(buf, new_size, GFP_KERNEL);