]> Git Repo - linux.git/commit - fs/overlayfs/super.c
ovl: Fix kernel panic while mounting overlayfs
authorhujianyang <[email protected]>
Tue, 6 Jan 2015 04:52:13 +0000 (12:52 +0800)
committerMiklos Szeredi <[email protected]>
Thu, 8 Jan 2015 13:47:20 +0000 (14:47 +0100)
commit2f83fd8c2849a388082f30d755a75c1e67c4643b
tree09ed1bd07d358487a7a7f3ed3ac863422c2eabdc
parent2b7a8f36f092a7855f6438cd42d6990394f450fa
ovl: Fix kernel panic while mounting overlayfs

The function ovl_fill_super() in recently multi-layer support
version will incorrectly return 0 at error handling path and
then cause kernel panic.

This failure can be reproduced by mounting a overlayfs with
upperdir and workdir in different mounts.

And also, If the memory allocation of *lower_mnt* fail, this
function may return an zero either.

This patch fix this problem by setting *err* to proper error
number before jumping to error handling path.

Signed-off-by: hujianyang <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
fs/overlayfs/super.c
This page took 0.052098 seconds and 4 git commands to generate.