]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: fix error deref in ll_splice_alias().
authorNeilBrown <neilb@suse.com>
Mon, 7 May 2018 00:54:48 +0000 (10:54 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 May 2018 11:09:21 +0000 (13:09 +0200)
commit3339b850de600ee9a5a824a223e93853a120185a
tree10e634988d246c5971090252dc29d7d2b56279cd
parent3328a84ed5f590122bfc274cdcc22860baefbc33
staging: lustre: fix error deref in ll_splice_alias().

d_splice_alias() can return an ERR_PTR().
If it does while debugging is enabled, the following
CDEBUG() will dereference that error and crash.

So add appropriate checking, and provide a separate
debug message for the error case.

Reported-and-tested-by: James Simmons <jsimmons@infradead.org>
Fixes: 2f261d61f6eb ("staging: lustre: llite: use d_splice_alias for directories.")
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/namei.c