netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: "David S. Miller" <davem@davemloft.net>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Zach Brown" <zach.brown@ni.com>,
	"Volodymyr Bendiuga" <volodymyr.bendiuga@gmail.com>,
	"Magnus Öberg" <magnus.oberg@westermo.se>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] net: phy: leds: Fix truncated LED trigger names
Date: Wed, 25 Jan 2017 13:51:02 +0100	[thread overview]
Message-ID: <20170125125102.GB2504@lunn.ch> (raw)
In-Reply-To: <1485340790-10785-4-git-send-email-geert+renesas@glider.be>

On Wed, Jan 25, 2017 at 11:39:50AM +0100, Geert Uytterhoeven wrote:
> Commit 4567d686f5c6d955 ("phy: increase size of MII_BUS_ID_SIZE and
> bus_id") increased the size of MII bus IDs, but forgot to update the
> private definition in <linux/phy_led_triggers.h>.
> This may cause:
>   1. Truncation of LED trigger names,
>   2. Duplicate LED trigger names,
>   3. Failures registering LED triggers,
>   4. Crashes due to bad error handling in the LED trigger failure path.
> 
> To fix this, and prevent the definitions going out of sync again in the
> future, let the PHY LED trigger code use the existing MII_BUS_ID_SIZE
> definition.
> 
> Example:
>   - Before I had triggers "ee700000.etherne:01:100Mbps" and
>     "ee700000.etherne:01:10Mbps",
>   - After the increase of MII_BUS_ID_SIZE, both became
>     "ee700000.ethernet-ffffffff:01:" => FAIL,
>   - Now, the triggers are "ee700000.ethernet-ffffffff:01:100Mbps" and
>     "ee700000.ethernet-ffffffff:01:10Mbps", which are unique again.
> 
> Fixes: 4567d686f5c6d955 ("phy: increase size of MII_BUS_ID_SIZE and bus_id")
> Fixes: 2e0bc452f4721520 ("net: phy: leds: add support for led triggers on phy link state change")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2017-01-25 12:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 10:39 [PATCH v2 0/3] net: phy: leds: Fix truncated LED trigger names and crashes Geert Uytterhoeven
2017-01-25 10:39 ` [PATCH v2 1/3] net: phy: leds: Clear phy_num_led_triggers on failure to avoid crash Geert Uytterhoeven
2017-01-25 10:39 ` [PATCH v2 2/3] net: phy: leds: Break dependency of phy.h on phy_led_triggers.h Geert Uytterhoeven
2017-01-25 12:50   ` Andrew Lunn
2017-01-25 10:39 ` [PATCH v2 3/3] net: phy: leds: Fix truncated LED trigger names Geert Uytterhoeven
2017-01-25 12:51   ` Andrew Lunn [this message]
2017-01-25 19:40 ` [PATCH v2 0/3] net: phy: leds: Fix truncated LED trigger names and crashes David Miller

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=20170125125102.GB2504@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.oberg@westermo.se \
    --cc=netdev@vger.kernel.org \
    --cc=volodymyr.bendiuga@gmail.com \
    --cc=zach.brown@ni.com \
    /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).