From: Wolfram Sang <wsa@the-dreams.de>
To: linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Jan Glauber <jglauber@cavium.com>,
Alexander Sverdlin <alexander.sverdlin@nokia.com>
Subject: Re: [PATCH] i2c: prevent endless uevent loop with CONFIG_I2C_DEBUG_CORE
Date: Wed, 30 Mar 2016 14:23:01 +0200 [thread overview]
Message-ID: <20160330122300.GB9329@katana> (raw)
In-Reply-To: <1458762422-30079-1-git-send-email-wsa@the-dreams.de>
[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]
On Wed, Mar 23, 2016 at 08:47:02PM +0100, Wolfram Sang wrote:
> Jan reported this:
> ===
> After enabling CONFIG_I2C_DEBUG_CORE my system was broken
> (no network, console login not possible). System log was
> flooded with the this message:
>
> ...
> [ 608.052077] rtc-ds1307 0-0068: uevent
> [ 608.052500] rtc-ds1307 0-0068: uevent
> [ 608.052925] rtc-ds1307 0-0068: uevent
> ...
>
> 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.
>
> Ideally user-space would implement a recursion detection and
> after reading the same device file for the 1000th time call it a
> day, but nevertheless I think we should avoid this problem by
> removing the debug print completly or using another print variant.
>
> The same problem seems to be reported here:
> https://bugs.freedesktop.org/show_bug.cgi?id=76886
> ===
>
> His patch converted the message to pr_debug, but I think the debug can
> simply go. We have other means to see code paths these days. This
> enables us to clean up the function some more while we are here.
>
> Reported-by: Jan Glauber <jglauber@cavium.com>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> Acked-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> Tested-by: Jan Glauber <jglauber@cavium.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-03-30 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 19:47 [PATCH] i2c: prevent endless uevent loop with CONFIG_I2C_DEBUG_CORE Wolfram Sang
2016-03-30 12:23 ` Wolfram Sang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160330122300.GB9329@katana \
--to=wsa@the-dreams.de \
--cc=alexander.sverdlin@nokia.com \
--cc=jglauber@cavium.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).