1. 01 Mar, 2015 1 commit
    • Arvid Brodin's avatar
      net/hsr: Fix NULL pointer dereference and refcnt bugs when deleting a HSR interface. · 56b08fdc
      Arvid Brodin authored
      To repeat:
      $ sudo ip link del hsr0
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
      IP: [<ffffffff8187f495>] hsr_del_port+0x15/0xa0
      Bug description:
      As part of the hsr master device destruction, hsr_del_port() is called for each of
      the hsr ports. At each such call, the master device is updated regarding features
      and mtu. When the master device is freed before the slave interfaces, master will
      be NULL in hsr_del_port(), which led to a NULL pointer dereference.
      Additionally, dev_put() was called on the master device itself in hsr_del_port(),
      causing a refcnt error.
      A third bug in the same code path was that the rtnl lock was not taken before
      hsr_del_port() was called as part of hsr_dev_destroy().
      The reporter (Nicolas Dichtel) also said: "hsr_netdev_notify() supposes that the
      port will always be available when the notification is for an hsr interface. It's
      wrong. For example, netdev_wait_allrefs() may resend NETDEV_UNREGISTER.". As a
      precaution against this, a check for port == NULL was added in hsr_dev_notify().
      Reported-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Fixes: 51f3c605 ("net/hsr: Move slave init to hsr_slave.c.")
      Signed-off-by: default avatarArvid Brodin <arvid.brodin@alten.se>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  2. 08 Jul, 2014 7 commits
  3. 27 Mar, 2014 1 commit
  4. 18 Feb, 2014 1 commit
  5. 04 Nov, 2013 1 commit
    • Arvid Brodin's avatar
      net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0) · f421436a
      Arvid Brodin authored
      High-availability Seamless Redundancy ("HSR") provides instant failover
      redundancy for Ethernet networks. It requires a special network topology where
      all nodes are connected in a ring (each node having two physical network
      interfaces). It is suited for applications that demand high availability and
      very short reaction time.
      HSR acts on the Ethernet layer, using a registered Ethernet protocol type to
      send special HSR frames in both directions over the ring. The driver creates
      virtual network interfaces that can be used just like any ordinary Linux
      network interface, for IP/TCP/UDP traffic etc. All nodes in the network ring
      must be HSR capable.
      This code is a "best effort" to comply with the HSR standard as described in
      IEC 62439-3:2010 (HSRv0).
      Signed-off-by: default avatarArvid Brodin <arvid.brodin@xdin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>