[S] Change in osmo-remsim[master]: Fix: Prevent race conditions when accessing slotmap in bankd
Attention is currently required from: jolly, laforge, lynxis lazus. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/42664?usp=email to look at the new patch set (#4). Change subject: Fix: Prevent race conditions when accessing slotmap in bankd ...................................................................... Fix: Prevent race conditions when accessing slotmap in bankd If a client connects to a worker, the worker will check if there is an existing mapping between a reader and this client. If it exists, slotmap_by_client() will return a pointer. If the mapping is deleted at this time by the server, the worker uses a pointer to a mapping entry that has just been freed. To prevent this, the worker locks the slot map and calls the new function slotmap_by_client_nolock(). After it has finished working with the returned pointer, it unlocks the slot map again. A possible delete by the main thread would be delayed. Change-Id: I3464726f37beb7c47b4e1f00c018ffa4f3948906 --- M src/bankd/bankd_main.c M src/slotmap.c M src/slotmap.h 3 files changed, 21 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/64/42664/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/42664?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I3464726f37beb7c47b4e1f00c018ffa4f3948906 Gerrit-Change-Number: 42664 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas@eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: lynxis lazus <lynxis@fe80.eu> Gerrit-Attention: jolly <andreas@eversberg.eu> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: lynxis lazus <lynxis@fe80.eu>
participants (1)
-
jolly