Re: [PATCH 2/3] regmap: don't create the debugfs entries if locking is disabled

From: Andy Shevchenko
Date: Wed Dec 13 2017 - 09:54:41 EST


On Wed, Dec 13, 2017 at 11:28 AM, Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> User space can initiate concurrent access to regmap over debugfs and,
> if the locking is disabled, we can't protect it. Don't create the
> debugfs entries at all in this case.
>
> Suggested-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
> Signed-off-by: Bartosz Golaszewski <brgl@xxxxxxxx>

> + dev_dbg(map->dev, "locking disabled - not creating debugfs entries\n");

I dunno about level (OK debug seems good because we are still talking
about debug), though message might be slightly confusing (if driver
itself is using debugfs for its own purposes), so, I would suggest to
add
"regmap: locking...".

--
With Best Regards,
Andy Shevchenko