On 2019-01-23 11:28:14 [+0100], Greg Kroah-Hartman wrote: > When an error happens, debugfs should return an error pointer value, not > NULL. This will prevent the totally theoretical error where a debugfs > call fails due to lack of memory, returning NULL, and that dentry value > is then passed to another debugfs call, which would end up succeeding, > creating a file at the root of the debugfs tree, but would then be > impossible to remove (because you can not remove the directory NULL). > > So, to make everyone happy, always return errors, this makes the users > of debugfs much simpler (they do not have to ever check the return > value), and everyone can rest easy.
Thank you. > Reported-by: Masami Hiramatsu <[email protected]> > Reported-by: Ulf Hansson <[email protected]> > Reported-by: Gary R Hook <[email protected]> > Reported-by: Heiko Carstens <[email protected]> > Cc: stable <[email protected]> > Signed-off-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Sebastian Andrzej Siewior <[email protected]> Sebastian

