Merge branch 'android11-5.4' into branch 'android11-5.4-lts'

This catches the android11-5.4-lts branch up with recent changes made in
the android11-5.4 branch.  Changes included in here are:

* 564901bd7f ANDROID: 16K: Only check basename of linker context
* 73b793dd7d UPSTREAM: af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
* ff29a6cf6e ANDROID: ABI fixup for abi break in struct dst_ops
* 8b6880fcb8 BACKPORT: net: fix __dst_negative_advice() race

Change-Id: I7fa20e52026e7bf98e973e632d9cedead8fb0aaf
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2024-06-18 07:27:47 +00:00
commit 5c67c52b0d
6 changed files with 58 additions and 48 deletions

View file

@ -12,6 +12,16 @@ struct sk_buff;
struct sock;
struct net;
/* *** ANDROID FIXUP ***
* These typedefs are used to help fixup the ABI break caused by commit
* 92f1655aa2b2 ("net: fix __dst_negative_advice() race") where the
* negative_advice callback changed function signatures.
* See b/343727534 for more details.
* *** ANDROID FIXUP ***
*/
typedef void (*android_dst_ops_negative_advice_new_t)(struct sock *sk, struct dst_entry *);
typedef struct dst_entry * (*android_dst_ops_negative_advice_old_t)(struct dst_entry *);
struct dst_ops {
unsigned short family;
unsigned int gc_thresh;

View file

@ -1955,18 +1955,19 @@ sk_dst_get(struct sock *sk)
static inline void dst_negative_advice(struct sock *sk)
{
struct dst_entry *ndst, *dst = __sk_dst_get(sk);
/* *** ANDROID FIXUP ***
* See b/343727534 for more details why this typedef is needed here.
* *** ANDROID FIXUP ***
*/
android_dst_ops_negative_advice_new_t negative_advice;
struct dst_entry *dst = __sk_dst_get(sk);
sk_rethink_txhash(sk);
if (dst && dst->ops->negative_advice) {
ndst = dst->ops->negative_advice(dst);
if (ndst != dst) {
rcu_assign_pointer(sk->sk_dst_cache, ndst);
sk_tx_queue_clear(sk);
WRITE_ONCE(sk->sk_dst_pending_confirm, 0);
}
negative_advice = (android_dst_ops_negative_advice_new_t)dst->ops->negative_advice;
negative_advice(sk, dst);
}
}