]> git.baikalelectronics.ru Git - kernel.git/commit
amt: do not use amt->nr_tunnels outside of lock
authorTaehee Yoo <ap420073@gmail.com>
Sun, 17 Jul 2022 16:09:10 +0000 (16:09 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 Jul 2022 10:37:02 +0000 (12:37 +0200)
commit53ff3bb5d12e5bdff8b2b1badd3c6886ac12007a
treed72a7cab33d8f32669ef818050495e242855102a
parent7fec617977419bf1ae5b55aae50e8170540a49ee
amt: do not use amt->nr_tunnels outside of lock

amt->nr_tunnels is protected by amt->lock.
But, amt_request_handler() has been using this variable without the
amt->lock.
So, it expands context of amt->lock in the amt_request_handler() to
protect amt->nr_tunnels variable.

Fixes: 565d46b7231c ("amt: add data plane of amt interface")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/amt.c