Bug in ext4/btrfs fallocate?

From: Marco Stornelli
Date: Tue Dec 28 2010 - 11:10:56 EST


Hi,

it seems that ext4/btrfs code for fallocate doesn't check for
immutable/append inode flag. I think it's possible to do an fallocate
operation even if the immutable flag is turned on. You can think about
this case: an application opens a file for read/write, meanwhile a user
set the immutable flag and then the application calls fallocate. Other
cases shouldn't happen because if the immutable flag is turned on before
the application opens the file, then the application can't open the file
in read/write mode and therefore it can't do an fallocate operation.
Sincerely I haven't tried but I saw this kind of error in my own fs that
have a similar code.

Regards,

Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/