Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570357
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.9 53/66] IB/umem: Release pid in error and ODP flow |
| Date | 2017-01-31 06:50 +0100 |
| Message-ID | <t5zuj-5gO-41@gated-at.bofh.it> (permalink) |
| References | <t5zkB-5dd-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kenneth Lee <liguozhu@hisilicon.com>
commit 828f6fa65ce7e80f77f5ab12942e44eb3d9d174e upstream.
1. Release pid before enter odp flow
2. Release pid when fail to allocate memory
Fixes: 87773dd56d54 ("IB: ib_umem_release() should decrement mm->pinned_vm from ib_umem_get")
Fixes: 8ada2c1c0c1d ("IB/core: Add support for on demand paging regions")
Signed-off-by: Kenneth Lee <liguozhu@hisilicon.com>
Reviewed-by: Haggai Eran <haggaie@mellanox.com>
Reviewed-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/core/umem.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -134,6 +134,7 @@ struct ib_umem *ib_umem_get(struct ib_uc
IB_ACCESS_REMOTE_ATOMIC | IB_ACCESS_MW_BIND));
if (access & IB_ACCESS_ON_DEMAND) {
+ put_pid(umem->pid);
ret = ib_umem_odp_get(context, umem);
if (ret) {
kfree(umem);
@@ -149,6 +150,7 @@ struct ib_umem *ib_umem_get(struct ib_uc
page_list = (struct page **) __get_free_page(GFP_KERNEL);
if (!page_list) {
+ put_pid(umem->pid);
kfree(umem);
return ERR_PTR(-ENOMEM);
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.9 00/66] 4.9.7-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 53/66] IB/umem: Release pid in error and ODP flow Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 40/66] NFSv4.0: always send mode in SETATTR after EXCLUSIVE4 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 43/66] [media] pctv452e: move buffer to heap, no mutex Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 28/66] s390/ptrace: Preserve previous registers for short regset write Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 22/66] ISDN: eicon: silence misleading array-bounds warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 57/66] pinctrl: broxton: Use correct PADCFGLOCK offset Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 41/66] SUNRPC: cleanup ida information when removing sunrpc module Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 35/66] ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 44/66] [media] v4l: tvp5150: Reset device at probe time, not in get/set format handlers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 38/66] nfs: Dont increment lock sequence ID after NFS4ERR_MOVED Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 37/66] parisc: Dont use BITS_PER_LONG in userspace-exported swab.h header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 39/66] NFSv4.1: Fix a deadlock in layoutget Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 32/66] IB/srp: fix invalid indirect_sg_entries parameter value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 54/66] IB/rxe: Fix rxe dev insertion to rxe_dev_list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 48/66] drm/i915: prevent crash with .disable_display parameter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 06:50 +0100
[PATCH 4.9 03/66] drm: Schedule the output_poll_work with 1s delay if we have delayed event Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 56/66] [media] s5k4ecgx: select CRC32 helper Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 29/66] IB/cxgb3: fix misspelling in header guard Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 23/66] Btrfs: remove old tree_root case in btrfs_read_locked_inode() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 64/66] mm, memcg: do not retry precharge charges Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 12/66] mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 30/66] IB/iser: Fix sg_tablesize calculation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 15/66] mm, page_alloc: fix fast-path race with cpuset update or removal Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 01/66] fbdev: color map copying bounds checking Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 25/66] Btrfs: remove ->{get, set}_acl() from btrfs_dir_ro_inode_operations Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 65/66] perf/core: Fix concurrent sys_perf_event_open() vs. move_group race Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 13/66] mm/mempolicy.c: do not put mempolicy before using its nodemask Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 46/66] [media] v4l: tvp5150: Dont override output pinmuxing at stream on/off time Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 16/66] mm, page_alloc: move cpuset seqcount checking to slowpath Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 24/66] Btrfs: disable xattr operations on subvolume directories Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 55/66] IB/rxe: Prevent from completer to operate on non valid QP Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 62/66] platform/x86: mlx-platform: free first dev on error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 63/66] platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOT Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 11/66] drm/atomic: clear out fence when duplicating state Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 61/66] virtio_mmio: Set DMA masks appropriately Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 07/66] drm/vc4: Fix an integer overflow in temporary allocation layout. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 59/66] pinctrl: baytrail: Rectify debounce support Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 06/66] drm/vc4: Fix memory leak of the CRTC state. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 10/66] Revert "drm/radeon: always apply pci shutdown callbacks" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 14/66] mm, page_alloc: fix check for NULL preferred_zone Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 17/66] mm, page_alloc: fix premature OOM when racing with cpuset mems update Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
[PATCH 4.9 60/66] memory_hotplug: make zone_can_shift() return a boolean value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 07:00 +0100
Re: [PATCH 4.9 00/66] 4.9.7-stable review Guenter Roeck <linux@roeck-us.net> - 2017-01-31 19:30 +0100
Re: [PATCH 4.9 00/66] 4.9.7-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-31 21:20 +0100
Re: [PATCH 4.9 00/66] 4.9.7-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-01-31 23:20 +0100
Re: [PATCH 4.9 00/66] 4.9.7-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-02-01 08:30 +0100
csiph-web