Re: [PATCH 1/1] fat: restore original value when fat_ent_write failed
From: Andrew Morton
Date: Sun Jun 28 2026 - 16:27:29 EST
On Mon, 25 May 2026 16:56:49 +0800 Ren Wei <n05ec@xxxxxxxxxx> wrote:
> From: Yemu Lu <prcups@xxxxxxxx>
>
> fat_ent_write() may have committed the new link to the primary FAT
> but then failed on the mirror copy, leaving the chain pointing to
> new_dclus even though the caller will free it. Restore the original
> value to keep the chain consistent.
Thanks.
When fixing bugs, please be careful to describe the userspace-visible
effects of that bug. Here I'm assuming "dereferences freed pointer,
kernel crashes"?
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@xxxxxxxxxx