Skip to content

ROSE: Misc fixes

Ralf Baechle linux-hams 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7NET: ROSE: Fix race in SIOCRSSL2CALL ioctl accessing userspace.net/rose/af_rose.c+4 -10 replies
2/7NET: ROSE: Factor our common code from functions.net/rose/rose_link.c+18 -140 replies
3/7NET: ROSE: Protect rose_callsign with a spinlockinclude/net/rose.h net/rose/af_rose.c net/rose/rose_link.c+17 -44 replies
4/7NET: ROSE: Make neighbour->use atomicinclude/net/rose.h net/rose/af_rose.c net/rose/rose_in.c +2 more+31 -250 replies
5/7NET: ROSE: Make rose_neigh_no atomic.net/rose/rose_route.c+3 -31 reply
6/7NET: ROSE: Move return statements hidden behind an if to their own linenet/rose/af_rose.c net/rose/rose_subr.c+7 -30 replies
7/7NET: ROSE: Fix formatting.include/net/rose.h+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] ROSE: Misc fixes

DaveM's recent email regarding a crash triggered by the attempt to send IP over rose prompted me to review the ROSE code again. I found four race conditions and from what Bernard writes in a recent email about wrong rose_neighbour->use counters one of these fixes may actually be a practical problem.

- Patch [1/7] fixes a race that is unlikely to hit in a typical system and even if so the result would be a very small number of packets attempted to be sent to the wrong destination.
- Patch [2/7] is a cleanup preparing for [3/7]
- Patch [3/7] fixes the kernel side of the rose_callsign access race by protecting it with a spinlock.
- Patch [4/7] makes struct rose_neigh member use an atomic_t. This was noticed by code review but hopefully fixes the mismatching use counter recently reported by Bernard Pidoux.
- Patch [5/7] converts rose_neigh_no into an atomic_t. Previously there was a race condition which may have resulted in multiple rose_route structures using the same rose_neigh_no value and rose_neigh_no being incremented by fewer than the number of racing accesses.
- Patch [6/7] and [7/7] fix some coding style issues.

Test reports would be apreciated.

Thanks,

Ralf

Ralf Baechle (7):
NET: ROSE: Fix race in SIOCRSSL2CALL ioctl accessing userspace.
NET: ROSE: Factor our common code from functions.
NET: ROSE: Protect rose_callsign with a spinlock
NET: ROSE: Make neighbour->use atomic
NET: ROSE: Make rose_neigh_no atomic.
NET: ROSE: Move return statements hidden behind an if to their own line
NET: ROSE: Fix formatting.

 include/net/rose.h    |    7 +++++--
 net/rose/af_rose.c    |   30 +++++++++++++++++++++---------
 net/rose/rose_in.c    |   13 +++++++------
 net/rose/rose_link.c  |   38 ++++++++++++++++++++++++--------------
 net/rose/rose_route.c |   32 +++++++++++++++++---------------
 net/rose/rose_subr.c  |    3 ++-
 net/rose/rose_timer.c |    3 ++-
 7 files changed, 78 insertions(+), 48 deletions(-)
Signature · 1 line
1.7.4.4