Messages in this thread Patch in this message | | | From | Vladimir Davydov <> | Subject | [PATCH 2/5] fs: charge pipe buffers to memcg | Date | Sat, 26 Sep 2015 13:45:54 +0300 |
| |
Pipe buffers can be generated unrestrictedly by an unprivileged userspace process, so they shouldn't go unaccounted.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> --- fs/pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pipe.c b/fs/pipe.c index 8865f7963700..6880884b70b0 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -400,7 +400,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from) int copied; if (!page) { - page = alloc_page(GFP_HIGHUSER); + page = alloc_kmem_pages(GFP_HIGHUSER, 0); if (unlikely(!page)) { ret = ret ? : -ENOMEM; break; -- 2.1.4
| |