Re: KASAN warning in bt_for_each

From: Bart Van Assche
Date: Thu Feb 14 2019 - 17:21:00 EST


On Thu, 2019-02-14 at 13:50 -0700, Jens Axboe wrote:
+AD4 On 2/14/19 1:45 PM, Evan Green wrote:
+AD4 +AD4 On Thu, Feb 14, 2019 at 11:33 AM Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4 wrote:
+AD4 +AD4 +AD4
+AD4 +AD4 +AD4 On Thu, 2019-02-14 at 10:04 -0800, Evan Green wrote:
+AD4 +AD4 +AD4 +AD4 Greetings, block experts+ACE
+AD4 +AD4 +AD4 +AD4
+AD4 +AD4 +AD4 +AD4 I'm trying to track down a KASAN warning I'm seeing in our downstream
+AD4 +AD4 +AD4 +AD4 4.19 kernel, and I could use a little help. The warning looks like
+AD4 +AD4 +AD4 +AD4 this:
+AD4 +AD4 +AD4 +AD4
+AD4 +AD4 +AD4 +AD4 +AFs 224.564894+AF0 BUG: KASAN: use-after-free in bt+AF8-for+AF8-each+-0x1ac/0x28c
+AD4 +AD4 +AD4 +AD4 +AFs 224.571195+AF0 Read of size 8 at addr ffffffc17c621340 by task fio/3851
+AD4 +AD4 +AD4 +AD4 +AFs 224.577745+AF0
+AD4 +AD4 +AD4 +AD4 +AFs 224.579320+AF0 CPU: 2 PID: 3851 Comm: fio Tainted: G W 4.19.16 +ACM-398
+AD4 +AD4 +AD4
+AD4 +AD4 +AD4 Please have a look at this e-mail thread:
+AD4 +AD4 +AD4 https://lore.kernel.org/linux-block/1545261885.185366.488.camel+AEA-acm.org/
+AD4 +AD4
+AD4 +AD4 Oh, yep, that's totally it. Did that patch make it in anywhere?
+AD4
+AD4 It didn't, since I didn't get any response to it.

I will have a look. Sorry that I had dropped the ball on that patch.

Bart.