Files
RedBear-OS/ipcd/src
Red Bear OS 217935ec95 ipcd: fix RefCell double-borrow panic on getsockopt(SO_PEERCRED)
UdsStreamScheme::getsockopt held an outer socket_rc.borrow() across the
whole option match. The SO_PEERCRED branch calls get_connected_peer(id),
which itself does borrow_mut() on the same socket — a RefCell
double-borrow that panicked ipcd and took the UDS scheme down (observed
in QEMU boot logs as ipcd crash at uds/stream.rs plus tokio
UnixStream::pair / 'failed to create UnixStream' failures from clients
calling getsockopt(SO_PEERCRED)).

Borrow only inside the branches that read socket fields (SNDBUF/RCVBUF);
the SO_PEERCRED branch now runs without an outer borrow held.

(Change found as uncommitted work in the fork; committing to unblock the
clean-fork build gate and to preserve the fix.)
2026-07-19 10:17:23 +09:00
..
2026-04-18 16:49:21 +02:00