]> git.baikalelectronics.ru Git - kernel.git/commitdiff
lec: Use rtnl lock/unlock when updating MTU
authorchas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Thu, 14 Aug 2014 13:19:47 +0000 (09:19 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Aug 2014 23:31:23 +0000 (16:31 -0700)
The LECS response contains the MTU that should be used.  Correctly
synchronize with other layers when updating.

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/atm/lec.c

index e4853b50cf402d9606c49daf34bc849467dab391..4b98f897044aa6a364392bc1ec5b68a2a672a2d2 100644 (file)
@@ -410,9 +410,11 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
                priv->lane2_ops = NULL;
                if (priv->lane_version > 1)
                        priv->lane2_ops = &lane2_ops;
+               rtnl_lock();
                if (dev_set_mtu(dev, mesg->content.config.mtu))
                        pr_info("%s: change_mtu to %d failed\n",
                                dev->name, mesg->content.config.mtu);
+               rtnl_unlock();
                priv->is_proxy = mesg->content.config.is_proxy;
                break;
        case l_flush_tran_id: