From: chas williams - CONTRACTOR Date: Thu, 14 Aug 2014 13:19:47 +0000 (-0400) Subject: lec: Use rtnl lock/unlock when updating MTU X-Git-Tag: v3.17-rc2~13^2~19 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;ds=sidebyside;h=6df378d2d1f87a249a88ac4a8c7a14861d9c9474;p=cascardo%2Flinux.git lec: Use rtnl lock/unlock when updating MTU The LECS response contains the MTU that should be used. Correctly synchronize with other layers when updating. Signed-off-by: Chas Williams - CONTRACTOR Signed-off-by: David S. Miller --- diff --git a/net/atm/lec.c b/net/atm/lec.c index e4853b50cf40..4b98f897044a 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -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: