" vi:syntax=vim " base16-vim (https://github.com/chriskempson/base16-vim) " by Chris Kempson (http://chriskempson.com) " Bright scheme by Chris Kempson (http://chriskempson.com) " This enables the coresponding base16-shell script to run so that " :colorscheme works in terminals supported by base16-shell scripts " User must set this variable in .vimrc " let g:base16_shell_path=base16-builder/output/shell/ if !has('gui_running') if exists("g:base16_shell_path") execute "silent !/bin/sh ".g:base16_shell_path."/base16-bright.sh" endif endif " GUI color definitions let s:gui00 = "000000" let s:gui01 = "303030" let s:gui02 = "505050" let s:gui03 = "b0b0b0" let s:gui04 = "d0d0d0" let s:gui05 = "e0e0e0" let s:gui06 = "f5f5f5" let s:gui07 = "ffffff" let s:gui08 = "fb0120" let s:gui09 = "fc6d24" let s:gui0A = "fda331" let s:gui0B = "a1c659" let s:gui0C = "76c7b7" let s:gui0D = "6fb3d2" let s:gui0E = "d381c3" let s:gui0F = "be643c" " Terminal color definitions let s:cterm00 = "00" let s:cterm03 = "08" let s:cterm05 = "07" let s:cterm07 = "15" let s:cterm08 = "01" let s:cterm0A = "03" let s:cterm0B = "02" let s:cterm0C = "06" let s:cterm0D = "04" let s:cterm0E = "05" if exists('base16colorspace') && base16colorspace == "256" let s:cterm01 = "18" let s:cterm02 = "19" let s:cterm04 = "20" let s:cterm06 = "21" let s:cterm09 = "16" let s:cterm0F = "17" else let s:cterm01 = "10" let s:cterm02 = "11" let s:cterm04 = "12" let s:cterm06 = "13" let s:cterm09 = "09" let s:cterm0F = "14" endif " Theme setup hi clear syntax reset let g:colors_name = "base16-bright" " Highlighting function fun hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) if a:guifg != "" exec "hi " . a:group . " guifg=#" . a:guifg endif if a:guibg != "" exec "hi " . a:group . " guibg=#" . a:guibg endif if a:ctermfg != "" exec "hi " . a:group . " ctermfg=" . a:ctermfg endif if a:ctermbg != "" exec "hi " . a:group . " ctermbg=" . a:ctermbg endif if a:attr != "" exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr endif if a:guisp != "" exec "hi " . a:group . " guisp=#" . a:guisp endif endfun " Vim editor colors call hi("Bold", "", "", "", "", "bold", "") call hi("Debug", s:gui08, "", s:cterm08, "", "", "") call hi("Directory", s:gui0D, "", s:cterm0D, "", "", "") call hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "") call hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") call hi("Exception", s:gui08, "", s:cterm08, "", "", "") call hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "") call hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") call hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "") call hi("Italic", "", "", "", "", "none", "") call hi("Macro", s:gui08, "", s:cterm08, "", "", "") call hi("MatchParen", s:gui00, s:gui03, "", s:cterm03, "", "") call hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "") call hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "") call hi("Question", s:gui0D, "", s:cterm0D, "", "", "") call hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "", "") call hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "") call hi("TooLong", s:gui08, "", s:cterm08, "", "", "") call hi("Underlined", s:gui08, "", s:cterm08, "", "", "") call hi("Visual", "", s:gui02, "", s:cterm02, "", "") call hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "") call hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "") call hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "") call hi("Title", s:gui0D, "", s:cterm0D, "", "none", "") call hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") call hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "") call hi("NonText", s:gui03, "", s:cterm03, "", "", "") call hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") call hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") call hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") call hi("StatusLin
From 5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4 Mon Sep 17 00:00:00 2001
From: Andrey Konovalov <andreyknvl@google.com>
Date: Thu, 16 Feb 2017 17:22:46 +0100
Subject: [PATCH] dccp: fix freeing skb too early for IPV6_RECVPKTINFO

In the current DCCP implementation an skb for a DCCP_PKT_REQUEST packet
is forcibly freed via __kfree_skb in dccp_rcv_state_process if
dccp_v6_conn_request successfully returns.

However, if IPV6_RECVPKTINFO is set on a socket, the address of the skb
is saved to ireq->pktopts and the ref count for skb is incremented in
dccp_v6_conn_request, so skb is still in use. Nevertheless, it gets freed
in dccp_rcv_state_process.

Fix by calling consume_skb instead of doing goto discard and therefore
calling __kfree_skb.

Similar fixes for TCP:

fb7e2399ec17f1004c0e0ccfd17439f8759ede01 [TCP]: skb is unexpectedly freed.
0aea76d35c9651d55bbaf746e7914e5f9ae5a25d tcp: SYN packets are now
simply consumed

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/dccp/input.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/dccp/input.c b/net/dccp/input.c
index ba347184bda9b3fe..8fedc2d497709b3d 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -606,7 +606,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
 			if (inet_csk(sk)->icsk_af_ops->conn_request(sk,
 								    skb) < 0)
 				return 1;
-			goto discard;
+			consume_skb(skb);
+			return 0;
 		}
 		if (dh->dccph_type == DCCP_PKT_RESET)
 			goto discard;
-- 
2.11.1
"") call hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "") call hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "") call hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "") " SASS highlighting call hi("sassidChar", s:gui08, "", s:cterm08, "", "", "") call hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "") call hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "") call hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "") call hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "") " Signify highlighting call hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") call hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") call hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") " Spelling highlighting call hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08) call hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C) call hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D) call hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E) " Remove functions delf hi " Remove color variables unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F