mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
tipc: move link input queue to tipc_node
At present, the link input queue and the name distributor receive queues are fields aggregated in struct tipc_link. This is a hazard, because a link might be deleted while a receiving socket still keeps reference to one of the queues. This commit fixes this bug. However, rather than adding yet another reference counter to the critical data path, we move the two queues to safe ground inside struct tipc_node, which is already protected, and let the link code only handle references to the queues. This is also in line with planned later changes in this area. Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d3a43b907a
commit
d39bbd445d
4 changed files with 27 additions and 19 deletions
|
@ -85,13 +85,14 @@ struct tipc_node_bclink {
|
|||
u32 deferred_size;
|
||||
struct sk_buff_head deferdq;
|
||||
struct sk_buff *reasm_buf;
|
||||
int inputq_map;
|
||||
struct sk_buff_head namedq;
|
||||
bool recv_permitted;
|
||||
};
|
||||
|
||||
struct tipc_link_entry {
|
||||
struct tipc_link *link;
|
||||
u32 mtu;
|
||||
struct sk_buff_head inputq;
|
||||
struct tipc_media_addr maddr;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue