1. 05 8月, 2014 3 次提交
  2. 03 8月, 2014 13 次提交
  3. 01 8月, 2014 7 次提交
  4. 31 7月, 2014 17 次提交
    • P
      net: filter: don't release unattached filter through call_rcu() · 34c5bd66
      Pablo Neira 提交于
      sk_unattached_filter_destroy() does not always need to release the
      filter object via rcu. Since this filter is never attached to the
      socket, the caller should be responsible for releasing the filter
      in a safe way, which may not necessarily imply rcu.
      
      This is a short summary of clients of this function:
      
      1) xt_bpf.c and cls_bpf.c use the bpf matchers from rules, these rules
         are removed from the packet path before the filter is released. Thus,
         the framework makes sure the filter is safely removed.
      
      2) In the ppp driver, the ppp_lock ensures serialization between the
         xmit and filter attachment/detachment path. This doesn't use rcu
         so deferred release via rcu makes no sense.
      
      3) In the isdn/ppp driver, it is called from isdn_ppp_release()
         the isdn_ppp_ioctl(). This driver uses mutex and spinlocks, no rcu.
         Thus, deferred rcu makes no sense to me either, the deferred releases
         may be just masking the effects of wrong locking strategy, which
         should be fixed in the driver itself.
      
      4) In the team driver, this is the only place where the rcu
         synchronization with unattached filter is used. Therefore, this
         patch introduces synchronize_rcu() which is called from the
         genetlink path to make sure the filter doesn't go away while packets
         are still walking over it. I think we can revisit this once struct
         bpf_prog (that only wraps specific bpf code bits) is in place, then
         add some specific struct rcu_head in the scope of the team driver if
         Jiri thinks this is needed.
      
      Deferred rcu release for unattached filters was originally introduced
      in 302d6637 ("filter: Allow to create sk-unattached filters").
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34c5bd66
    • T
      net: Remove unlikely() for WARN_ON() conditions · 80019d31
      Thomas Graf 提交于
      No need for the unlikely(), WARN_ON() and BUG_ON() internally use
      unlikely() on the condition.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      80019d31
    • A
      dcbnl : Fix misleading dcb_app->priority explanation · 16eecd9b
      Anish Bhatt 提交于
      Current explanation of dcb_app->priority is wrong. It says priority is
      expected to be a 3-bit unsigned integer which is only true when working with
      DCBx-IEEE. Use of dcb_app->priority by DCBx-CEE expects it to be 802.1p user
      priority bitmap. Updated accordingly
      
      This affects the cxgb4 driver, but I will post those changes as part of a
      larger changeset shortly.
      
      Fixes: 3e29027a ("dcbnl: add support for ieee8021Qaz attributes")
      Signed-off-by: NAnish Bhatt <anish@chelsio.com>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16eecd9b
    • J
      Bluetooth: Always use non-bonding requirement when not bondable · 82c295b1
      Johan Hedberg 提交于
      When we're not bondable we should never send any other SSP
      authentication requirement besides one of the non-bonding ones.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      82c295b1
    • J
      Bluetooth: Rename pairable mgmt setting to bondable · b2939475
      Johan Hedberg 提交于
      This setting maps to the HCI_BONDABLE flag which tracks whether we're
      bondable or not. Therefore, rename the mgmt setting and respective
      command accordingly.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b2939475
    • J
      Bluetooth: Rename HCI_PAIRABLE to HCI_BONDABLE · b6ae8457
      Johan Hedberg 提交于
      The HCI_PAIRABLE flag isn't actually controlling whether we're pairable
      but whether we're bondable. Therefore, rename it accordingly.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b6ae8457
    • M
      Bluetooth: Fix sparse warning from HID new leds handling · bdb94346
      Marcel Holtmann 提交于
      The new leds bit handling produces this spares warning.
      
        CHECK   net/bluetooth/hidp/core.c
      net/bluetooth/hidp/core.c:156:60: warning: dubious: x | !y
      
      Just fix it by doing an explicit x << 0 shift operation.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      bdb94346
    • J
      Bluetooth: Fix check for connected state when pairing · 6f78fd4b
      Johan Hedberg 提交于
      Both BT_CONNECTED and BT_CONFIG state mean that we have a baseband link
      available. We should therefore check for either of these when pairing
      and deciding whether to call hci_conn_security() directly.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      6f78fd4b
    • M
      6lowpan: iphc: Fix parenthesis alignments which off-by-one · 3fa71fe0
      Marcel Holtmann 提交于
      CHECK: Alignment should match open parenthesis
      +	if (((hdr->flow_lbl[0] & 0x0F) == 0) &&
      +	     (hdr->flow_lbl[1] == 0) && (hdr->flow_lbl[2] == 0)) {
      
      CHECK: Alignment should match open parenthesis
      +		if ((hdr->priority == 0) &&
      +		   ((hdr->flow_lbl[0] & 0xF0) == 0)) {
      
      CHECK: Alignment should match open parenthesis
      +		if ((hdr->priority == 0) &&
      +		   ((hdr->flow_lbl[0] & 0xF0) == 0)) {
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      3fa71fe0
    • M
      6lowpan: iphc: Fix missing braces for if statement · 9ab9bb00
      Marcel Holtmann 提交于
      CHECK: braces {} should be used on all arms of this statement
      +	if ((iphc0 & 0x03) != LOWPAN_IPHC_TTL_I)
      [...]
      +	else {
      [...]
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      9ab9bb00
    • M
      6lowpan: iphc: Fix missing blank line after variable declarations · 26fff593
      Marcel Holtmann 提交于
      WARNING: Missing a blank line after declarations
      +		struct sk_buff *new;
      +		if (uncompress_udp_header(skb, &uh))
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      26fff593
    • M
      6lowpan: iphc: Fix issues with alignment matching open parenthesis · 7fc4cfda
      Marcel Holtmann 提交于
      This patch fixes all the issues with alignment matching of open
      parenthesis found by checkpatch.pl and makes them follow the
      network coding style now.
      
      CHECK: Alignment should match open parenthesis
      +static int uncompress_addr(struct sk_buff *skb,
      +				struct in6_addr *ipaddr, const u8 address_mode,
      
      CHECK: Alignment should match open parenthesis
      +static int uncompress_context_based_src_addr(struct sk_buff *skb,
      +						struct in6_addr *ipaddr,
      
      CHECK: Alignment should match open parenthesis
      +static int skb_deliver(struct sk_buff *skb, struct ipv6hdr *hdr,
      +		struct net_device *dev, skb_delivery_cb deliver_skb)
      
      CHECK: Alignment should match open parenthesis
      +	new = skb_copy_expand(skb, sizeof(struct ipv6hdr), skb_tailroom(skb),
      +								GFP_ATOMIC);
      
      CHECK: Alignment should match open parenthesis
      +	raw_dump_table(__func__, "raw skb data dump before receiving",
      +			new->data, new->len);
      
      CHECK: Alignment should match open parenthesis
      +lowpan_uncompress_multicast_daddr(struct sk_buff *skb,
      +		struct in6_addr *ipaddr,
      
      CHECK: Alignment should match open parenthesis
      +	raw_dump_inline(NULL, "Reconstructed ipv6 multicast addr is",
      +				ipaddr->s6_addr, 16);
      
      CHECK: Alignment should match open parenthesis
      +int lowpan_process_data(struct sk_buff *skb, struct net_device *dev,
      +		const u8 *saddr, const u8 saddr_type, const u8 saddr_len,
      
      CHECK: Alignment should match open parenthesis
      +	raw_dump_table(__func__, "raw skb data dump uncompressed",
      +				skb->data, skb->len);
      
      CHECK: Alignment should match open parenthesis
      +		err = uncompress_addr(skb, &hdr.saddr, tmp, saddr,
      +					saddr_type, saddr_len);
      
      CHECK: Alignment should match open parenthesis
      +		err = uncompress_addr(skb, &hdr.daddr, tmp, daddr,
      +					daddr_type, daddr_len);
      
      CHECK: Alignment should match open parenthesis
      +		pr_debug("dest: stateless compression mode %d dest %pI6c\n",
      +			tmp, &hdr.daddr);
      
      CHECK: Alignment should match open parenthesis
      +		raw_dump_table(__func__, "raw UDP header dump",
      +				      (u8 *)&uh, sizeof(uh));
      
      CHECK: Alignment should match open parenthesis
      +	raw_dump_table(__func__, "raw header dump", (u8 *)&hdr,
      +							sizeof(hdr));
      
      CHECK: Alignment should match open parenthesis
      +int lowpan_header_compress(struct sk_buff *skb, struct net_device *dev,
      +			unsigned short type, const void *_daddr,
      
      CHECK: Alignment should match open parenthesis
      +	raw_dump_table(__func__, "raw skb network header dump",
      +		skb_network_header(skb), sizeof(struct ipv6hdr));
      
      CHECK: Alignment should match open parenthesis
      +	raw_dump_table(__func__,
      +			"sending raw skb network uncompressed packet",
      
      CHECK: Alignment should match open parenthesis
      +	if (((hdr->flow_lbl[0] & 0x0F) == 0) &&
      +	     (hdr->flow_lbl[1] == 0) && (hdr->flow_lbl[2] == 0)) {
      
      WARNING: quoted string split across lines
      +			pr_debug("dest address unicast link-local %pI6c "
      +				"iphc1 0x%02x\n", &hdr->daddr, iphc1);
      
      CHECK: Alignment should match open parenthesis
      +	raw_dump_table(__func__, "raw skb data dump compressed",
      +				skb->data, skb->len);
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      7fc4cfda
    • M
      6lowpan: iphc: Fix block comments to match networking style · 89f53490
      Marcel Holtmann 提交于
      This patch fixes all the block comment issues found by checkpatch.pl and
      makes them match the network style now.
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +/*
      + * Based on patches from Jon Smirl <jonsmirl@gmail.com>
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +/*
      + * Uncompress address function for source and
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +/*
      + * Uncompress address function for source context
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +		/*
      +		 * UDP lenght needs to be infered from the lower layers
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +	/*
      +	 * Traffic Class and FLow Label carried in-line
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +	/*
      +	 * Traffic class carried in-line
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +	/*
      +	 * Flow Label carried in-line
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +		/*
      +		 * replace the compressed UDP head by the uncompressed UDP
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +	/*
      +	 * As we copy some bit-length fields, in the IPHC encoding bytes,
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +	/*
      +	 * Traffic class, flow label
      
      WARNING: networking block comments don't use an empty /* line, use /* Comment...
      +	/*
      +	 * Hop limit
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      89f53490
    • A
      6lowpan: iphc: remove check on null · b2e3a479
      Alexander Aring 提交于
      This memory is placed on stack and can't be null so remove the check on
      null.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b2e3a479
    • A
      6lowpan: iphc: use ipv6 api to check address scope · 556a5bfc
      Alexander Aring 提交于
      This patch removes the own implementation to check of link-layer,
      broadcast and any address type and use the IPv6 api for that.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      556a5bfc
    • A
      6lowpan: iphc: cleanup use of lowpan_push_hc_data · 85c71240
      Alexander Aring 提交于
      This patch uses the lowpan_push_hc_data functions in several places
      where we can use it. The lowpan_push_hc_data was introduced in some
      previous patches.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      85c71240
    • A
      6lowpan: iphc: cleanup use of lowpan_fetch_skb · 4ebc960f
      Alexander Aring 提交于
      We introduced the lowpan_fetch_skb function in some previous patches for
      6lowpan to have a generic fetch function. This patch drops the old
      function and use the generic lowpan_fetch_skb one.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      4ebc960f