[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with ipq_lock


I am using OpenBSD 3.7, 
ipq_lock is used to lock ipq list in BSD stack, ipq_lock() is
defined as ipq_lock_try() which simply returns 0 or 1 depending on
ipq_locked variable is 1 or 0. There are two functions accesses
ipq list, one is ip_slowtimo() and another is ipv4_input(),
both call ipq_lock(), but the problem is that the functions don't
check if the lock is successfully obtained or not, they just go ahead to
access ipq table after ipq_lock() call.

It wouldn't matter if IPL_SOFTCLOCK and IPL_SOFTNET were the same value,
which they were a long long time ago in the Net/3 code, but it appears
that since splnet and splsoftnet are now a higher priority than
splsoftclock() then ipv4_input can pre-empt ip_slowtimo so I'd call that
a bug.

Could you help me out?

Sally Bao