summaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorDuoming Zhou <duoming@zju.edu.cn>2024-05-09 17:36:33 +0800
committerJakub Kicinski <kuba@kernel.org>2024-05-13 16:09:38 -0700
commita7d6e36b9ad052926ba2ecba3a59d8bb67dabcb4 (patch)
tree87e77f1b8faedbce60e03a092e63dff26c2bb340 /net/unix/af_unix.c
parentecf848eb934b03959918f5269f64c0e52bc23998 (diff)
downloadlinux-stable-a7d6e36b9ad052926ba2ecba3a59d8bb67dabcb4.tar.gz
linux-stable-a7d6e36b9ad052926ba2ecba3a59d8bb67dabcb4.tar.bz2
linux-stable-a7d6e36b9ad052926ba2ecba3a59d8bb67dabcb4.zip
ax25: Use kernel universal linked list to implement ax25_dev_list
The origin ax25_dev_list implements its own single linked list, which is complicated and error-prone. For example, when deleting the node of ax25_dev_list in ax25_dev_device_down(), we have to operate on the head node and other nodes separately. This patch uses kernel universal linked list to replace original ax25_dev_list, which make the operation of ax25_dev_list easier. We should do "dev->ax25_ptr = ax25_dev;" and "dev->ax25_ptr = NULL;" while holding the spinlock, otherwise the ax25_dev_device_up() and ax25_dev_device_down() could race. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/85bba3af651ca0e1a519da8d0d715b949891171c.1715247018.git.duoming@zju.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions