From: Chris Mason <firstname.lastname@example.org> To: "Theodore Y. Ts'o" <email@example.com> Cc: Linux Filesystem Development List <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, Andrew Morton <email@example.com> Subject: Re: [PATCH -v2] memcg: fix a crash in wb_workfn when a device disappears Date: Fri, 3 Jan 2020 17:46:29 +0000 [thread overview] Message-ID: <527DCBC3-28D2-4BFE-A99C-8ED65A613A20@fb.com> (raw) In-Reply-To: <20200103171517.GA4253@mit.edu> On 3 Jan 2020, at 12:15, Theodore Y. Ts'o wrote: > On Fri, Dec 27, 2019 at 07:52:11PM -0500, Theodore Ts'o wrote: >> >> Fortunately, it looks like the rest of the writeback path is >> perfectly >> happy with bdi->dev and bdi->owner being NULL, so the simplest fix is >> to create a bdi_dev_name() function which can handle bdi->dev being >> NULL. This also allows us to bulletproof the writeback tracepoints >> to >> prevent them from dereferencing a NULL pointer and crashing the >> kernel >> if one is tracing with memcg's enabled, and an iSCSI device dies or a >> USB storage stick is pulled. >> >> Previous-Version-Link: >> https://firstname.lastname@example.org >> Google-Bug-Id: 145475544 >> Tested: fs smoke test >> Signed-off-by: Theodore Ts'o <email@example.com> >> --- >> >> Notes: >> v2: add #include for linux/device.h >> >> fs/fs-writeback.c | 2 +- >> include/linux/backing-dev.h | 10 +++++++++ >> include/trace/events/writeback.h | 37 >> +++++++++++++++----------------- >> mm/backing-dev.c | 1 + >> 4 files changed, 29 insertions(+), 21 deletions(-) > > Ping? > > Any comments? Any objections if I carry this patch in the ext4 > tree? Or would it be better for Andrew to carry it in the linux-mm > tree? > >  https://firstname.lastname@example.org Seems sane to me, and we probably want this even if del_gendisk() embraces the brave new memcg world because synchronizing all of this is going to get messy. -chris
next prev parent reply other threads:[~2020-01-03 17:46 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-27 19:48 [PATCH] " Theodore Ts'o 2019-12-27 20:31 ` Theodore Ts'o 2019-12-27 21:16 ` kbuild test robot 2019-12-27 21:16 ` kbuild test robot 2019-12-27 21:19 ` Theodore Y. Ts'o 2019-12-27 21:19 ` Theodore Y. Ts'o 2019-12-27 22:32 ` kbuild test robot 2019-12-27 22:32 ` kbuild test robot 2019-12-28 0:52 ` [PATCH -v2] " Theodore Ts'o 2020-01-03 17:15 ` Theodore Y. Ts'o 2020-01-03 17:46 ` Chris Mason [this message] 2020-01-07 23:33 ` Andrew Morton 2020-01-08 2:12 ` Theodore Y. Ts'o
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 \ --in-reply-to=527DCBC3-28D2-4BFE-A99C-8ED65A613A20@fb.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH -v2] memcg: fix a crash in wb_workfn when a device disappears' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.