<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/net/netdevsim, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/net/netdevsim?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/net/netdevsim?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-27T17:47:29Z</updated>
<entry>
<title>netdevsim: remove dir in nsim_dev_debugfs_init() when creating ports dir failed</title>
<updated>2022-10-27T17:47:29Z</updated>
<author>
<name>Zhengchao Shao</name>
<email>shaozhengchao@huawei.com</email>
</author>
<published>2022-10-26T01:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a6aa8d0ce2cfba57ac0f23293fcb3be0b9f53fba'/>
<id>urn:sha1:a6aa8d0ce2cfba57ac0f23293fcb3be0b9f53fba</id>
<content type='text'>
Remove dir in nsim_dev_debugfs_init() when creating ports dir failed.
Otherwise, the netdevsim device will not be created next time. Kernel
reports an error: debugfs: Directory 'netdevsim1' with parent 'netdevsim'
already present!

Fixes: ab1d0cc004d7 ("netdevsim: change debugfs tree topology")
Signed-off-by: Zhengchao Shao &lt;shaozhengchao@huawei.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdevsim: fix memory leak in nsim_drv_probe() when nsim_dev_resources_register() failed</title>
<updated>2022-10-27T17:47:24Z</updated>
<author>
<name>Zhengchao Shao</name>
<email>shaozhengchao@huawei.com</email>
</author>
<published>2022-10-26T01:46:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6b1da9f7126f05e857da6db24c6a04aa7974d644'/>
<id>urn:sha1:6b1da9f7126f05e857da6db24c6a04aa7974d644</id>
<content type='text'>
If some items in nsim_dev_resources_register() fail, memory leak will
occur. The following is the memory leak information.

unreferenced object 0xffff888074c02600 (size 128):
  comm "echo", pid 8159, jiffies 4294945184 (age 493.530s)
  hex dump (first 32 bytes):
    40 47 ea 89 ff ff ff ff 01 00 00 00 00 00 00 00  @G..............
    ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
  backtrace:
    [&lt;0000000011a31c98&gt;] kmalloc_trace+0x22/0x60
    [&lt;0000000027384c69&gt;] devl_resource_register+0x144/0x4e0
    [&lt;00000000a16db248&gt;] nsim_drv_probe+0x37a/0x1260
    [&lt;000000007d1f448c&gt;] really_probe+0x20b/0xb10
    [&lt;00000000c416848a&gt;] __driver_probe_device+0x1b3/0x4a0
    [&lt;00000000077e0351&gt;] driver_probe_device+0x49/0x140
    [&lt;0000000054f2465a&gt;] __device_attach_driver+0x18c/0x2a0
    [&lt;000000008538f359&gt;] bus_for_each_drv+0x151/0x1d0
    [&lt;0000000038e09747&gt;] __device_attach+0x1c9/0x4e0
    [&lt;00000000dd86e533&gt;] bus_probe_device+0x1d5/0x280
    [&lt;00000000839bea35&gt;] device_add+0xae0/0x1cb0
    [&lt;000000009c2abf46&gt;] new_device_store+0x3b6/0x5f0
    [&lt;00000000fb823d7f&gt;] bus_attr_store+0x72/0xa0
    [&lt;000000007acc4295&gt;] sysfs_kf_write+0x106/0x160
    [&lt;000000005f50cb4d&gt;] kernfs_fop_write_iter+0x3a8/0x5a0
    [&lt;0000000075eb41bf&gt;] vfs_write+0x8f0/0xc80

Fixes: 37923ed6b8ce ("netdevsim: Add simple FIB resource controller via devlink")
Signed-off-by: Zhengchao Shao &lt;shaozhengchao@huawei.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdevsim: fix memory leak in nsim_bus_dev_new()</title>
<updated>2022-10-27T17:47:09Z</updated>
<author>
<name>Zhengchao Shao</name>
<email>shaozhengchao@huawei.com</email>
</author>
<published>2022-10-26T01:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cf2010aa1c739bab067cbc90b690d28eaa0b47da'/>
<id>urn:sha1:cf2010aa1c739bab067cbc90b690d28eaa0b47da</id>
<content type='text'>
If device_register() failed in nsim_bus_dev_new(), the value of reference
in nsim_bus_dev-&gt;dev is 1. obj-&gt;name in nsim_bus_dev-&gt;dev will not be
released.

