]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Wed, 24 Apr 2019 07:16:10 +0000 (00:16 -0700)
committerSebastian Reichel <sre@kernel.org>
Thu, 25 Apr 2019 22:06:56 +0000 (00:06 +0200)
commitc683c54f96e8e0efbde1fe493c3e4717bc8a1647
treee8c9796470629e546872f1aba5eb48b700ae0c9c
parent807b10b13757533d1e6ad3e8d849a3d4aff63194
power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG

Fix a similar endless event loop as was done in commit
621aed81a0da ("i2c: prevent endless uevent loop with
CONFIG_I2C_DEBUG_CORE"):

  The culprit is the dev_dbg printk in the i2c uevent handler. If
  this is activated (for instance by CONFIG_I2C_DEBUG_CORE) it results
  in an endless loop with systemd-journald.

  This happens if user-space scans the system log and reads the uevent
  file to get information about a newly created device, which seems
  fair use to me. Unfortunately reading the "uevent" file uses the
  same function that runs for creating the uevent for a new device,
  generating the next syslog entry

Both CONFIG_I2C_DEBUG_CORE and CONFIG_POWER_SUPPLY_DEBUG were reported
in https://bugs.freedesktop.org/show_bug.cgi?id=76886 but only former
seems to have been fixed. Drop debug prints as it was done in I2C
subsystem to resolve the issue.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_sysfs.c