65
submitted 9 months ago by r0b0@sopuli.xyz to c/debian@lemmy.ml

If you are on the stable kernel and use ext4, do not upgrade to linux kernel package 6.1.64-1

It has a bad data corruption bug

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057843

all 14 comments
sorted by: hot top controversial new old
[-] wildflower@lemmy.world 26 points 9 months ago

This would have been great information for about five minutes ago ;-)

[-] bizdelnick@lemmy.ml 5 points 9 months ago

Have you reboot your system after upgrade? If no, do not do it. If yes, do boot the old kernel.

[-] iso@lemy.lol 11 points 9 months ago

Do not upgrade to linux 6.1.61-1. Worst mistake of my life.

[-] velox_vulnus@lemmy.ml 6 points 9 months ago

That probably explains why my NixOS was borked. Thankfully, I'm on 6.1.65.

[-] BrownianMotion@lemmy.world 5 points 9 months ago

Its in several more kernels than that.

That patch was backported into known (and probably more): v5.10.202, v5.15.140, v6.1.64

ext4 data corruption in 6.1 stable tree (was Re: [PATCH 5.15 000/297] 5.15.140-rc1 review

So I've got back to this and the failure is a subtle interaction between iomap code and ext4 code. In particular that fact that commit 936e114a245b6 ("iomap: update ki_pos a little later in iomap_dio_complete") is not in stable causes that file position is not updated after direct IO write and thus we direct IO writes are ending in wrong locations effectively corrupting data. The subtle detail is that before this commit if ->end_io handler returns non-zero value (which the new ext4 ->end_io handler does), file pos doesn't get updated, after this commit it doesn't get updated only if the return value is < 0.

The commit got merged in 6.5-rc1 so all stable kernels that have 91562895f803 ("ext4: properly sync file size update after O_SYNC direct IO") before 6.5 are corrupting data - I've noticed at least 6.1 is still carrying the problematic commit. Greg, please take out the commit from all stable kernels before 6.5 as soon as possible, we'll figure out proper backport once user data are not being corrupted anymore. Thanks!

https://lore.kernel.org/stable/20231205122122.dfhhoaswsfscuhc3@quack3/

[-] Optophonic@feddit.de 3 points 9 months ago

Hm, I just upgraded two hours ago and put my laptop to standby. When I don't reboot until the fix is there and update before rebooting I should be fine. Right?

[-] Optophonic@feddit.de 3 points 9 months ago

Strategy worked out fine, just got a new kernel 6.1.66 fixing the issue 😃

[-] Vast_Emptiness@programming.dev 1 points 7 months ago

Holly smok. :/

[-] JoeKrogan@lemmy.world 1 points 9 months ago

Thanks for the heads up.

[-] kautau@lemmy.world 1 points 9 months ago

Good thing I use xfs I guess

[-] bizdelnick@lemmy.ml 5 points 9 months ago* (last edited 9 months ago)

The issue was found in ext4, however this does not mean that other filesystems are not affected. The breaking change was not in the ext4 code but in iomap.

[-] kautau@lemmy.world 1 points 9 months ago

Ah that’s a good point, kernel downgrade it is

[-] waspentalive@lemmy.ml 1 points 9 months ago

Whew! Kernel: 6.1.0-16-amd64 and I just recently had a kernel update I think. Debian.

this post was submitted on 09 Dec 2023
65 points (100.0% liked)

Debian operating system

2651 readers
1 users here now

Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian provides more than a pure OS: it comes with over 59000 packages, precompiled software bundled up in a nice format for easy installation on your machine.

founded 4 years ago
MODERATORS