unreferenced object 0xffff88810352c480 (size 16):
  comm "echo", pid 5691, jiffies 4294945921 (age 133.270s)
  hex dump (first 16 bytes):
    6e 65 74 64 65 76 73 69 6d 31 00 00 00 00 00 00  netdevsim1......
  backtrace:
    [&lt;000000005e2e5e26&gt;] __kmalloc_node_track_caller+0x3a/0xb0
    [&lt;0000000094ca4fc8&gt;] kvasprintf+0xc3/0x160
    [&lt;00000000aad09bcc&gt;] kvasprintf_const+0x55/0x180
    [&lt;000000009bac868d&gt;] kobject_set_name_vargs+0x56/0x150
    [&lt;000000007c1a5d70&gt;] dev_set_name+0xbb/0xf0
    [&lt;00000000ad0d126b&gt;] device_add+0x1f8/0x1cb0
    [&lt;00000000c222ae24&gt;] new_device_store+0x3b6/0x5e0
    [&lt;0000000043593421&gt;] bus_attr_store+0x72/0xa0
    [&lt;00000000cbb1833a&gt;] sysfs_kf_write+0x106/0x160
    [&lt;00000000d0dedb8a&gt;] kernfs_fop_write_iter+0x3a8/0x5a0
    [&lt;00000000770b66e2&gt;] vfs_write+0x8f0/0xc80
    [&lt;0000000078bb39be&gt;] ksys_write+0x106/0x210
    [&lt;00000000005e55a4&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000eaa40bbc&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

Fixes: 40e4fe4ce115 ("netdevsim: move device registration and related code to bus.c")
Signed-off-by: Zhengchao Shao &lt;shaozhengchao@huawei.com&gt;
Link: https://lore.kernel.org/r/20221026015405.128795-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2022-09-22T20:02:10Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-09-22T20:02:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0140a7168f8b2732f622fa2c500f1f8be212382a'/>
<id>urn:sha1:0140a7168f8b2732f622fa2c500f1f8be212382a</id>
<content type='text'>
drivers/net/ethernet/freescale/fec.h
  7b15515fc1ca ("Revert "fec: Restart PPS after link state change"")
  40c79ce13b03 ("net: fec: add stop mode support for imx8 platform")
https://lore.kernel.org/all/20220921105337.62b41047@canb.auug.org.au/

drivers/pinctrl/pinctrl-ocelot.c
  c297561bc98a ("pinctrl: ocelot: Fix interrupt controller")
  181f604b33cd ("pinctrl: ocelot: add ability to be used in a non-mmio configuration")
https://lore.kernel.org/all/20220921110032.7cd28114@canb.auug.org.au/

tools/testing/selftests/drivers/net/bonding/Makefile
  bbb774d921e2 ("net: Add tests for bonding and team address list management")
  152e8ec77640 ("selftests/bonding: add a test for bonding lladdr target")
https://lore.kernel.org/all/20220921110437.5b7dbd82@canb.auug.org.au/

drivers/net/can/usb/gs_usb.c
  5440428b3da6 ("can: gs_usb: gs_can_open(): fix race dev-&gt;can.state condition")
  45dfa45f52e6 ("can: gs_usb: add RX and TX hardware timestamp support")
https://lore.kernel.org/all/84f45a7d-92b6-4dc5-d7a1-072152fab6ff@tessares.net/

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdevsim: Fix hwstats debugfs file permissions</title>
<updated>2022-09-19T21:40:38Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@nvidia.com</email>
</author>
<published>2022-09-09T15:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=34513ada53eb3e3f711250d8dbc2de4de493d510'/>
<id>urn:sha1:34513ada53eb3e3f711250d8dbc2de4de493d510</id>
<content type='text'>
The hwstats debugfs files are only writeable, but they are created with
read and write permissions, causing certain selftests to fail [1].

Fix by creating the files with write permission only.

[1]
 # ./test_offload.py
 Test destruction of generic XDP...
 Traceback (most recent call last):
   File "/home/idosch/code/linux/tools/testing/selftests/bpf/./test_offload.py", line 810, in &lt;module&gt;
     simdev = NetdevSimDev()
 [...]
 Exception: Command failed: cat /sys/kernel/debug/netdevsim/netdevsim0//ports/0/dev/hwstats/l3/disable_ifindex

 cat: /sys/kernel/debug/netdevsim/netdevsim0//ports/0/dev/hwstats/l3/disable_ifindex: Invalid argument

Fixes: 1a6d7ae7d63c ("netdevsim: Introduce support for L3 offload xstats")
Reported-by: Jie2x Zhou &lt;jie2x.zhou@intel.com&gt;
Tested-by: Jie2x Zhou &lt;jie2x.zhou@intel.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220909153830.3732504-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdevsim: remove redundant variable ret</title>
<updated>2022-09-02T03:50:48Z</updated>
<author>
<name>Jinpeng Cui</name>
<email>cui.jinpeng2@zte.com.cn</email>
</author>
<published>2022-08-31T15:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5603072e0b3733c076529e49ee3150cbb3a7a5cc'/>
<id>urn:sha1:5603072e0b3733c076529e49ee3150cbb3a7a5cc</id>
<content type='text'>
Return value directly from nsim_dev_reload_create()
instead of getting value from redundant variable ret.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: Jinpeng Cui &lt;cui.jinpeng2@zte.com.cn&gt;
Link: https://lore.kernel.org/r/20220831154329.305372-1-cui.jinpeng2@zte.com.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2022-09-01T19:58:02Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-09-01T19:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=60ad1100d525699bce83690757ff3077c6ab83ab'/>
<id>urn:sha1:60ad1100d525699bce83690757ff3077c6ab83ab</id>
<content type='text'>
tools/testing/selftests/net/.gitignore
  sort the net-next version and use it

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: Use u64_stats_fetch_begin_irq() for stats fetch.</title>
<updated>2022-08-29T12:02:27Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2022-08-25T11:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=278d3ba61563ceed3cb248383ced19e14ec7bc1f'/>
<id>urn:sha1:278d3ba61563ceed3cb248383ced19e14ec7bc1f</id>
<content type='text'>
On 32bit-UP u64_stats_fetch_begin() disables only preemption. If the
reader is in preemptible context and the writer side
(u64_stats_update_begin*()) runs in an interrupt context (IRQ or
softirq) then the writer can update the stats during the read operation.
This update remains undetected.

Use u64_stats_fetch_begin_irq() to ensure the stats fetch on 32bit-UP
are not interrupted by a writer. 32bit-SMP remains unaffected by this
change.

Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Catherine Sullivan &lt;csully@google.com&gt;
Cc: David Awogbemila &lt;awogbemila@google.com&gt;
Cc: Dimitris Michailidis &lt;dmichail@fungible.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hans Ulli Kroll &lt;ulli.kroll@googlemail.com&gt;
Cc: Jakub Kicinski &lt;kuba@kernel.org&gt;
Cc: Jeroen de Borst &lt;jeroendb@google.com&gt;
Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: Simon Horman &lt;simon.horman@corigine.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: oss-drivers@corigine.com
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: devlink: limit flash component name to match version returned by info_get()</title>
<updated>2022-08-25T20:22:53Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2022-08-24T12:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f94b606325c194adadaee2265b4db990802c4850'/>
<id>urn:sha1:f94b606325c194adadaee2265b4db990802c4850</id>
<content type='text'>
Limit the acceptance of component name passed to cmd_flash_update() to
match one of the versions returned by info_get(), marked by version type.
This makes things clearer and enforces 1:1 mapping between exposed
version and accepted flash component.

Check VERSION_TYPE_COMPONENT version type during cmd_flash_update()
execution by calling info_get() with different "req" context.
That causes info_get() to lookup the component name instead of
filling-up the netlink message.

Remove "UPDATE_COMPONENT" flag which becomes used.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdevsim: add version fw.mgmt info info_get() and mark as a component</title>
<updated>2022-08-25T20:22:53Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2022-08-24T12:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0c1989754f76b52bd30581ff543890cab8c75a9d'/>
<id>urn:sha1:0c1989754f76b52bd30581ff543890cab8c75a9d</id>
<content type='text'>
Fix the only component user which is netdevsim. It uses component named
"fw.mgmt" in selftests. So add this version to info_get() output with
version type component.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
