Re: [PATCH] debugfs: Add check for module parameter name
From: Al Viro
Date: Thu Sep 21 2017 - 08:44:46 EST
On Thu, Sep 21, 2017 at 05:46:54PM +0530, Arvind Yadav wrote:
> Here, start_creating() is calling by debugfs_create_dir()
> and debugfs_create_automount(). driver can pass name as NULL in
> debugfs_create_dir and debugfs_create_automount. So we need to
> add check for 'name'.
Huh? "Driver can pass any kind of crap pointer when calling this
function, so let's check if that crap happens to be NULL and bail
out in that particular case"? Or am I misreading that?
Do you have any in-tree examples, or is that about some out-of-tree
code that needs to be saved from itself?