Re: [PATCH net-next 1/3] ppp: convert rlock to rwlock to improve RX concurrency
Qingfang Deng <[email protected]> Fri, 27 Jun 2025 11:58:58 +0800
| Newsgroups | gmane.linux.ppp,gmane.linux.network,gmane.linux.kernel |
|---|---|
| Message-ID | <CALW65jasGOz_EKHPhKPNQf3i0Sxr1DQyBWBeXm=bbKRdDusAKg@mail.gmail.com> |
On Fri, Jun 27, 2025 at 12:23 AM Guillaume Nault <[email protected]> wrote: > That doesn't look right. Several PPP Rx features are stateful > (multilink, compression, etc.) and the current implementations > currently don't take any precaution when updating the shared states. > > For example, see how bsd_decompress() (in bsd_comp.c) updates db->* > fields all over the place. This db variable comes from ppp->rc_state, > which is passed as parameter of the ppp->rcomp->decompress() call in > ppp_decompress_frame(). > > I think a lot of work would be needed before we could allow > ppp_do_recv() to run concurrently on the same struct ppp. Right. I think we can grab a write lock where it updates struct ppp.