1. 18 7月, 2017 10 次提交
  2. 17 7月, 2017 13 次提交
  3. 13 7月, 2017 1 次提交
  4. 12 7月, 2017 2 次提交
    • D
      net: ipmr: ipmr_get_table() returns NULL · 2e3d232e
      Dan Carpenter 提交于
      The ipmr_get_table() function doesn't return error pointers it returns
      NULL on error.
      
      Fixes: 4f75ba69 ("net: ipmr: Add ipmr_rtm_getroute")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e3d232e
    • E
      bridge: mdb: fix leak on complete_info ptr on fail path · 1bfb1596
      Eduardo Valentin 提交于
      We currently get the following kmemleak report:
      unreferenced object 0xffff8800039d9820 (size 32):
        comm "softirq", pid 0, jiffies 4295212383 (age 792.416s)
        hex dump (first 32 bytes):
          00 0c e0 03 00 88 ff ff ff 02 00 00 00 00 00 00  ................
          00 00 00 01 ff 11 00 02 86 dd 00 00 ff ff ff ff  ................
        backtrace:
          [<ffffffff8152b4aa>] kmemleak_alloc+0x4a/0xa0
          [<ffffffff811d8ec8>] kmem_cache_alloc_trace+0xb8/0x1c0
          [<ffffffffa0389683>] __br_mdb_notify+0x2a3/0x300 [bridge]
          [<ffffffffa038a0ce>] br_mdb_notify+0x6e/0x70 [bridge]
          [<ffffffffa0386479>] br_multicast_add_group+0x109/0x150 [bridge]
          [<ffffffffa0386518>] br_ip6_multicast_add_group+0x58/0x60 [bridge]
          [<ffffffffa0387fb5>] br_multicast_rcv+0x1d5/0xdb0 [bridge]
          [<ffffffffa037d7cf>] br_handle_frame_finish+0xcf/0x510 [bridge]
          [<ffffffffa03a236b>] br_nf_hook_thresh.part.27+0xb/0x10 [br_netfilter]
          [<ffffffffa03a3738>] br_nf_hook_thresh+0x48/0xb0 [br_netfilter]
          [<ffffffffa03a3fb9>] br_nf_pre_routing_finish_ipv6+0x109/0x1d0 [br_netfilter]
          [<ffffffffa03a4400>] br_nf_pre_routing_ipv6+0xd0/0x14c [br_netfilter]
          [<ffffffffa03a3c27>] br_nf_pre_routing+0x197/0x3d0 [br_netfilter]
          [<ffffffff814a2952>] nf_iterate+0x52/0x60
          [<ffffffff814a29bc>] nf_hook_slow+0x5c/0xb0
          [<ffffffffa037ddf4>] br_handle_frame+0x1a4/0x2c0 [bridge]
      
      This happens when switchdev_port_obj_add() fails. This patch
      frees complete_info object in the fail path.
      Reviewed-by: NVallish Vaidyeshwara <vallish@amazon.com>
      Signed-off-by: NEduardo Valentin <eduval@amazon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bfb1596
  5. 08 7月, 2017 3 次提交
  6. 07 7月, 2017 11 次提交
    • I
      libceph: osd_state is 32 bits wide in luminous · 0bb05da2
      Ilya Dryomov 提交于
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      0bb05da2
    • I
      crush: remove an obsolete comment · 9eebe45c
      Ilya Dryomov 提交于
      Reflects ceph.git commit dca1ae1e0a6b02029c3a7f9dec4114972be26d50.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      9eebe45c
    • I
      crush: crush_init_workspace starts with struct crush_work · b88ed8d8
      Ilya Dryomov 提交于
      It is not just a pointer to crush_work, it is the whole structure.
      That is not a problem since it only contains a pointer. But it will
      be a problem if new data members are added to crush_work.
      
      Reflects ceph.git commit ee957dd431bfbeb6dadaf77764db8e0757417328.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      b88ed8d8
    • I
      libceph, crush: per-pool crush_choose_arg_map for crush_do_rule() · 5cf9c4a9
      Ilya Dryomov 提交于
      If there is no crush_choose_arg_map for a given pool, a NULL pointer is
      passed to preserve existing crush_do_rule() behavior.
      
      Reflects ceph.git commits 55fb91d64071552ea1bc65ab4ea84d3c8b73ab4b,
                                dbe36e08be00c6519a8c89718dd47b0219c20516.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      5cf9c4a9
    • I
      crush: implement weight and id overrides for straw2 · 069f3222
      Ilya Dryomov 提交于
      bucket_straw2_choose needs to use weights that may be different from
      weight_items. For instance to compensate for an uneven distribution
      caused by a low number of values. Or to fix the probability biais
      introduced by conditional probabilities (see
      http://tracker.ceph.com/issues/15653 for more information).
      
      We introduce a weight_set for each straw2 bucket to set the desired
      weight for a given item at a given position. The weight of a given item
      when picking the first replica (first position) may be different from
      the weight the second replica (second position). For instance the weight
      matrix for a given bucket containing items 3, 7 and 13 could be as
      follows:
      
                position 0   position 1
      
      item 3     0x10000      0x100000
      item 7     0x40000       0x10000
      item 13    0x40000       0x10000
      
      When crush_do_rule picks the first of two replicas (position 0), item 7,
      3 are four times more likely to be choosen by bucket_straw2_choose than
      item 13. When choosing the second replica (position 1), item 3 is ten
      times more likely to be choosen than item 7, 13.
      
      By default the weight_set of each bucket exactly matches the content of
      item_weights for each position to ensure backward compatibility.
      
      bucket_straw2_choose compares items by using their id. The same ids are
      also used to index buckets and they must be unique. For each item in a
      bucket an array of ids can be provided for placement purposes and they
      are used instead of the ids. If no replacement ids are provided, the
      legacy behavior is preserved.
      
      Reflects ceph.git commit 19537a450fd5c5a0bb8b7830947507a76db2ceca.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      069f3222
    • I
      libceph: apply_upmap() · 1c2e7b45
      Ilya Dryomov 提交于
      Previously, pg_to_raw_osds() didn't filter for existent OSDs because
      raw_to_up_osds() would filter for "up" ("up" is predicated on "exists")
      and raw_to_up_osds() was called directly after pg_to_raw_osds().  Now,
      with apply_upmap() call in there, nonexistent OSDs in pg_to_raw_osds()
      output can affect apply_upmap().  Introduce remove_nonexistent_osds()
      to deal with that.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      1c2e7b45
    • I
      libceph: compute actual pgid in ceph_pg_to_up_acting_osds() · 463bb8da
      Ilya Dryomov 提交于
      Move raw_pg_to_pg() call out of get_temp_osds() and into
      ceph_pg_to_up_acting_osds(), for upcoming apply_upmap().
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      463bb8da
    • I
      libceph: pg_upmap[_items] infrastructure · 6f428df4
      Ilya Dryomov 提交于
      pg_temp and pg_upmap encodings are the same (PG -> array of osds),
      except for the incremental remove: it's an empty mapping in new_pg_temp
      for pg_temp and a separate old_pg_upmap set for pg_upmap.  (This isn't
      to allow for empty pg_upmap mappings -- apparently, pg_temp just wasn't
      looked at as an example for pg_upmap encoding.)
      
      Reuse __decode_pg_temp() for decoding pg_upmap and new_pg_upmap.
      __decode_pg_temp() stores into pg_temp union member, but since pg_upmap
      union member is identical, reading through pg_upmap later is OK.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      6f428df4
    • I
      libceph: ceph_decode_skip_* helpers · 278b1d70
      Ilya Dryomov 提交于
      Some of these won't be as efficient as they could be (e.g.
      ceph_decode_skip_set(... 32 ...) could advance by len * sizeof(u32)
      once instead of advancing by sizeof(u32) len times), but that's fine
      and not worth a bunch of extra macro code.
      
      Replace skip_name_map() with ceph_decode_skip_map as an example.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      278b1d70
    • I
      libceph: kill __{insert,lookup,remove}_pg_mapping() · ab75144b
      Ilya Dryomov 提交于
      Switch to DEFINE_RB_FUNCS2-generated {insert,lookup,erase}_pg_mapping().
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      ab75144b
    • I
      a303bb0e