public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Hillf Danton <[email protected]>, LKML <[email protected]>
Cc: [email protected], [email protected],
	[email protected],
	Pavel Begunkov <[email protected]>
Subject: Re: [PATCH] io_uring: fix file leak on creating io ctx
Date: Mon, 7 Dec 2020 08:04:39 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 12/7/20 1:15 AM, Hillf Danton wrote:
> Put file as part of error handling when setting up io ctx to fix
> memory leak like the following one.
> 
>    BUG: memory leak
>    unreferenced object 0xffff888101ea2200 (size 256):
>      comm "syz-executor355", pid 8470, jiffies 4294953658 (age 32.400s)
>      hex dump (first 32 bytes):
>        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>        20 59 03 01 81 88 ff ff 80 87 a8 10 81 88 ff ff   Y..............
>      backtrace:
>        [<000000002e0a7c5f>] kmem_cache_zalloc include/linux/slab.h:654 [inline]
>        [<000000002e0a7c5f>] __alloc_file+0x1f/0x130 fs/file_table.c:101
>        [<000000001a55b73a>] alloc_empty_file+0x69/0x120 fs/file_table.c:151
>        [<00000000fb22349e>] alloc_file+0x33/0x1b0 fs/file_table.c:193
>        [<000000006e1465bb>] alloc_file_pseudo+0xb2/0x140 fs/file_table.c:233
>        [<000000007118092a>] anon_inode_getfile fs/anon_inodes.c:91 [inline]
>        [<000000007118092a>] anon_inode_getfile+0xaa/0x120 fs/anon_inodes.c:74
>        [<000000002ae99012>] io_uring_get_fd fs/io_uring.c:9198 [inline]
>        [<000000002ae99012>] io_uring_create fs/io_uring.c:9377 [inline]
>        [<000000002ae99012>] io_uring_setup+0x1125/0x1630 fs/io_uring.c:9411
>        [<000000008280baad>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
>        [<00000000685d8cf0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Applied for 5.10, thanks.

-- 
Jens Axboe


       reply	other threads:[~2020-12-07 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[email protected]>
2020-12-07 15:04 ` Jens Axboe [this message]
2020-12-07 15:42   ` [PATCH] io_uring: fix file leak on creating io ctx Jens Axboe
2020-12-07 16:42 ` Jens Axboe
     [not found] ` <[email protected]>
2020-12-08 15:50   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox