mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
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: *564901bd7fANDROID: 16K: Only check basename of linker context *73b793dd7dUPSTREAM: af_unix: Do not use atomic ops for unix_sk(sk)->inflight. *ff29a6cf6eANDROID: ABI fixup for abi break in struct dst_ops *8b6880fcb8BACKPORT: net: fix __dst_negative_advice() race Change-Id: I7fa20e52026e7bf98e973e632d9cedead8fb0aaf Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
5c67c52b0d
6 changed files with 58 additions and 48 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue