]> git.baikalelectronics.ru Git - kernel.git/commit
net-2.6 : V2 - fix dev_get_valid_name
authorDaniel Lezcano <daniel.lezcano@free.fr>
Wed, 19 May 2010 10:12:19 +0000 (10:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 May 2010 06:24:36 +0000 (23:24 -0700)
commite9c663df383d72207c76df99e25066c728230b1f
tree6efcd84b0a8d00aede2c52944bc8eaecc02e67de
parent80a0e72ce9c4e2a6ff8ab2f5718c74bef397052c
net-2.6 : V2 - fix dev_get_valid_name

the commit:

commit 7570de77564b546b2cc22deaf9b626873edb67d3
Author: Octavian Purdila <opurdila@ixiacom.com>
Date:   Wed Nov 18 02:36:59 2009 +0000

    net: device name allocation cleanups

introduced a bug when there is a hash collision making impossible
to rename a device with eth%d. This bug is very hard to reproduce
and appears rarely.

The problem is coming from we don't pass a temporary buffer to
__dev_alloc_name but 'dev->name' which is modified by the function.

A detailed explanation is here:

http://marc.info/?l=linux-netdev&m=127417784011987&w=2

Changelog:
 V2 : replaced strings comparison by pointers comparison

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Reviewed-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c