lkml.org 
[lkml]   [2020]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 01/25] net: core: device_rename: Use rwsem instead of a seqcount
On Wed, May 20, 2020 at 05:37:07PM +0300, Dan Carpenter wrote:
...
>
> smatch warnings:
> net/core/dev.c:953 netdev_get_name() warn: inconsistent returns 'devnet_rename_sem'.
>
...
>
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 935 int netdev_get_name(struct net *net, char *name, int ifindex)
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 936 {
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 937 struct net_device *dev;
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 938
> 2354e271ada778b Ahmed S. Darwish 2020-05-19 939 down_read(&devnet_rename_sem);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> 2354e271ada778b Ahmed S. Darwish 2020-05-19 940
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 941 rcu_read_lock();
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 942 dev = dev_get_by_index_rcu(net, ifindex);
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 943 if (!dev) {
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 944 rcu_read_unlock();
> 5dbe7c178d3f0a4 Nicolas Schichan 2013-06-26 945 return -ENODEV;
> ^^^^^^^^^^^^^^

Oh, shouldn't have missed that. Will fix in v2.

Thanks,

\
 
 \ /
  Last update: 2020-05-25 18:23    [W:0.146 / U:14.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site