Skip to content

Changes

Started 7 hr 10 min ago
Queued 5.9 sec
Took 1 min 13 sec on built-in
Fix: Remove slot mapping at bankd when client disconnects

If a client disconnects before removing the slot mapping, the worker
must undefine its 'bank_id' and 'slot_nr' and must change its state to
'UNMAPPED'.

send_signal_to_worker() searches for a worker that has a given bank and
slot. If a client re-connects to a different worker and if the bank and
slot would be still assigned to the old worker, the old worker could
receive signals when assigning or removing slot mapping. The new worker
would not be mapped.

Change-Id: I2fd03490e2506c55104309a0ef952389119023b8
Andreas Eversberg at
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
Andreas Eversberg at
Fix: Prevent bankd from exiting upon SIGPIPE

If a client disconnects from a worker thread while the worker is
responding to a to a request from that client, the socket is closed and
SIGPIPE is sent to the worker, causing the application to exit.

To prevent this, all workers have a dummy handler to prevent this. Now
the worker can handle the closing of the socket.

Change-Id: I13d6e9da48d12f93c00bd2d021789bde71aca7cf
Andreas Eversberg at
rspro_util: asn1 decode: fix memleak when decoding fails

Change-Id: I071343d0134dbffb1bb71ea26a5b514be1b5bb27
laforge at