In commit 
ae236fb208a6 ("tipc: receive group membership events via
member socket") we broke the tipc_poll() function by checking the
state of the receive queue before the call to poll_sock_wait(), while
relying that state afterwards, when it might have changed.
We restore this in this commit.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
                              poll_table *wait)
 {
        struct sock *sk = sock->sk;
-       struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
        struct tipc_sock *tsk = tipc_sk(sk);
        struct tipc_group *grp = tsk->group;
        u32 revents = 0;
                /* fall thru' */
        case TIPC_LISTEN:
        case TIPC_CONNECTING:
-               if (skb)
+               if (!skb_queue_empty(&sk->sk_receive_queue))
                        revents |= POLLIN | POLLRDNORM;
                break;
        case TIPC_OPEN:
                                revents |= POLLOUT;
                if (!tipc_sk_type_connectionless(sk))
                        break;
-               if (!skb)
+               if (skb_queue_empty(&sk->sk_receive_queue))
                        break;
                revents |= POLLIN | POLLRDNORM;
                break;