Thread (14 messages) 14 messages, 2 authors, 2024-10-16

Re: [PATCH net v5 08/10] ip6mr: Lock RCU before ip6mr_get_table() call in ip6_mroute_getsockopt()

flat view

From: Stefan Wiehler <hidden>
Date: 2024-10-16 13:28:46
Also in: lkml

quoted
+     rcu_read_lock();
      mrt = ip6mr_get_table(net, raw6_sk(sk)->ip6mr_table ? : RT6_TABLE_DFLT);
+     rcu_read_unlock();
      if (!mrt)
              return -ENOENT;
presumably you're trying to protect mrt with RCU?
so using mrt after unlocking is not right, you gotta hold the lock
longer
Thanks, you're right of course, I'll be fixing this everywhere and send a v6
shortly; also with more extensive reasoning for this series in the cover
letter.

Kind regards,

Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help