diff mbox

netlink: reset skb->peeked when reuse orphan skb for next broadcast

Message ID 20150710115145.13008.14667.stgit@buzz
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Konstantin Khlebnikov July 10, 2015, 11:51 a.m. UTC
This patch clears skb->peeked set by previous recipient of broadcast.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: add05ad4e9f5 ("unix/dgram: peek beyond 0-sized skbs")
---
 net/netlink/af_netlink.c |    1 +
 1 file changed, 1 insertion(+)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Konstantin Khlebnikov July 10, 2015, 12:13 p.m. UTC | #1
On 10.07.2015 14:51, Konstantin Khlebnikov wrote:
> This patch clears skb->peeked set by previous recipient of broadcast.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Fixes: add05ad4e9f5 ("unix/dgram: peek beyond 0-sized skbs")
> ---
>   net/netlink/af_netlink.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index 921e0d8dfe3a..4e5c298c88b5 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -1967,6 +1967,7 @@ static void do_one_broadcast(struct sock *sk,
>   			 * delivered to a previous socket.
>   			 */
>   			skb_orphan(p->skb2);
> +			skb->peeked = 0;
>   		}
>   	}
>   	if (p->skb2 == NULL) {
>

Oops, sorry. Please ignore it.
diff mbox

Patch

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 921e0d8dfe3a..4e5c298c88b5 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1967,6 +1967,7 @@  static void do_one_broadcast(struct sock *sk,
 			 * delivered to a previous socket.
 			 */
 			skb_orphan(p->skb2);
+			skb->peeked = 0;
 		}
 	}
 	if (p->skb2 == NULL) {