Bug 200819

Summary: dm-writecache: kernel oops on creation
Product: IO/Storage Reporter: edo (edo.rus)
Component: LVM2/DMAssignee: Mike Snitzer (snitzer)
Status: RESOLVED CODE_FIX    
Severity: normal CC: mpatocka, snitzer
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.18.0 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg output
A patch for this bug

Description edo 2018-08-15 15:22:50 UTC
Created attachment 277875 [details]
dmesg output

my commandline is 
```
dmsetup create wc --table "0 1000000 writecache s /dev/sdb3 /dev/sda5 4096 0"
```
Comment 1 Mikulas Patocka 2018-08-16 16:20:22 UTC
Created attachment 277899 [details]
A patch for this bug

Try this patch
Comment 2 Mike Snitzer 2018-08-16 17:19:37 UTC
(In reply to Mikulas Patocka from comment #1)
> Created attachment 277899 [details]
> A patch for this bug
> 
> Try this patch

I've staged this fix for the current 4.19 merge window:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.19&id=690ebae429de8e8a80fc32fb15dd02c50cdb1de1

I'll likely send to Linus tomorrow.
Comment 3 Mike Snitzer 2018-08-16 18:40:49 UTC
(In reply to Mike Snitzer from comment #2)
> I've staged this fix for the current 4.19 merge window:
> https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/
> commit/?h=dm-4.19&id=690ebae429de8e8a80fc32fb15dd02c50cdb1de1

Revised patch subject to say:
"dm writecache: fix a crash due to reading past end of dirty_bitmap"

updated commit is here:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.19&id=1e1132ea21da6d7be92a72195204379c819cb70b
Comment 4 edo 2018-08-17 23:29:44 UTC
This patch works to me, thanks.