diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tun.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 038c1ef94d2e..7b816a032957 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -663,7 +663,11 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, | |||
663 | case SIOCSIFHWADDR: | 663 | case SIOCSIFHWADDR: |
664 | { | 664 | { |
665 | /* try to set the actual net device's hw address */ | 665 | /* try to set the actual net device's hw address */ |
666 | int ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr); | 666 | int ret; |
667 | |||
668 | rtnl_lock(); | ||
669 | ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr); | ||
670 | rtnl_unlock(); | ||
667 | 671 | ||
668 | if (ret == 0) { | 672 | if (ret == 0) { |
669 | /** Set the character device's hardware address. This is used when | 673 | /** Set the character device's hardware address. This is used when |