On Wed, Jul 07, 2021 at 08:52:51AM +0200, Ahmad Fatoum wrote: > fsdrv->truncate is dereferenced at times without checking for NULL before, > leading to crashes, e.g. doing: > > edit -o /mnt/myext4/FILE some text > > on ext4 crashes. Fix this by returning -EROFS when truncate is unimplemented. > > Reported-by: Xogium <contact@xxxxxxxxx> > Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx> > --- > v1 -> v2: > - use dev parameter instead of going through &f->fsdev->dev. > No functional change, but makes diff easier to verify. > --- > fs/fs.c | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) Applied, thanks Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox