Home
last modified time | relevance | path

Searched hist:de8a6b15 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/net/mctp/
H A Droute.cde8a6b15 Mon Jan 23 20:01:03 CST 2023 Jeremy Kerr <jk@codeconstruct.com.au> net: mctp: add an explicit reference from a mctp_sk_key to sock

Currently, we correlate the mctp_sk_key lifetime to the sock lifetime
through the sock hash/unhash operations, but this is pretty tenuous, and
there are cases where we may have a temporary reference to an unhashed
sk.

This change makes the reference more explicit, by adding a hold on the
sock when it's associated with a mctp_sk_key, released on final key
unref.

Fixes: 73c618456dc5 ("mctp: locking, lifetime and validity changes for sk_keys")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>