| .. | .. |
|---|
| 130 | 130 | |
|---|
| 131 | 131 | static int map_get(u64 up_map, int i) |
|---|
| 132 | 132 | { |
|---|
| 133 | | - return (up_map & (1 << i)) >> i; |
|---|
| 133 | + return (up_map & (1ULL << i)) >> i; |
|---|
| 134 | 134 | } |
|---|
| 135 | 135 | |
|---|
| 136 | 136 | static struct tipc_peer *peer_prev(struct tipc_peer *peer) |
|---|
| .. | .. |
|---|
| 322 | 322 | void tipc_mon_remove_peer(struct net *net, u32 addr, int bearer_id) |
|---|
| 323 | 323 | { |
|---|
| 324 | 324 | struct tipc_monitor *mon = tipc_monitor(net, bearer_id); |
|---|
| 325 | | - struct tipc_peer *self = get_self(net, bearer_id); |
|---|
| 325 | + struct tipc_peer *self; |
|---|
| 326 | 326 | struct tipc_peer *peer, *prev, *head; |
|---|
| 327 | 327 | |
|---|
| 328 | + if (!mon) |
|---|
| 329 | + return; |
|---|
| 330 | + |
|---|
| 331 | + self = get_self(net, bearer_id); |
|---|
| 328 | 332 | write_lock_bh(&mon->lock); |
|---|
| 329 | 333 | peer = get_peer(mon, addr); |
|---|
| 330 | 334 | if (!peer) |
|---|
| .. | .. |
|---|
| 407 | 411 | void tipc_mon_peer_down(struct net *net, u32 addr, int bearer_id) |
|---|
| 408 | 412 | { |
|---|
| 409 | 413 | struct tipc_monitor *mon = tipc_monitor(net, bearer_id); |
|---|
| 410 | | - struct tipc_peer *self = get_self(net, bearer_id); |
|---|
| 414 | + struct tipc_peer *self; |
|---|
| 411 | 415 | struct tipc_peer *peer, *head; |
|---|
| 412 | 416 | struct tipc_mon_domain *dom; |
|---|
| 413 | 417 | int applied; |
|---|
| 414 | 418 | |
|---|
| 419 | + if (!mon) |
|---|
| 420 | + return; |
|---|
| 421 | + |
|---|
| 422 | + self = get_self(net, bearer_id); |
|---|
| 415 | 423 | write_lock_bh(&mon->lock); |
|---|
| 416 | 424 | peer = get_peer(mon, addr); |
|---|
| 417 | 425 | if (!peer) { |
|---|
| .. | .. |
|---|
| 713 | 721 | if (!hdr) |
|---|
| 714 | 722 | return -EMSGSIZE; |
|---|
| 715 | 723 | |
|---|
| 716 | | - attrs = nla_nest_start(msg->skb, TIPC_NLA_MON_PEER); |
|---|
| 724 | + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MON_PEER); |
|---|
| 717 | 725 | if (!attrs) |
|---|
| 718 | 726 | goto msg_full; |
|---|
| 719 | 727 | |
|---|
| .. | .. |
|---|
| 802 | 810 | if (!hdr) |
|---|
| 803 | 811 | return -EMSGSIZE; |
|---|
| 804 | 812 | |
|---|
| 805 | | - attrs = nla_nest_start(msg->skb, TIPC_NLA_MON); |
|---|
| 813 | + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MON); |
|---|
| 806 | 814 | if (!attrs) |
|---|
| 807 | 815 | goto msg_full; |
|---|
| 808 | 816 | |
|---|