Skip to content

Commit 3a7bb5a

Browse files
committed
net: netpoll: Fix kabi in netpoll_info by using KABI_BROKEN_REPLACE
deepin inclusion category: kabi When DEEPIN_KABI_RESERVE=y, struct net_device is kabi whitelist, commit dc67d67a995e ("net: netpoll: Individualize the skb pool") upstream introduce skb_pool in every struct netpoll which "modify the netpoll system to assign a skb pool to each target instead of using a global one." and be backport to v6.6.117 stable version for it is Stable-dep-of 49c8d2c ("net: netpoll: fix incorrect refcount handling causing incorrect cleanup") change struct netpoll { ... +struct sk_buff_head skb_pool; } ->change netpoll_info { ... struct netpoll *netpoll; } ->change net_device { struct netpoll_info *npinfo; } ->change some EXPORT_SYMBOL such as free_netdev etc ... in our KABI whitelist. The struct sk_buff_head { struct sk_buff *next; struct sk_buff *prev; .. } is large than KABI reverse in the struct, so cannot use KABI_USE in this situation. For netpoll pointer after change is same as before and use internel. We can use DEEPIN_KABI_BROKEN_REPLACE to fix it. Fixes: ca946ee ("net: netpoll: Individualize the skb pool") Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 85d1c1a commit 3a7bb5a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

include/linux/netpoll.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,23 @@ struct netpoll_info {
4747

4848
struct delayed_work tx_work;
4949

50-
struct netpoll *netpoll;
50+
/* !!! Kernel Internal USE */
51+
DEEPIN_KABI_BROKEN_REPLACE(
52+
struct {
53+
struct net_device *dev;
54+
netdevice_tracker dev_tracker;
55+
char dev_name[IFNAMSIZ];
56+
const char *name;
57+
union inet_addr local_ip;
58+
union inet_addr remote_ip;
59+
bool ipv6;
60+
u16 local_port;
61+
u16 remote_port;
62+
u8 remote_mac[ETH_ALEN];
63+
DEEPIN_KABI_RESERVE(1)
64+
DEEPIN_KABI_RESERVE(2)
65+
} *netpoll,
66+
struct netpoll *netpoll)
5167
struct rcu_head rcu;
5268
};
5369

0 commit comments

Comments
 (0)