* Re: URGENT BUGS TO FIX IN THE FILE SYSTEM, KERNEL PANICS, INT OVERFLOWS, ETC.
[not found] <CAMwtO3LAzbJHZXixDbYD-LGu2qe5P4zVQBD4fsqNr-P3wzAZUg@mail.gmail.com>
@ 2026-07-30 0:15 ` Linus Torvalds
2026-07-30 17:37 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Linus Torvalds @ 2026-07-30 0:15 UTC (permalink / raw)
To: Agamalt 10, David Sterba; +Cc: linux-fsdevel
Please do proper kernel bug reporting, which means "don't just sent to
Linus", but figure out the maintainer etc. We have documentation about
this all.
That filesystem isn't a serious filesystem, and that code needs a lot
more fixing if somebody cares.
Instead of doing
if (affs_validblock(sb, block)) {
bh = sb_getblk(sb, block);
it should probably just do
bh = affs_getblk(sb, block);
if (bh) {
instead, but honestly, I can't find it in myself to care about an
unlikely error case that nobody has ever seen and reported, all in a
legacy Amiga filesystem that nobody really uses outside of hobby Amiga
enthusiasts.
But we do have a listed sucker^Hmaintainer for it that says "Odd
Fixes", and this certainly counts as an odd fix.
So I'm cc'ing David and fsdevel in case there is somebody else with an
Amiga background.
Me, I'm still bitter about those rich kids with their fancy sprites on
their Amiga HW, which may be one reason I don't feel like fixing the
problems in AFFS ;)
Linus
On Wed, 29 Jul 2026 at 17:05, Agamalt 10 <agamalt10@gmail.com> wrote:
>
> In here https://github.com/torvalds/linux/blob/master/fs/affs/affs.h:
>
> You have:
>
> bh = sb_getblk(sb, block);
> lock_buffer(bh);
> but, sb_getblk() can return NULL on failure.
>
> If allocation fails:
>
> bh = NULL;
> lock_buffer(NULL);
>
> → kernel crash.
>
> Same problem for bh = sb_getblk(sb, block);
>
> wait_on_buffer(bh);
> Also, an INT overflow risk here:
> #define AFFS_TAIL(sb, bh) \
> ((struct affs_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(struct affs_tail)))
>
> If:
>
> sb->s_blocksize < sizeof(struct affs_tail)
>
> the subtraction underflows because s_blocksize is unsigned internally.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: URGENT BUGS TO FIX IN THE FILE SYSTEM, KERNEL PANICS, INT OVERFLOWS, ETC.
2026-07-30 0:15 ` URGENT BUGS TO FIX IN THE FILE SYSTEM, KERNEL PANICS, INT OVERFLOWS, ETC Linus Torvalds
@ 2026-07-30 17:37 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2026-07-30 17:37 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Agamalt 10, David Sterba, linux-fsdevel
On Wed, Jul 29, 2026 at 05:15:46PM -0700, Linus Torvalds wrote:
> Please do proper kernel bug reporting, which means "don't just sent to
> Linus", but figure out the maintainer etc. We have documentation about
> this all.
>
> That filesystem isn't a serious filesystem, and that code needs a lot
> more fixing if somebody cares.
>
> Instead of doing
>
> if (affs_validblock(sb, block)) {
> bh = sb_getblk(sb, block);
>
> it should probably just do
>
> bh = affs_getblk(sb, block);
> if (bh) {
>
> instead, but honestly, I can't find it in myself to care about an
> unlikely error case that nobody has ever seen and reported, all in a
> legacy Amiga filesystem that nobody really uses outside of hobby Amiga
> enthusiasts.
>
> But we do have a listed sucker^Hmaintainer for it that says "Odd
> Fixes", and this certainly counts as an odd fix.
>
> So I'm cc'ing David and fsdevel in case there is somebody else with an
> Amiga background.
Thanks, I have a few more pending AFFS fixes, but nothing serious so
it's in the backlog. The last fix from the community was in 2020
d3a84a8d0dde4e ("affs: fix basic permission bits to actually work"). The
rest is tree-wide and recently the AI assisted reports.
> Me, I'm still bitter about those rich kids with their fancy sprites on
> their Amiga HW, which may be one reason I don't feel like fixing the
> problems in AFFS ;)
For me it was only a ZX Spectrum on a grayscale 12" TV, blissfully unaware.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-30 17:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAMwtO3LAzbJHZXixDbYD-LGu2qe5P4zVQBD4fsqNr-P3wzAZUg@mail.gmail.com>
2026-07-30 0:15 ` URGENT BUGS TO FIX IN THE FILE SYSTEM, KERNEL PANICS, INT OVERFLOWS, ETC Linus Torvalds
2026-07-30 17:37 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox