These changes are a raw update to a vanilla kernel 4.1.10, with the
[kvmfornfv.git] / kernel / net / core / sock_diag.c
index 74dddf8..556ecf9 100644 (file)
@@ -86,6 +86,9 @@ int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk,
                goto out;
 
        fprog = filter->prog->orig_prog;
+       if (!fprog)
+               goto out;
+
        flen = bpf_classic_proglen(fprog);
 
        attr = nla_reserve(skb, attrtype, flen);