On Tue, 2025-03-25 at 11:46 +0100, Miklos Szeredi wrote: > In theory overlayfs could support upper layer directly referring to a > data > layer, but there's no current use case for this. > > Originally, when data-only layers were introduced, this wasn't > allowed, > only introduced by the "datadir+" feature, but without actually > handling > this case, resulting in an Oops. > > Fix by disallowing datadir without lowerdir. > > Reported-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> > Fixes: 24e16e385f22 ("ovl: add support for appending lowerdirs one by > one") > Cc: <stable@xxxxxxxxxxxxxxx> # v6.7 > Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> > Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx> Reviewed-by: Alexander Larsson <alexl@xxxxxxxxxx> > return ERR_PTR(-EINVAL); > } > > + if (ctx->nr == ctx->nr_data) { > + pr_err("at least one non-data lowerdir is > required\n"); > + return ERR_PTR(-EINVAL); > + } > + > err = -EINVAL; > for (i = 0; i < ctx->nr; i++) { > l = &ctx->lower[i]; -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-= Alexander Larsson Red Hat, Inc alexl@xxxxxxxxxx alexander.larsson@xxxxxxxxx He's an obese crooked filmmaker trapped in a world he never made. She's a provocative red-headed stripper from a different time and place. They fight crime!