Exploit databaseDownload repository ZIP
GH-a4473dcd9930d1ae4c0775adc06b1cfb
satheesh575555/linux-4.19.72_cve-2022-36946
Sources for CVE-2022-36946
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files60
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- Makefile
- addr.c
- agent.c
- agent.h
- cache.c
- cgroup.c
- cm.c
- cm_msgs.h
- cma.c
- cma_configfs.c
- cma_priv.h
- core_priv.h
- cq.c
- device.c
- fmr_pool.c
- iwcm.c
- iwcm.h
- iwpm_msg.c
- iwpm_util.c
- iwpm_util.h
- mad.c
- mad_priv.h
- mad_rmpp.c
- mad_rmpp.h
- mr_pool.c
- multicast.c
- netlink.c
- nldev.c
- opa_smi.h
- packer.c
- rdma_core.c
- rdma_core.h
- restrack.c
- roce_gid_mgmt.c
- rw.c
- sa.h
- sa_query.c
- security.c
- smi.c
- smi.h
- sysfs.c
- ucm.c
- ucma.c
- ud_header.c
- umem.c
- umem_odp.c
- user_mad.c
- uverbs.h
- uverbs_cmd.c
- uverbs_ioctl.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/infiniband/core/cgroup.c
C · 2,014 bytes/*
* Copyright (C) 2016 Parav Pandit <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include "core_priv.h"
/**
* ib_device_register_rdmacg - register with rdma cgroup.
* @device: device to register to participate in resource
* accounting by rdma cgroup.
*
* Register with the rdma cgroup. Should be called before
* exposing rdma device to user space applications to avoid
* resource accounting leak.
* Returns 0 on success or otherwise failure code.
*/
int ib_device_register_rdmacg(struct ib_device *device)
{
device->cg_device.name = device->name;
return rdmacg_register_device(&device->cg_device);
}
/**
* ib_device_unregister_rdmacg - unregister with rdma cgroup.
* @device: device to unregister.
*
* Unregister with the rdma cgroup. Should be called after
* all the resources are deallocated, and after a stage when any
* other resource allocation by user application cannot be done
* for this device to avoid any leak in accounting.
*/
void ib_device_unregister_rdmacg(struct ib_device *device)
{
rdmacg_unregister_device(&device->cg_device);
}
int ib_rdmacg_try_charge(struct ib_rdmacg_object *cg_obj,
struct ib_device *device,
enum rdmacg_resource_type resource_index)
{
return rdmacg_try_charge(&cg_obj->cg, &device->cg_device,
resource_index);
}
EXPORT_SYMBOL(ib_rdmacg_try_charge);
void ib_rdmacg_uncharge(struct ib_rdmacg_object *cg_obj,
struct ib_device *device,
enum rdmacg_resource_type resource_index)
{
rdmacg_uncharge(cg_obj->cg, &device->cg_device,
resource_index);
}
EXPORT_SYMBOL(ib_rdmacg_uncharge);