[bug report] net: bridge: add support for raw sysfs port options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Nikolay Aleksandrov,

This is a semi-automatic email about new static checker warnings.

The patch a5f3ea54f3cc: "net: bridge: add support for raw sysfs port 
options" from Jul 23, 2018, leads to the following Smatch complaint:

    net/bridge/br_sysfs_if.c:323 brport_store()
     warn: variable dereferenced before check 'p->dev' (see line 317)

net/bridge/br_sysfs_if.c
   316	
   317		if (!ns_capable(dev_net(p->dev)->user_ns, CAP_NET_ADMIN))
                                        ^^^^^^
Dereferenced here.

   318			return -EPERM;
   319	
   320		if (!rtnl_trylock())
   321			return restart_syscall();
   322	
   323		if (!p->dev || !p->br)
                    ^^^^^^^
Hopefully this can't happen?

   324			goto out_unlock;
   325	

regards,
dan carpenter



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux