From: Santosh Shilimkar Date: Thu, 8 Oct 2015 15:23:24 +0000 (-0700) Subject: Merge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux... X-Git-Tag: v4.1.12-92~266 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6b5c1f5cfa1eb67ae7ca7cfc39d7f7234ffb9238;p=users%2Fjedix%2Flinux-maple.git Merge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1 * 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek: (160 commits) Linux 4.1.9 cxl: Don't remove AFUs/vPHBs in cxl_reset ipv4: off-by-one in continuation handling in /proc/net/route net: dsa: Do not override PHY interface if already configured inet: fix races with reqsk timers inet: fix possible request socket leak netlink: make sure -EBUSY won't escape from netlink_insert bna: fix interrupts storm caused by erroneous packets bridge: netlink: account for the IFLA_BRPORT_PROXYARP_WIFI attribute size and policy bridge: netlink: account for the IFLA_BRPORT_PROXYARP attribute size and policy udp: fix dst races with multicast early demux rds: fix an integer overflow test in rds_info_getsockopt() rocker: free netdevice during netdevice removal net: sched: fix refcount imbalance in actions act_bpf: fix memory leaks when replacing bpf programs packet: tpacket_snd(): fix signed/unsigned comparison packet: missing dev_put() in packet_do_bind() fib_trie: Drop unnecessary calls to leaf_pull_suffix net/mlx4_core: Fix wrong index in propagating port change event to VFs bridge: netlink: fix slave_changelink/br_setport race conditions ... --- 6b5c1f5cfa1eb67ae7ca7cfc39d7f7234ffb9238 diff --cc drivers/infiniband/core/uverbs_main.c index 229772bb4050b,09686d49d4c14..59bf2aca2036e --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@@ -153,24 -129,18 +153,28 @@@ static int (*uverbs_ex_cmd_table[])(str static void ib_uverbs_add_one(struct ib_device *device); static void ib_uverbs_remove_one(struct ib_device *device); +static void release_uobj(struct kref *kref) +{ + kfree(container_of(kref, struct ib_uobject, ref)); +} + +static void put_uobj(struct ib_uobject *uobj) +{ + kref_put(&uobj->ref, release_uobj); +} + - static void ib_uverbs_release_dev(struct kref *ref) + static void ib_uverbs_release_dev(struct kobject *kobj) { struct ib_uverbs_device *dev = - container_of(ref, struct ib_uverbs_device, ref); + container_of(kobj, struct ib_uverbs_device, kobj); - complete(&dev->comp); + kfree(dev); } + static struct kobj_type ib_uverbs_dev_ktype = { + .release = ib_uverbs_release_dev, + }; + static void ib_uverbs_release_event_file(struct kref *ref) { struct ib_uverbs_event_file *file =