1. 17 10月, 2015 6 次提交
  2. 15 10月, 2015 2 次提交
    • P
      netfilter: nfnetlink_log: validate dependencies to avoid breaking atomicity · 8cbc8708
      Pablo Neira 提交于
      Check that dependencies are fulfilled before updating the logger
      instance, otherwise we can leave things in intermediate state on errors
      in nfulnl_recv_config().
      
      [ Ken-ichirou reports that this is also fixing missing instance refcnt drop
        on error introduced in his patch 914eebf2 ("netfilter: nfnetlink_log:
        autoload nf_conntrack_netlink module NFQA_CFG_F_CONNTRACK config flag"). ]
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Tested-by: NKen-ichirou MATSUZAWA <chamaken@gmail.com>
      8cbc8708
    • P
      netfilter: nfnetlink_log: consolidate check for instance in nfulnl_recv_config() · 336a3b3e
      Pablo Neira Ayuso 提交于
      This patch consolidates the check for valid logger instance once we have
      passed the command handling:
      
      The config message that we receive may contain the following info:
      
      1) Command only: We always get a valid instance pointer if we just
         created it. In case that the instance is being destroyed or the
         command is unknown, we jump to exit path of nfulnl_recv_config().
         This patch doesn't modify this handling.
      
      2) Config only: In this case, the instance must always exist since the
         user is asking for configuration updates. If the instance doesn't exist
         this returns -ENODEV.
      
      3) No command and no configs are specified: This case is rare. The
         user is sending us a config message with neither commands nor
         config options. In this case, we have to check if the instance exists
         and bail out otherwise. Before this patch, it was possible to send a
         config message with no command and no config updates for an
         unexisting instance without triggering an error. So this is the only
         case that changes.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Tested-by: NKen-ichirou MATSUZAWA <chamaken@gmail.com>
      336a3b3e
  3. 14 10月, 2015 2 次提交
  4. 13 10月, 2015 7 次提交
  5. 12 10月, 2015 4 次提交
  6. 07 10月, 2015 2 次提交
    • S
      ipvs: Remove possibly unused variables from ip_vs_conn_net_{init,cleanup} · 92240e8d
      Simon Horman 提交于
      If CONFIG_PROC_FS is undefined then the arguments of proc_create()
      and remove_proc_entry() are unused. As a result the net variables of
      ip_vs_conn_net_{init,cleanup} are unused.
      
      net/netfilter/ipvs//ip_vs_conn.c: In function ‘ip_vs_conn_net_init’:
      net/netfilter/ipvs//ip_vs_conn.c:1350:14: warning: unused variable ‘net’ [-Wunused-variable]
      net/netfilter/ipvs//ip_vs_conn.c: In function ‘ip_vs_conn_net_cleanup’:
      net/netfilter/ipvs//ip_vs_conn.c:1361:14: warning: unused variable ‘net’ [-Wunused-variable]
      ...
      
      Resolve this by dereferencing net as needed rather than storing it
      in a variable.
      
      Fixes: 3d993766 ("ipvs: Pass ipvs not net into ip_vs_control_net_(init|cleanup)")
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      92240e8d
    • D
      ipvs: Remove possibly unused variable from ip_vs_out · ed1c9f0e
      David Ahern 提交于
      Eric's net namespace changes in 1b75097d leaves net unreferenced if
      CONFIG_IP_VS_IPV6 is not enabled:
      
      ../net/netfilter/ipvs/ip_vs_core.c: In function ‘ip_vs_out’:
      ../net/netfilter/ipvs/ip_vs_core.c:1177:14: warning: unused variable ‘net’ [-Wunused-variable]
      
      After the net refactoring there is only 1 user; push the reference to the
      1 user. While the line length slightly exceeds 80 it seems to be the
      best change.
      
      Fixes: 1b75097d("ipvs: Pass ipvs into ip_vs_out")
      Signed-off-by: NDavid Ahern <dsa@cumulusnetworks.com>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      [horms: updated subject]
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      ed1c9f0e
  7. 05 10月, 2015 7 次提交
  8. 04 10月, 2015 1 次提交
    • E
      tcp/dccp: add SLAB_DESTROY_BY_RCU flag for request sockets · e96f78ab
      Eric Dumazet 提交于
      Before letting request sockets being put in TCP/DCCP regular
      ehash table, we need to add either :
      
      - SLAB_DESTROY_BY_RCU flag to their kmem_cache
      - add RCU grace period before freeing them.
      
      Since we carefully respected the SLAB_DESTROY_BY_RCU protocol
      like ESTABLISH and TIMEWAIT sockets, use it here.
      
      req_prot_init() being only used by TCP and DCCP, I did not add
      a new slab_flags into their rsk_prot, but reuse prot->slab_flags
      
      Since all reqsk_alloc() users are correctly dealing with a failure,
      add the __GFP_NOWARN flag to avoid traces under pressure.
      
      Fixes: 079096f1 ("tcp/dccp: install syn_recv requests into ehash table")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e96f78ab
  9. 03 10月, 2015 9 次提交