cve_id stringlengths 13 16 | repo stringclasses 12
values | repo_url stringclasses 10
values | file_path stringlengths 7 62 | function_name stringlengths 4 52 | pa stringlengths 50 341k | pb stringlengths 33 341k | px stringlengths 50 338k | py stringlengths 33 338k | pa_sliced stringlengths 31 44.3k | pb_sliced stringlengths 31 44.6k | px_sliced stringlengths 51 45.8k | py_sliced stringlengths 33 46.9k | patch_sliced stringlengths 0 46.8k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2018-7740 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/hugetlbfs/inode.c | hugetlbfs_file_mmap | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
struct inode *inode = file_inode(file);
loff_t len, vma_len;
int ret;
struct hstate *h = hstate_file(file);
vma->vm_flags |= VM_HUGETLB | VM_DONTEXPAND;
vma->vm_ops = &hugetlb_vm_ops;
if (((loff_t)vma->vm_pgoff <... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
struct inode *inode = file_inode(file);
loff_t len, vma_len;
int ret;
struct hstate *h = hstate_file(file);
vma->vm_flags |= VM_HUGETLB | VM_DONTEXPAND;
vma->vm_ops = &hugetlb_vm_ops;
if (vma->vm_pgoff & PGOFF_LO... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
struct inode *inode = file_inode(file);
loff_t len, vma_len;
int ret;
struct hstate *h = hstate_file(file);
vma->vm_flags |= VM_HUGETLB | VM_DONTEXPAND;
vma->vm_ops = &hugetlb_vm_ops;
if (((loff_t)vma->vm_pgoff <... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
struct inode *inode = file_inode(file);
loff_t len, vma_len;
int ret;
struct hstate *h = hstate_file(file);
vma->vm_flags |= VM_HUGETLB | VM_DONTEXPAND;
vma->vm_ops = &hugetlb_vm_ops;
if (vma->vm_pgoff & PGOFF_LO... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
vma->vm_ops = &hugetlb_vm_ops;
if (((loff_t)vma->vm_pgoff << PAGE_SHIFT) < 0) {
return -EVAL;
}
if (vma->vm_pgoff & (~huge_page_mask(h) >> PAGE_SHIFT)) {
return -EVAL;
}
len = vma_len + ((loff_t)vma->... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
vma->vm_ops = &hugetlb_vm_ops;
if (vma->vm_pgoff & PGOFF_LOFFT_MAX) {
return -EVAL;
}
if (vma->vm_pgoff & (~huge_page_mask(h) >> PAGE_SHIFT)) {
return -EVAL;
}
len = vma_len + ((loff_t)vma->vm_pgoff <... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vma->vm_ops = &hugetlb_vm_ops;
if (((loff_t)vma->vm_pgoff << PAGE_SHIFT) < 0) {
return -EVAL;
}
if (vma->vm_pgoff & (~huge_page_mask(h) >> PAGE_SHIFT)) {
retu... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vma->vm_ops = &hugetlb_vm_ops;
if (vma->vm_pgoff & PGOFF_LOFFT_MAX) {
return -EVAL;
}
if (vma->vm_pgoff & (~huge_page_mask(h) >> PAGE_SHIFT)) {
return -EVAL;
... | static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) {
vma->vm_ops = &hugetlb_vm_ops;
- if (((loff_t)vma->vm_pgoff << PAGE_SHIFT) < 0) {
+ if (vma->vm_pgoff & PGOFF_LOFFT_MAX) {
return -EVAL;
}
if (vma->vm_pgoff & (~huge_page_mask(h) >> PAGE_SHIFT)) {
ret... |
CVE-2018-7740 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/hugetlb.c | hugetlb_reserve_pages | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
long ret, chg;
struct hstate *h = hstate_inode(inode);
struct hugepage_subpool *spool = subpool_inode(inode);
struct resv_map *resv_map;
long gbl_reserve;
if (vm_flags & VM_NORES... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
long ret, chg;
struct hstate *h = hstate_inode(inode);
struct hugepage_subpool *spool = subpool_inode(inode);
struct resv_map *resv_map;
long gbl_reserve;
if (from > to) {
... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
long ret, chg;
struct hstate *h = hstate_inode(inode);
struct hugepage_subpool *spool = subpool_inode(inode);
struct resv_map *resv_map;
long gbl_reserve;
if (vm_flags & VM_NORES... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
long ret, chg;
struct hstate *h = hstate_inode(inode);
struct hugepage_subpool *spool = subpool_inode(inode);
struct resv_map *resv_map;
long gbl_reserve;
if (from > to) {
... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
struct hugepage_subpool *spool = subpool_inode(inode);
long gbl_reserve;
if (vm_flags & VM_NORESERVE) {
return 0;
}
if (!vma || vma->vm_flags & VM_MAYSHARE) {
chg = r... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
struct hugepage_subpool *spool = subpool_inode(inode);
long gbl_reserve;
if (from > to) {
VM_WARN(1, "%s called with a negative range\n", __func__);
return -EVAL;
}
i... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct hugepage_subpool *spool = subpool_inode(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
long gbl_reserve;
if (vm_flags & VM... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct hugepage_subpool *spool = subpool_inode(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
long gbl_reserve;
if (from > to) {
... | int hugetlb_reserve_pages(struct inode *inode, long from, long to, struct vm_area_struct *vma, vm_flags_t vm_flags) {
struct hugepage_subpool *spool = subpool_inode(inode);
long gbl_reserve;
+ if (from > to) {
+ VM_WARN(1, "%s called with a negative range\n", __func__);
+ return -EVAL;
+ ... |
CVE-2018-7755 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/floppy.c | fd_locked_ioctl | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
int drive = (long)bdev->bd_disk->private_data;
int type = ITYPE(UDRS->fd_device);
int i;
int ret;
int size;
union inparam {
struct floppy_struct g;
struct format_descr f;
... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
int drive = (long)bdev->bd_disk->private_data;
int type = ITYPE(UDRS->fd_device);
int i;
int ret;
int size;
union inparam {
struct floppy_struct g;
struct format_descr f;
... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
int drive = (long)bdev->bd_disk->private_data;
int type = ITYPE(UDRS->fd_device);
int i;
int ret;
int size;
union inparam {
struct floppy_struct g;
struct format_descr f;
... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
int drive = (long)bdev->bd_disk->private_data;
int type = ITYPE(UDRS->fd_device);
int i;
int ret;
int size;
union inparam {
struct floppy_struct g;
struct format_descr f;
... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
switch (cmd) {
case FDGETPRM:
if (ret) {
return ret;
}
break;
}
if (_IOC_DIR(cmd) & _IOC_READ) {
return fd_copyout((void *)param, outparam, size);
... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
switch (cmd) {
case FDGETPRM:
if (ret) {
return ret;
}
memcpy(&inparam.g, outparam, offsetof(struct floppy_struct, name));
outparam = &inparam.g;
break... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case FDGETPRM:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case FDGETPRM:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
... | static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long param) {
switch (cmd) {
case FDGETPRM:
if (ret) {
return ret;
}
+ memcpy(&inparam.g, outparam, offsetof(struct floppy_struct, name));
+ outparam = &inparam.g;
... |
CVE-2018-7757 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/libsas/sas_expander.c | sas_smp_get_phy_events | int sas_smp_get_phy_events(struct sas_phy *phy) {
int res;
u8 *req;
u8 *resp;
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc_smp_resp(... | int sas_smp_get_phy_events(struct sas_phy *phy) {
int res;
u8 *req;
u8 *resp;
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc_smp_resp(... | int sas_smp_get_phy_events(struct sas_phy *phy) {
int res;
u8 *req;
u8 *resp;
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc_smp_resp(... | int sas_smp_get_phy_events(struct sas_phy *phy) {
int res;
u8 *req;
u8 *resp;
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc_smp_resp(... | int sas_smp_get_phy_events(struct sas_phy *phy) {
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc_smp_resp(RPEL_RESP_SIZE);
if (!resp) {
... | int sas_smp_get_phy_events(struct sas_phy *phy) {
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc_smp_resp(RPEL_RESP_SIZE);
if (!resp) {
... | int sas_smp_get_phy_events(struct sas_phy *phy) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc... | int sas_smp_get_phy_events(struct sas_phy *phy) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc... | int sas_smp_get_phy_events(struct sas_phy *phy) {
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req) {
return -ENOMEM;
}
resp = alloc_smp_resp(RPEL_RESP_SIZE);
if (!resp)... |
CVE-2018-7995 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/mcheck/mce.c | set_cmci_disabled | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
on_each_cpu(mce_disable_cmci, NULL, 1);
mc... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
on_each_cpu(mce_disa... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
on_each_cpu(mce_disable_cmci, NULL, 1);
... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
on_each_cpu(mc... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
mca_cfg.cmci_disabled = true;
} else {
on_each_... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
mca_cfg.cmci_disabled = true;
... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
/* PLACEHOLDER: DO ... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.cmci_disabled ^ !!new) {
... | static ssize_t set_cmci_disabled(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
+ mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.cmci_disabled ^ !!new) {
if (new) {
mca_cfg.cmci_disabled = t... |
CVE-2018-7995 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/mcheck/mce.c | set_ignore_ce | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
mce_timer_delete_all();
on_each_cpu(mce_disable_cm... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
mce_timer_delete_all();
... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
mce_timer_delete_all();
on_each_cpu(mce_disa... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
u64 new;
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
mce_timer_delete_all()... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
mca_cfg.ignore_ce = true;
} else {
on_each_cpu(mce_enab... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
mca_cfg.ignore_ce = true;
} else ... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
/* PLACEHOLDER: DO NOT DELE... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (strict_strtoull(buf, 0, &new) < 0) {
return -EVAL;
}
mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.ignore_ce ^ !!new) {
if (new)... | static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
if (kstrtou64(buf, 0, &new) < 0) {
return -EVAL;
}
+ mutex_lock(&mce_sysfs_mutex);
if (mca_cfg.ignore_ce ^ !!new) {
if (new) {
mca_cfg.ignore_ce = true;
... |
CVE-2018-7995 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/mcheck/mce.c | store_int_with_restart | static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
ssize_t ret = device_store_int(s, attr, buf, size);
mce_restart();
return ret;
} | static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
unsigned long old_check_interval = check_interval;
ssize_t ret = device_store_ulong(s, attr, buf, size);
if (check_interval == old_check_interval) {
return ret;
}
if (check_... | static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
ssize_t ret = device_store_int(s, attr, buf, size);
mce_restart();
return ret;
} | static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
unsigned long old_check_interval = check_interval;
ssize_t ret = device_store_ulong(s, attr, buf, size);
if (check_interval == old_check_interval) {
return ret;
}
if (check_... | static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
ssize_t ret = device_store_int(s, attr, buf, size);
mce_restart();
return ret;
}
| static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
unsigned long old_check_interval = check_interval;
ssize_t ret = device_store_ulong(s, attr, buf, size);
if (check_interval == old_check_interval) {
return ret;
}
if (check_... | static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
ssize_t ret = device_store_int(s, attr, buf, size);
mce_restart();
return ret;
}
| static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
unsigned long old_check_interval = check_interval;
ssize_t ret = device_store_ulong(s, attr, buf, size);
if (check_interval == old_check_interval) {
return ret;
}
if (check_... | static ssize_t store_int_with_restart(struct device *s, struct device_attribute *attr, const char *buf, size_t size) {
- ssize_t ret = device_store_int(s, attr, buf, size);
+ unsigned long old_check_interval = check_interval;
+ ssize_t ret = device_store_ulong(s, attr, buf, size);
+ if (check_interval == o... |
CVE-2018-8043 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/phy/mdio-bcm-unimac.c | unimac_mdio_probe | static int unimac_mdio_probe(struct platform_device *pdev) {
struct unimac_mdio_pdata *pdata = pdev->dev.platform_data;
struct unimac_mdio_priv *priv;
struct device_node *np;
struct mii_bus *bus;
struct resource *r;
int ret;
np = pdev->dev.of_node;
priv = devm_kzalloc(&pdev->dev, sizeof(... | static int unimac_mdio_probe(struct platform_device *pdev) {
struct unimac_mdio_pdata *pdata = pdev->dev.platform_data;
struct unimac_mdio_priv *priv;
struct device_node *np;
struct mii_bus *bus;
struct resource *r;
int ret;
np = pdev->dev.of_node;
priv = devm_kzalloc(&pdev->dev, sizeof(... | static int unimac_mdio_probe(struct platform_device *pdev) {
struct unimac_mdio_priv *priv;
struct device_node *np;
struct mii_bus *bus;
struct resource *r;
int ret;
np = pdev->dev.of_node;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
... | static int unimac_mdio_probe(struct platform_device *pdev) {
struct unimac_mdio_priv *priv;
struct device_node *np;
struct mii_bus *bus;
struct resource *r;
int ret;
np = pdev->dev.of_node;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
... | static int unimac_mdio_probe(struct platform_device *pdev) {
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!priv->base) {
return -ENOMEM;
}
unimac_mdio_clk_set(priv);
if (!priv->mii_bus) {
goto out_clk_d... | static int unimac_mdio_probe(struct platform_device *pdev) {
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r) {
return -EVAL;
}
priv->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!priv->base) {
return -ENOMEM;
}
unimac_mdio_clk_set(priv);
if... | static int unimac_mdio_probe(struct platform_device *pdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!priv->base) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
r... | static int unimac_mdio_probe(struct platform_device *pdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r) {
return -EVAL;
}
priv->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!priv->base) {
/* PLACEHOLDE... | static int unimac_mdio_probe(struct platform_device *pdev) {
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!r) {
+ return -EVAL;
+ }
priv->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!priv->base) {
return -ENOMEM;
}
unimac_mdio_clk_set(pri... |
CVE-2018-8781 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/udl/udl_fb.c | udl_fb_mmap | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
unsigned long start = vma->vm_start;
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
unsigned long page, pos;
if (offset + size > info->fix.smem_len) {
return -EVA... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
unsigned long start = vma->vm_start;
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset;
unsigned long page, pos;
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
return -EVAL;
}
offset = vma->v... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
unsigned long start = vma->vm_start;
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
unsigned long page, pos;
if (offset + size > info->fix.smem_len) {
return -EVA... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
unsigned long start = vma->vm_start;
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset;
unsigned long page, pos;
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
return -EVAL;
}
offset = vma->v... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
unsigned long page, pos;
if (offset + size > info->fix.smem_len) {
return -EVAL;
}
pos = (unsigned long)info->f... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset;
unsigned long page, pos;
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
return -EVAL;
}
offset = vma->vm_pgoff << PAGE_SHIFT;
if (offset > i... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
unsigned long page, pos;
if (offset + size > info->fix.smem_len) {
re... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long size = vma->vm_end - vma->vm_start;
unsigned long offset;
unsigned long page, pos;
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
return -EVAL;
}
offset... | static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) {
unsigned long size = vma->vm_end - vma->vm_start;
- unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
+ unsigned long offset;
unsigned long page, pos;
- if (offset + size > info->fix.smem_len) {
+ if (vma->vm_pgoff > (~0... |
CVE-2018-8822 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ncpfs/ncplib_kernel.c | ncp_read_kernel | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
const char *source;
int result;
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_add_be16(ser... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
const char *source;
int result;
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_add_be16(ser... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
const char *source;
int result;
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_add_be16(ser... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
const char *source;
int result;
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_add_be16(ser... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_add_be16(server, to_read);
if ((result = ncp_req... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_add_be16(server, to_read);
if ((result = ncp_req... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_ad... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_ad... | int ncp_read_kernel(struct ncp_server *server, const char *file_id, __u32 offset, __u16 to_read, char *target, int *bytes_read) {
ncp_init_request(server);
ncp_add_byte(server, 0);
ncp_add_mem(server, file_id, 6);
ncp_add_be32(server, offset);
ncp_add_be16(server, to_read);
if ((result = ... |
CVE-2018-9363 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/hidp/core.c | hidp_process_report | static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
} | static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, unsigned int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
} | static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
} | static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, unsigned int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
} | static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
}
| static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, unsigned int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
}
| static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
}
| static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, unsigned int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcpy(session->input_buf, data, len);
hid_input_report(session->hid, type, session->input_buf, len, intr);
} | -static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, int len, int intr) {
+static void hidp_process_report(struct hidp_session *session, int type, const u8 *data, unsigned int len, int intr) {
if (len > HID_MAX_BUFFER_SIZE) {
len = HID_MAX_BUFFER_SIZE;
}
memcp... |
CVE-2018-9385 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/amba/bus.c | driver_override_store | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GFP_KERNE... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count >= (PAGE_SIZE - 1)) {
return -EVAL;
}
driver_override = kstrndup(buf, count, G... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GFP_KERNE... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count >= (PAGE_SIZE - 1)) {
return -EVAL;
}
driver_override = kstrndup(buf, count, G... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GFP_KERNE... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count >= (PAGE_SIZE - 1)) {
return -EVAL;
}
driver_override = kstrndup(buf, count, G... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GFP_KERNE... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count >= (PAGE_SIZE - 1)) {
return -EVAL;
}
driver_override = kstrndup(buf, count, G... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
- if (count > PATH_MAX) {
+ if (count >= (PAGE_SIZE - 1)) {
return -EVAL;
}
driv... |
CVE-2018-9415 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/amba/bus.c | driver_override_show | static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
return sprintf(buf, "%s\n", dev->driver_override);
} | static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
ssize_t len;
device_lock(_dev);
len = sprintf(buf, "%s\n", dev->driver_override);
device_unlock(_dev);
return len;
} | static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
return sprintf(buf, "%s\n", dev->driver_override);
} | static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
ssize_t len;
device_lock(_dev);
len = sprintf(buf, "%s\n", dev->driver_override);
device_unlock(_dev);
return len;
} | static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
return sprintf(buf, "%s\n", dev->driver_override);
}
| static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
ssize_t len;
device_lock(_dev);
len = sprintf(buf, "%s\n", dev->driver_override);
device_unlock(_dev);
return len;
}
| static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
return sprintf(buf, "%s\n", dev->driver_override);
}
| static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
ssize_t len;
device_lock(_dev);
len = sprintf(buf, "%s\n", dev->driver_override);
device_unlock(_dev);
return len;
} | static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) {
struct amba_device *dev = to_amba_device(_dev);
- return sprintf(buf, "%s\n", dev->driver_override);
+ ssize_t len;
+ device_lock(_dev);
+ len = sprintf(buf, "%s\n", dev->driver_override);
+ device_... |
CVE-2018-9415 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/amba/bus.c | driver_override_store | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old = dev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndu... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GFP_KERNE... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old = dev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndu... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GFP_KERNE... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old = dev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
if (cp) {
*cp = '... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
if (cp) {
*cp = '\0';
}
device_l... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old = dev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DE... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) {
struct amba_device *dev = to_amba_device(_dev);
- char *driver_override, *old = dev->driver_override, *cp;
+ char *driver_override, *old, *cp;
if (count > PATH_MAX) {
retur... |
CVE-2018-9422 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/futex.c | get_futex_key | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
struct mm_struct *mm = current->mm;
struct page *page, *page_head;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlikely((address % sizeof(u32)) != 0)) ... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
struct mm_struct *mm = current->mm;
struct page *page, *page_head;
struct address_space *mapping;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlik... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
struct mm_struct *mm = current->mm;
struct page *page, *page_head;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlikely((address % sizeof(u32)) != 0)) ... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
struct mm_struct *mm = current->mm;
struct page *page, *page_head;
struct address_space *mapping;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlik... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
struct page *page, *page_head;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlikely((address % sizeof(u32)) != 0)) {
return -EVAL;
}
addres... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
struct page *page, *page_head;
struct address_space *mapping;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlikely((address % sizeof(u32)) != 0)) {
... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct page *page, *page_head;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlikely((address % sizeof(u32... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct page *page, *page_head;
struct address_space *mapping;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
... | static int get_futex_key(u32 *uaddr, int fshared, union futex_key *key, int rw) {
unsigned long address = (unsigned long)uaddr;
struct page *page, *page_head;
+ struct address_space *mapping;
int err, ro = 0;
key->both.offset = address % PAGE_SIZE;
if (unlikely((address % sizeof(u32)) != 0)... |
CVE-2018-9465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | binder_deferred_func | static void binder_deferred_func(struct work_struct *work) {
struct binder_proc *proc;
struct files_struct *files;
int defer;
do {
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_list.first, struct binder_proc, ... | static void binder_deferred_func(struct work_struct *work) {
struct binder_proc *proc;
struct files_struct *files;
int defer;
do {
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_list.first, struct binder_proc, ... | static void binder_deferred_func(struct work_struct *work) {
struct binder_proc *proc;
struct files_struct *files;
int defer;
do {
binder_lock(__func__);
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_l... | static void binder_deferred_func(struct work_struct *work) {
struct binder_proc *proc;
struct files_struct *files;
int defer;
do {
binder_lock(__func__);
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_l... | static void binder_deferred_func(struct work_struct *work) {
do {
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_list.first, struct binder_proc, deferred_work_node);
hlist_del_init(&proc->deferred_work_node);
... | static void binder_deferred_func(struct work_struct *work) {
do {
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_list.first, struct binder_proc, deferred_work_node);
hlist_del_init(&proc->deferred_work_node);
... | static void binder_deferred_func(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
binder_lock(__func__);
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_list.first, struct binder_pr... | static void binder_deferred_func(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
binder_lock(__func__);
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_list.first, struct binder_pr... | static void binder_deferred_func(struct work_struct *work) {
do {
mutex_lock(&binder_deferred_lock);
if (!hlist_empty(&binder_deferred_list)) {
proc = hlist_entry(binder_deferred_list.first, struct binder_proc, deferred_work_node);
hlist_del_init(&proc->deferred_work_no... |
CVE-2018-9465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | binder_mmap | static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
int ret;
struct binder_proc *proc = filp->private_data;
const char *failure_string;
if (proc->tsk != current->group_leader) {
return -EVAL;
}
if ((vma->vm_end - vma->vm_start) > SZ_4M) {
vma->vm_end = vma->vm... | static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
int ret;
struct binder_proc *proc = filp->private_data;
const char *failure_string;
if (proc->tsk != current->group_leader) {
return -EVAL;
}
if ((vma->vm_end - vma->vm_start) > SZ_4M) {
vma->vm_end = vma->vm... | static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
int ret;
struct vm_struct *area;
struct binder_proc *proc = filp->private_data;
const char *failure_string;
struct binder_buffer *buffer;
if (proc->tsk != current->group_leader) {
return -EVAL;
}
if ((vma->vm... | static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
int ret;
struct vm_struct *area;
struct binder_proc *proc = filp->private_data;
const char *failure_string;
struct binder_buffer *buffer;
if (proc->tsk != current->group_leader) {
return -EVAL;
}
if ((vma->vm... | static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
struct binder_proc *proc = filp->private_data;
if (ret) {
return ret;
}
proc->files = get_files_struct(current);
return 0;
}
| static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
struct binder_proc *proc = filp->private_data;
if (ret) {
return ret;
}
mutex_lock(&proc->files_lock);
proc->files = get_files_struct(current);
mutex_unlock(&proc->files_lock);
return 0;
}
| static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct binder_proc *proc = filp->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (binder_update_page_range(proc, 1, proc->buffer, proc->buffer + PAGE_SIZE, vma)) {
... | static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct binder_proc *proc = filp->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (binder_update_page_range(proc, 1, proc->buffer, proc->buffer + PAGE_SIZE, vma)) {
... | static int binder_mmap(struct file *filp, struct vm_area_struct *vma) {
struct binder_proc *proc = filp->private_data;
if (ret) {
return ret;
}
+ mutex_lock(&proc->files_lock);
proc->files = get_files_struct(current);
+ mutex_unlock(&proc->files_lock);
return 0;
} |
CVE-2018-9465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | binder_open | static int binder_open(struct inode *nodp, struct file *filp) {
struct binder_proc *proc;
struct binder_device *binder_dev;
binder_debug(BDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n", current->group_leader->pid, current->pid);
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
re... | static int binder_open(struct inode *nodp, struct file *filp) {
struct binder_proc *proc;
struct binder_device *binder_dev;
binder_debug(BDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n", current->group_leader->pid, current->pid);
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
re... | static int binder_open(struct inode *nodp, struct file *filp) {
struct binder_proc *proc;
binder_debug(BDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n", current->group_leader->pid, current->pid);
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
return -ENOMEM;
}
get_task_struc... | static int binder_open(struct inode *nodp, struct file *filp) {
struct binder_proc *proc;
binder_debug(BDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n", current->group_leader->pid, current->pid);
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
return -ENOMEM;
}
get_task_struc... | static int binder_open(struct inode *nodp, struct file *filp) {
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
return -ENOMEM;
}
proc->tsk = current->group_leader;
IT_LIST_HEAD(&proc->todo);
}
| static int binder_open(struct inode *nodp, struct file *filp) {
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
return -ENOMEM;
}
proc->tsk = current->group_leader;
mutex_init(&proc->files_lock);
IT_LIST_HEAD(&proc->todo);
}
| static int binder_open(struct inode *nodp, struct file *filp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
proc->tsk = current->group_leader;
IT_LIST_HEAD... | static int binder_open(struct inode *nodp, struct file *filp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
proc->tsk = current->group_leader;
mutex_init(&... | static int binder_open(struct inode *nodp, struct file *filp) {
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL) {
return -ENOMEM;
}
proc->tsk = current->group_leader;
+ mutex_init(&proc->files_lock);
IT_LIST_HEAD(&proc->todo);
} |
CVE-2018-9465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | task_close_fd | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
if (proc->files == NULL) {
return -ESRCH;
}
retval = __close_fd(proc->files, fd);
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval == -ERESTARTNOHAND || retval == -ERESTART_RESTARTBLOCK... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
retval = -ESRCH;
goto err;
}
retval = __close_fd(proc->files, fd);
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
if (proc->files == NULL) {
return -ESRCH;
}
retval = __close_fd(proc->files, fd);
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval == -ERESTARTNOHAND || retval == -ERESTART_RESTARTBLOCK... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
retval = -ESRCH;
goto err;
}
retval = __close_fd(proc->files, fd);
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
if (proc->files == NULL) {
return -ESRCH;
}
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval == -ERESTARTNOHAND || retval == -ERESTART_RESTARTBLOCK)) {
retval = -ETR;
}
retu... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
retval = -ESRCH;
goto err;
}
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval == -ERESTARTNOHAND || retval == -ERESTART... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
if (proc->files == NULL) {
return -ESRCH;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval == -ERESTARTNOHAND || retval == -ERESTART_REST... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
retval = -ESRCH;
goto err;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR |... | static long task_close_fd(struct binder_proc *proc, unsigned int fd) {
int retval;
+ mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
- return -ESRCH;
+ retval = -ESRCH;
+ goto err;
}
if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOTR || retval == -EREST... |
CVE-2018-9465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | task_fd_install | static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
if (proc->files) {
__fd_install(proc->files, fd, file);
}
} | static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
mutex_lock(&proc->files_lock);
if (proc->files) {
__fd_install(proc->files, fd, file);
}
mutex_unlock(&proc->files_lock);
} | static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
if (proc->files) {
__fd_install(proc->files, fd, file);
}
} | static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
mutex_lock(&proc->files_lock);
if (proc->files) {
__fd_install(proc->files, fd, file);
}
mutex_unlock(&proc->files_lock);
} | static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
if (proc->files) {
__fd_install(proc->files, fd, file);
}
}
| static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
mutex_lock(&proc->files_lock);
if (proc->files) {
__fd_install(proc->files, fd, file);
}
mutex_unlock(&proc->files_lock);
}
| static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
if (proc->files) {
__fd_install(proc->files, fd, file);
}
}
| static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
mutex_lock(&proc->files_lock);
if (proc->files) {
__fd_install(proc->files, fd, file);
}
mutex_unlock(&proc->files_lock);
} | static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) {
+ mutex_lock(&proc->files_lock);
if (proc->files) {
__fd_install(proc->files, fd, file);
}
+ mutex_unlock(&proc->files_lock);
} |
CVE-2018-9465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | task_get_unused_fd_flags | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
struct files_struct *files = proc->files;
unsigned long rlim_cur;
unsigned long irqs;
if (files == NULL) {
return -ESRCH;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
return -EMFILE;
}
rlim_cur = ... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
unsigned long rlim_cur;
unsigned long irqs;
int ret;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
ret = -ESRCH;
goto err;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
ret = -EMFIL... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
struct files_struct *files = proc->files;
unsigned long rlim_cur;
unsigned long irqs;
if (files == NULL) {
return -ESRCH;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
return -EMFILE;
}
rlim_cur = ... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
unsigned long rlim_cur;
unsigned long irqs;
int ret;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
ret = -ESRCH;
goto err;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
ret = -EMFIL... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
struct files_struct *files = proc->files;
unsigned long rlim_cur;
unsigned long irqs;
if (files == NULL) {
return -ESRCH;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
return -EMFILE;
}
rlim_cur = ... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
unsigned long rlim_cur;
unsigned long irqs;
int ret;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
ret = -ESRCH;
goto err;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
ret = -EMFIL... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
struct files_struct *files = proc->files;
unsigned long rlim_cur;
unsigned long irqs;
if (files == NULL) {
return -ESRCH;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
return -EMFILE;
}
rlim_cur = ... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
unsigned long rlim_cur;
unsigned long irqs;
int ret;
mutex_lock(&proc->files_lock);
if (proc->files == NULL) {
ret = -ESRCH;
goto err;
}
if (!lock_task_sighand(proc->tsk, &irqs)) {
ret = -EMFIL... | static int task_get_unused_fd_flags(struct binder_proc *proc, int flags) {
- struct files_struct *files = proc->files;
unsigned long rlim_cur;
unsigned long irqs;
- if (files == NULL) {
- return -ESRCH;
+ int ret;
+ mutex_lock(&proc->files_lock);
+ if (proc->files == NULL) {
+ re... |
CVE-2018-9516 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-debug.c | hid_debug_events_read | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
while (ret == 0) {
if (list->head == list->tail) {
add_wait_queue(&list->hdev->debug_wait, &wait);
set_current_state(TASK_TERRUPTI... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
while (ret == 0) {
if (list->head == list->tail) {
add_wait_queue(&list->hdev->debug_wait, &wait);
set_current_state(TASK_TERRUPTI... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (ret == 0) {
if (list->head == list->tail) {
add_wait_queue(&list->hdev->debug_wait, &... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (ret == 0) {
if (list->head == list->tail) {
add_wait_queue(&list->hdev->debug_wait, &... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
while (ret == 0) {
if (list->head == list->tail) {
add_wait_queue(&list->hdev->debug_wait, &wait);
set_current_state(TASK_TE... |
CVE-2018-9517 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_eth.c | l2tp_eth_create | static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
struct net_device *dev;
char name[IFNAMSIZ];
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_eth *priv;
struct l2tp_eth_sess *spriv;
int rc;
... | static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
struct net_device *dev;
char name[IFNAMSIZ];
struct l2tp_session *session;
struct l2tp_eth *priv;
struct l2tp_eth_sess *spriv;
int rc;
struct l2tp_eth_... | static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
struct net_device *dev;
char name[IFNAMSIZ];
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_eth *priv;
struct l2tp_eth_sess *spriv;
int rc;
... | static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
struct net_device *dev;
char name[IFNAMSIZ];
struct l2tp_session *session;
struct l2tp_eth *priv;
struct l2tp_eth_sess *spriv;
int rc;
struct l2tp_eth_... | static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
char name[IFNAMSIZ];
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_eth_net *pn;
tunnel = l2tp_tunnel_find(net, tunnel_id);
if (!tunnel) {
... | static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
char name[IFNAMSIZ];
struct l2tp_session *session;
struct l2tp_eth_net *pn;
if (cfg->ifname) {
dev = dev_get_by_name(net, cfg->ifname);
if (dev) {
... | static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char name[IFNAMSIZ];
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char name[IFNAMSIZ];
struct l2tp_session *session;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2tp_eth_... | -static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
+static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
char name[IFNAMSIZ];
- struct l2tp_tunnel... |
CVE-2018-9517 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_netlink.c | l2tp_nl_cmd_session_create | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
u32 tunnel_id = 0;
u32 session_id;
u32 peer_session_id;
int ret = 0;
struct l2tp_tunnel *tunnel;
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);
if (!info->attrs[L2TP_ATTR_CO... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
u32 tunnel_id = 0;
u32 session_id;
u32 peer_session_id;
int ret = 0;
struct l2tp_tunnel *tunnel;
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);
if (!info->attrs[L2TP_ATTR_CO... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
u32 tunnel_id = 0;
u32 session_id;
u32 peer_session_id;
int ret = 0;
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
u32 tunnel_id = 0;
u32 session_id;
u32 peer_session_id;
int ret = 0;
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);
if (!info->attrs[L2TP_ATTR_CONN_ID]) {
goto out;
}
tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]);
tunnel = l2tp_tunn... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);
if (!info->attrs[L2TP_ATTR_CONN_ID]) {
goto out;
}
tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]);
tunnel = l2tp_tunn... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);
if (!info->attrs[L2TP_ATTR_CONN_ID]) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);
if (!info->attrs[L2TP_ATTR_CONN_ID]) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *info) {
struct l2tp_session_cfg cfg = { 0, };
struct net *net = genl_info_net(info);
if (!info->attrs[L2TP_ATTR_CONN_ID]) {
goto out;
}
tunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]);
tunnel = l... |
CVE-2018-9517 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_ppp.c | pppol2tp_session_create | static int pppol2tp_session_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct pppol2tp_session *ps;
tunnel = l2tp_tunnel_find(net, tunnel_id);
error = -ENOENT;
... | static int pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_session *session;
struct pppol2tp_session *ps;
if (!tunnel->sock) {
error = -ENOENT;
goto out;
}
if (cfg->mt... | static int pppol2tp_session_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct pppol2tp_session *ps;
tunnel = l2tp_tunnel_find(net, tunnel_id);
error = -ENOENT;
... | static int pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_session *session;
struct pppol2tp_session *ps;
if (!tunnel->sock) {
error = -ENOENT;
goto out;
}
if (cfg->mt... | static int pppol2tp_session_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct pppol2tp_session *ps;
tunnel = l2tp_tunnel_find(net, tunnel_id);
error = -ENOENT;
... | static int pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_session *session;
struct pppol2tp_session *ps;
if (!tunnel->sock) {
error = -ENOENT;
goto out;
}
session = l... | static int pppol2tp_session_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct pppol2tp_session *ps;
tunnel = l2tp_tunnel_find(net, tunnel_id);
error = -ENOENT;
... | static int pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
struct l2tp_session *session;
struct pppol2tp_session *ps;
if (!tunnel->sock) {
error = -ENOENT;
goto out;
}
/* PLACEHOL... | -static int pppol2tp_session_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
+static int pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) {
int error;
- struct l2tp_... |
CVE-2018-9518 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/nfc/llcp_commands.c | nfc_llcp_build_sdreq_tlv | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
struct nfc_llcp_sdp_tlv *sdreq;
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
if (sdreq == NULL) {
return NULL;
}
sdreq->tlv_len = uri_len... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
struct nfc_llcp_sdp_tlv *sdreq;
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
if (WARN_ON_ONCE(uri_len > U8_MAX - 4)) {
return NULL;
}
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
if ... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
struct nfc_llcp_sdp_tlv *sdreq;
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
if (sdreq == NULL) {
return NULL;
}
sdreq->tlv_len = uri_len... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
struct nfc_llcp_sdp_tlv *sdreq;
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
if (WARN_ON_ONCE(uri_len > U8_MAX - 4)) {
return NULL;
}
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
if ... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
sdreq->tlv_len = uri_len + 3;
if (uri[uri_len - 1] == 0) {
sdreq->tlv_len--;
}
sdreq->tlv = ... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
if (WARN_ON_ONCE(uri_len > U8_MAX - 4)) {
return NULL;
}
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
sdreq->tlv_len = uri_len + 3;
if (u... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sdreq->tlv_l... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
if (WARN_ON_ONCE(uri_len > U8_MAX - 4)) {
return NULL;
}
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KE... | struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri, size_t uri_len) {
pr_debug("uri: %s, len: %zu\n", uri, uri_len);
+ if (WARN_ON_ONCE(uri_len > U8_MAX - 4)) {
+ return NULL;
+ }
sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL);
sdreq->tlv_len = uri_len + 3;
... |
CVE-2018-9568 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/sock.c | sk_clone_lock | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
struct sock *newsk;
bool is_charged = true;
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
struct sk_filter *filter;
sock_copy(newsk, sk);
if (likely(newsk->sk_net_refcnt)... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
struct sock *newsk;
bool is_charged = true;
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
struct sk_filter *filter;
sock_copy(newsk, sk);
newsk->sk_prot_creator = sk->sk_... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
struct sock *newsk;
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
struct sk_filter *filter;
sock_copy(newsk, sk);
get_net(sock_net(newsk));
sk_node_init(&newsk->sk_no... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
struct sock *newsk;
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
struct sk_filter *filter;
sock_copy(newsk, sk);
newsk->sk_prot_creator = sk->sk_prot;
get_net(sock_n... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
sock_copy(newsk, sk);
if (likely(newsk->sk_net_refcnt)) {
get_net(sock_net(newsk));
}
sk_node_init(&newsk->sk_no... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
sock_copy(newsk, sk);
newsk->sk_prot_creator = sk->sk_prot;
if (likely(newsk->sk_net_refcnt)) {
get_net(sock_net(newsk))... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sock_copy(newsk, sk);
get_net(sock_net(n... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sock_copy(newsk, sk);
newsk->sk_prot_cre... | struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) {
newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
if (newsk != NULL) {
sock_copy(newsk, sk);
+ newsk->sk_prot_creator = sk->sk_prot;
if (likely(newsk->sk_net_refcnt)) {
get_net(sock_net(... |
CVE-2019-0145 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | i40e_config_iwarp_qvlist | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
size = size... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
msix_vf = p... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct i40e_virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
s... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct i40e_virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
m... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
size = sizeof(struct virtchnl_iwarp_qvlist_info) + (sizeof(struct virtchnl_iwarp_qv_info) * (qvlist_info->num_vectors - 1));
vf->qvlist_info = kzallo... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
if (qvlist_info->num_vectors > msix_vf) {
dev_warn(&pf->pdev->dev, "Incorrect number of iwarp... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct i40e_hw *hw = &pf->hw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 msix_vf, size;
size = sizeof(struct i40e_virtchnl_iwarp_qvlist_... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct i40e_hw *hw = &pf->hw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 msix_vf, size;
msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
+ msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
+ if (qvlist_info->num_vectors > msix_vf) {
+ dev_warn(&pf->pdev->dev, "Incorrect number of... |
CVE-2019-0146 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | i40e_config_iwarp_qvlist | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
size = size... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
msix_vf = p... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct i40e_virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
s... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct i40e_virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
m... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
size = sizeof(struct virtchnl_iwarp_qvlist_info) + (sizeof(struct virtchnl_iwarp_qv_info) * (qvlist_info->num_vectors - 1));
vf->qvlist_info = kzallo... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
if (qvlist_info->num_vectors > msix_vf) {
dev_warn(&pf->pdev->dev, "Incorrect number of iwarp... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct i40e_hw *hw = &pf->hw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 msix_vf, size;
size = sizeof(struct i40e_virtchnl_iwarp_qvlist_... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct i40e_hw *hw = &pf->hw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 msix_vf, size;
msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
+ msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
+ if (qvlist_info->num_vectors > msix_vf) {
+ dev_warn(&pf->pdev->dev, "Incorrect number of... |
CVE-2019-0147 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | i40e_config_iwarp_qvlist | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
size = size... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
msix_vf = p... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct i40e_virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
s... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_pf *pf = vf->pf;
struct i40e_hw *hw = &pf->hw;
struct i40e_virtchnl_iwarp_qv_info *qv_info;
u32 v_idx, i, reg_idx, reg;
u32 next_q_idx, next_q_type;
u32 msix_vf, size;
m... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
size = sizeof(struct virtchnl_iwarp_qvlist_info) + (sizeof(struct virtchnl_iwarp_qv_info) * (qvlist_info->num_vectors - 1));
vf->qvlist_info = kzallo... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
if (qvlist_info->num_vectors > msix_vf) {
dev_warn(&pf->pdev->dev, "Incorrect number of iwarp... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct i40e_hw *hw = &pf->hw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 msix_vf, size;
size = sizeof(struct i40e_virtchnl_iwarp_qvlist_... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct i40e_hw *hw = &pf->hw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 msix_vf, size;
msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
... | static int i40e_config_iwarp_qvlist(struct i40e_vf *vf, struct virtchnl_iwarp_qvlist_info *qvlist_info) {
struct i40e_hw *hw = &pf->hw;
u32 msix_vf, size;
+ msix_vf = pf->hw.func_caps.num_msix_vectors_vf;
+ if (qvlist_info->num_vectors > msix_vf) {
+ dev_warn(&pf->pdev->dev, "Incorrect number of... |
CVE-2019-0148 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | i40e_vc_isvalid_vector_id | static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u8 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
} | static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u32 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
} | static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u8 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
} | static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u32 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
} | static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u8 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
}
| static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u32 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
}
| static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u8 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
}
| static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u32 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
} | -static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u8 vector_id) {
+static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u32 vector_id) {
struct i40e_pf *pf = vf->pf;
return vector_id < pf->hw.func_caps.num_msix_vectors_vf;
} |
CVE-2019-0154 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/i915/intel_pm.c | bxt_init_clock_gating | static void bxt_init_clock_gating(struct drm_device *dev) {
struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
} | static void bxt_init_clock_gating(struct drm_device *dev) {
struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
I915_WRITE(RM... | static void bxt_init_clock_gating(struct drm_i915_private *dev_priv) {
gen9_init_clock_gating(dev_priv);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
I915_WRITE(GEN9_CLKGAT... | static void bxt_init_clock_gating(struct drm_i915_private *dev_priv) {
gen9_init_clock_gating(dev_priv);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
I915_WRITE(GEN9_CLKGAT... | static void bxt_init_clock_gating(struct drm_device *dev) {
struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
}
| static void bxt_init_clock_gating(struct drm_device *dev) {
struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
I915_WRITE(RM... | static void bxt_init_clock_gating(struct drm_i915_private *dev_priv) {
gen9_init_clock_gating(dev_priv);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
/* PLACEHOLDER: DO NOT... | static void bxt_init_clock_gating(struct drm_i915_private *dev_priv) {
gen9_init_clock_gating(dev_priv);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
/* PLACEHOLDER: DO NOT... | static void bxt_init_clock_gating(struct drm_device *dev) {
struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) | GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
+ I915_WRI... |
CVE-2019-10124 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/memory-failure.c | soft_offline_in_use_page | static int soft_offline_in_use_page(struct page *page, int flags) {
int ret;
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(hpage);
if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
unlock_page(hpage);
if (... | static int soft_offline_in_use_page(struct page *page, int flags) {
int ret;
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(page);
if (!PageAnon(page) || unlikely(split_huge_page(page))) {
unlock_page(page);
if (!Pag... | static int soft_offline_in_use_page(struct page *page, int flags) {
int ret;
int mt;
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(hpage);
if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
unlock_page(hpage);
... | static int soft_offline_in_use_page(struct page *page, int flags) {
int ret;
int mt;
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(page);
if (!PageAnon(page) || unlikely(split_huge_page(page))) {
unlock_page(page);
... | static int soft_offline_in_use_page(struct page *page, int flags) {
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(hpage);
if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
unlock_page(hpage);
if (!PageAnon(hpa... | static int soft_offline_in_use_page(struct page *page, int flags) {
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(page);
if (!PageAnon(page) || unlikely(split_huge_page(page))) {
unlock_page(page);
if (!PageAnon(page)) ... | static int soft_offline_in_use_page(struct page *page, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(hpage);
if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
... | static int soft_offline_in_use_page(struct page *page, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(page);
if (!PageAnon(page) || unlikely(split_huge_page(page))) {
un... | static int soft_offline_in_use_page(struct page *page, int flags) {
struct page *hpage = compound_head(page);
if (!PageHuge(page) && PageTransHuge(hpage)) {
- lock_page(hpage);
- if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
- unlock_page(hpage);
- if (!PageA... |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | __io_submit_one | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
struct aio_kiocb *req;
ssize_t ret;
if (unlikely(iocb->aio_reserved2)) {
pr_debug("EVAL: reserve field set\n");
return -EVAL;
}
if (unlikely( (iocb->aio_buf != (unsigned lon... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
struct aio_kiocb *req;
ssize_t ret;
if (unlikely(iocb->aio_reserved2)) {
pr_debug("EVAL: reserve field set\n");
return -EVAL;
}
if (unlikely( (iocb->aio_buf != (unsigned lon... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
struct aio_kiocb *req;
ssize_t ret;
if (unlikely(iocb->aio_reserved2)) {
pr_debug("EVAL: reserve field set\n");
return -EVAL;
}
if (unlikely( (iocb->aio_buf != (unsigned lon... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
struct aio_kiocb *req;
ssize_t ret;
if (unlikely(iocb->aio_reserved2)) {
pr_debug("EVAL: reserve field set\n");
return -EVAL;
}
if (unlikely( (iocb->aio_buf != (unsigned lon... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
if (!get_reqs_available(ctx)) {
return -EAGA;
}
req = aio_get_req(ctx);
if (unlikely(!req)) {
goto out_put_reqs_available;
}
switch (iocb->aio_lio_opcode) {
case IOC... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
if (!get_reqs_available(ctx)) {
return -EAGA;
}
req = aio_get_req(ctx);
if (unlikely(!req)) {
goto out_put_reqs_available;
}
req->ki_filp = fget(iocb->aio_fildes);
r... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!get_reqs_available(ctx)) {
return -EAGA;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
req = aio_get_req(ctx);
if (unlikely(... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!get_reqs_available(ctx)) {
return -EAGA;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
req = aio_get_req(ctx);
if (unlikely(... | static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb *user_iocb, bool compat) {
if (!get_reqs_available(ctx)) {
return -EAGA;
}
req = aio_get_req(ctx);
if (unlikely(!req)) {
goto out_put_reqs_available;
+ }
+ req->ki_filp = fget(iocb->aio_filde... |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_complete_rw | static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, rw);
if (!list_empty_careful(&iocb->ki_list)) {
aio_remove_iocb(iocb);
}
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_f... | static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, rw);
if (!list_empty_careful(&iocb->ki_list)) {
aio_remove_iocb(iocb);
}
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_f... | static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, rw);
if (!list_empty_careful(&iocb->ki_list)) {
aio_remove_iocb(iocb);
}
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_f... | static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, rw);
if (!list_empty_careful(&iocb->ki_list)) {
aio_remove_iocb(iocb);
}
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_f... | static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_filp);
file_end_write(kiocb->ki_filp);
}
fput(kiocb->ki_filp);
aio_complete(iocb, res, res2);
}
| static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_filp);
file_end_write(kiocb->ki_filp);
}
aio_complete(iocb, res, res2);
}
| static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_filp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
file_end_write(kiocb->ki_filp);
}
... | static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_filp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
file_end_write(kiocb->ki_filp);
}
... | static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) {
if (kiocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(kiocb->ki_filp);
file_end_write(kiocb->ki_filp);
}
- fput(kiocb->ki_filp);
aio_complete(iocb, res, res2);
} |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_fsync | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
req->file = fget(iocb->aio_fildes);
if (unlikely(!req->file)) {
return -EBADF;
}
if ... | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
if (unlikely(!req->file->f_op->fsync)) {
return -EVAL;
}
req->datasync = datasync;
I... | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
req->file = fget(iocb->aio_fildes);
if (unlikely(!req->file)) {
return -EBADF;
}
if ... | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
if (unlikely(!req->file->f_op->fsync)) {
return -EVAL;
}
req->datasync = datasync;
I... | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
req->file = fget(iocb->aio_fildes);
if (unlikely(!req->file)) {
return -EBADF;
}
if ... | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
if (unlikely(!req->file->f_op->fsync)) {
return -EVAL;
}
}
| static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
req->file = fget(iocb->aio_fildes);
if (unlikely(!req->file)) {
return -EBADF;
}
if ... | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
if (unlikely(!req->file->f_op->fsync)) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE T... | static int aio_fsync(struct fsync_iocb *req, const struct iocb *iocb, bool datasync) {
if (unlikely(iocb->aio_buf || iocb->aio_offset || iocb->aio_nbytes || iocb->aio_rw_flags)) {
return -EVAL;
}
- req->file = fget(iocb->aio_fildes);
- if (unlikely(!req->file)) {
- return -EBADF;
- }... |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_fsync_work | static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
fput(req->file);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
} | static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
} | static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
fput(req->file);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
} | static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
} | static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
fput(req->file);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
}
| static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
}
| static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
fput(req->file);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
}
| static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
} | static void aio_fsync_work(struct work_struct *work) {
struct fsync_iocb *req = container_of(work, struct fsync_iocb, work);
int ret;
ret = vfs_fsync(req->file, req->datasync);
- fput(req->file);
aio_complete(container_of(req, struct aio_kiocb, fsync), ret, 0);
} |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_poll | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
struct kioctx *ctx = aiocb->ki_ctx;
struct poll_iocb *req = &aiocb->poll;
struct aio_poll_table apt;
__poll_t mask;
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
if (iocb->aio_offset || iocb->aio... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
struct kioctx *ctx = aiocb->ki_ctx;
struct poll_iocb *req = &aiocb->poll;
struct aio_poll_table apt;
__poll_t mask;
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
if (iocb->aio_offset || iocb->aio... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
struct kioctx *ctx = aiocb->ki_ctx;
struct poll_iocb *req = &aiocb->poll;
struct aio_poll_table apt;
__poll_t mask;
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
if (iocb->aio_offset || iocb->aio... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
struct kioctx *ctx = aiocb->ki_ctx;
struct poll_iocb *req = &aiocb->poll;
struct aio_poll_table apt;
__poll_t mask;
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
if (iocb->aio_offset || iocb->aio... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
struct poll_iocb *req = &aiocb->poll;
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
req->events = demangle_poll(iocb->aio_buf) | EPOLLERR | EPOLLHUP;
req->file = fget(iocb->aio_fildes);
if (unlikely(... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
struct poll_iocb *req = &aiocb->poll;
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
req->events = demangle_poll(iocb->aio_buf) | EPOLLERR | EPOLLHUP;
req->head = NULL;
mask = vfs_poll(req->file, &apt... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct poll_iocb *req = &aiocb->poll;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT ... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct poll_iocb *req = &aiocb->poll;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT ... | static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) {
struct poll_iocb *req = &aiocb->poll;
if ((u16)iocb->aio_buf != iocb->aio_buf) {
return -EVAL;
}
req->events = demangle_poll(iocb->aio_buf) | EPOLLERR | EPOLLHUP;
- req->file = fget(iocb->aio_fildes);
- if (u... |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_poll_complete | static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
struct file *file = iocb->poll.file;
aio_complete(iocb, mangle_poll(mask), 0);
fput(file);
} | static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
aio_complete(iocb, mangle_poll(mask), 0);
} | static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
struct file *file = iocb->poll.file;
aio_complete(iocb, mangle_poll(mask), 0);
fput(file);
} | static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
aio_complete(iocb, mangle_poll(mask), 0);
} | static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
struct file *file = iocb->poll.file;
aio_complete(iocb, mangle_poll(mask), 0);
fput(file);
}
| static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
aio_complete(iocb, mangle_poll(mask), 0);
}
| static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
struct file *file = iocb->poll.file;
aio_complete(iocb, mangle_poll(mask), 0);
fput(file);
}
| static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
aio_complete(iocb, mangle_poll(mask), 0);
} | static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask) {
- struct file *file = iocb->poll.file;
aio_complete(iocb, mangle_poll(mask), 0);
- fput(file);
} |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_prep_rw | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_filp = fget(iocb->aio_fildes);
if (unlikely(!req->ki_filp)) {
return -EBADF;
}
req->ki_complete = aio_complete_rw;
req->private = NULL;
req->ki_pos = iocb->aio_offset;
req->ki_flags = iocb_flags... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_complete = aio_complete_rw;
req->private = NULL;
req->ki_pos = iocb->aio_offset;
req->ki_flags = iocb_flags(req->ki_filp);
if (iocb->aio_flags & IOCB_FLAG_RESFD) {
req->ki_flags |= IOCB_EVENTFD;
}
... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_filp = fget(iocb->aio_fildes);
if (unlikely(!req->ki_filp)) {
return -EBADF;
}
req->ki_complete = aio_complete_rw;
req->private = NULL;
req->ki_pos = iocb->aio_offset;
req->ki_flags = iocb_flags... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_complete = aio_complete_rw;
req->private = NULL;
req->ki_pos = iocb->aio_offset;
req->ki_flags = iocb_flags(req->ki_filp);
if (iocb->aio_flags & IOCB_FLAG_RESFD) {
req->ki_flags |= IOCB_EVENTFD;
}
... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_filp = fget(iocb->aio_fildes);
if (unlikely(!req->ki_filp)) {
return -EBADF;
}
req->ki_complete = aio_complete_rw;
req->ki_flags = iocb_flags(req->ki_filp);
if (iocb->aio_flags & IOCB_FLAG_RESFD) {
... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_complete = aio_complete_rw;
req->ki_flags = iocb_flags(req->ki_filp);
if (iocb->aio_flags & IOCB_FLAG_RESFD) {
req->ki_flags |= IOCB_EVENTFD;
}
req->ki_hint = ki_hint_validate(file_write_hint(req->ki_fi... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_filp = fget(iocb->aio_fildes);
if (unlikely(!req->ki_filp)) {
return -EBADF;
}
req->ki_complete = aio_complete_rw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
req->ki_flags = iocb_flags(req->ki_fi... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
req->ki_complete = aio_complete_rw;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
req->ki_flags = iocb_flags(req->ki_filp);
if (iocb->aio_flags & IOCB_FLAG_RESFD) {
req->ki_flags |= IOCB_EVENTFD;
}
req->ki_... | static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) {
int ret;
- req->ki_filp = fget(iocb->aio_fildes);
- if (unlikely(!req->ki_filp)) {
- return -EBADF;
- }
req->ki_complete = aio_complete_rw;
req->ki_flags = iocb_flags(req->ki_filp);
if (iocb->aio_flags & IOCB_FLAG_... |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_read | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req->... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req->... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req->... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req->... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
ret = aio_prep_rw(req, iocb);
file = req->ki_filp;
ret = -EBADF;
if (unlikely(!(file->f_mode & FMODE_READ))) {
goto out_fput;
}
... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
ret = aio_prep_rw(req, iocb);
file = req->ki_filp;
if (unlikely(!(file->f_mode & FMODE_READ))) {
return -EBADF;
}
ret = -EVAL;
... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = aio_prep_rw(req, iocb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
file = req->ki_filp... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = aio_prep_rw(req, iocb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
file = req->ki_filp... | static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
ret = aio_prep_rw(req, iocb);
file = req->ki_filp;
- ret = -EBADF;
if (unlikely(!(file->f_mode & FMODE_READ))) {
- goto out_fput;
... |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | aio_write | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req-... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req-... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req-... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
ret = aio_prep_rw(req, iocb);
if (ret) {
return ret;
}
file = req-... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
ret = aio_prep_rw(req, iocb);
file = req->ki_filp;
ret = -EBADF;
if (unlikely(!(file->f_mode & FMODE_WRITE))) {
goto out_fput;
}... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
ret = aio_prep_rw(req, iocb);
file = req->ki_filp;
if (unlikely(!(file->f_mode & FMODE_WRITE))) {
return -EBADF;
}
if (unlikely(... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = aio_prep_rw(req, iocb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
file = req->ki_fil... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = aio_prep_rw(req, iocb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
file = req->ki_fil... | static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) {
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
ret = aio_prep_rw(req, iocb);
file = req->ki_filp;
- ret = -EBADF;
if (unlikely(!(file->f_mode & FMODE_WRITE))) {
- goto out_fput... |
CVE-2019-10125 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/aio.c | iocb_put | static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
} | static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
if (iocb->ki_filp) {
fput(iocb->ki_filp);
}
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
} | static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
} | static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
if (iocb->ki_filp) {
fput(iocb->ki_filp);
}
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
} | static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
}
| static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
if (iocb->ki_filp) {
fput(iocb->ki_filp);
}
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
}
| static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
}
| static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
if (iocb->ki_filp) {
fput(iocb->ki_filp);
}
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}
} | static inline void iocb_put(struct aio_kiocb *iocb) {
if (refcount_read(&iocb->ki_refcnt) == 0 || refcount_dec_and_test(&iocb->ki_refcnt)) {
+ if (iocb->ki_filp) {
+ fput(iocb->ki_filp);
+ }
percpu_ref_put(&iocb->ki_ctx->reqs);
kmem_cache_free(kiocb_cachep, iocb);
}... |
CVE-2019-10142 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/virt/fsl_hypervisor.c | ioctl_memcpy | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
struct fsl_hv_ioctl_memcpy param;
struct page **pages = NULL;
void *sg_list_unaligned = NULL;
struct fh_sg_list *sg_list = NULL;
unsigned int num_pages;
unsigned long lb_offset;
unsigned int i;
long ret = 0;
int num_pinned;
... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
struct fsl_hv_ioctl_memcpy param;
struct page **pages = NULL;
void *sg_list_unaligned = NULL;
struct fh_sg_list *sg_list = NULL;
unsigned int num_pages;
unsigned long lb_offset;
unsigned int i;
long ret = 0;
int num_pinned;
... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
struct fsl_hv_ioctl_memcpy param;
struct page **pages = NULL;
void *sg_list_unaligned = NULL;
struct fh_sg_list *sg_list = NULL;
unsigned int num_pages;
unsigned long lb_offset;
unsigned int i;
long ret = 0;
int num_pinned;
... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
struct fsl_hv_ioctl_memcpy param;
struct page **pages = NULL;
void *sg_list_unaligned = NULL;
struct fh_sg_list *sg_list = NULL;
unsigned int num_pages;
unsigned long lb_offset;
unsigned int i;
long ret = 0;
int num_pinned;
... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
lb_offset = param.local_vaddr & (PAGE_SIZE - 1);
num_pages = (param.count + lb_offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
pages = kzalloc(num_pages * sizeof(struct page *), GFP_KERNEL);
if (!pages) {
return -ENOMEM;
}
sg_list_unaligne... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
lb_offset = param.local_vaddr & (PAGE_SIZE - 1);
if (param.count == 0 || param.count > U64_MAX - lb_offset - PAGE_SIZE + 1) {
return -EVAL;
}
num_pages = (param.count + lb_offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
pages = kzalloc(num_pag... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
lb_offset = param.local_vaddr & (PAGE_SIZE - 1);
num_pages = (param.count + lb_offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
pages = kzalloc(num_pages * sizeof(struct page *), GFP_KERNEL);
if (!pages) {
... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
lb_offset = param.local_vaddr & (PAGE_SIZE - 1);
if (param.count == 0 || param.count > U64_MAX - lb_offset - PAGE_SIZE + 1) {
return -EVAL;
}
num_pages = (param.count + lb_offset + PAGE_SI... | static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy *p) {
lb_offset = param.local_vaddr & (PAGE_SIZE - 1);
+ if (param.count == 0 || param.count > U64_MAX - lb_offset - PAGE_SIZE + 1) {
+ return -EVAL;
+ }
num_pages = (param.count + lb_offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
pages = kzalloc(... |
CVE-2019-10207 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/bluetooth/hci_ath.c | ath_open | static int ath_open(struct hci_uart *hu) {
struct ath_struct *ath;
BT_DBG("hu %p", hu);
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
if (!ath) {
return -ENOMEM;
}
skb_queue_head_init(&ath->txq);
hu->priv = ath;
ath->hu = hu;
IT_WORK(&ath->ctxtsw, ath_hci_uart_work);
return 0;... | static int ath_open(struct hci_uart *hu) {
struct ath_struct *ath;
BT_DBG("hu %p", hu);
if (!hci_uart_has_flow_control(hu)) {
return -EOPNOTSUPP;
}
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
if (!ath) {
return -ENOMEM;
}
skb_queue_head_init(&ath->txq);
hu->priv = ath;
... | static int ath_open(struct hci_uart *hu) {
struct ath_struct *ath;
BT_DBG("hu %p", hu);
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
if (!ath) {
return -ENOMEM;
}
skb_queue_head_init(&ath->txq);
hu->priv = ath;
ath->hu = hu;
IT_WORK(&ath->ctxtsw, ath_hci_uart_work);
return 0;... | static int ath_open(struct hci_uart *hu) {
struct ath_struct *ath;
BT_DBG("hu %p", hu);
if (!hci_uart_has_flow_control(hu)) {
return -EOPNOTSUPP;
}
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
if (!ath) {
return -ENOMEM;
}
skb_queue_head_init(&ath->txq);
hu->priv = ath;
... | static int ath_open(struct hci_uart *hu) {
BT_DBG("hu %p", hu);
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
ath->hu = hu;
}
| static int ath_open(struct hci_uart *hu) {
BT_DBG("hu %p", hu);
if (!hci_uart_has_flow_control(hu)) {
return -EOPNOTSUPP;
}
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
ath->hu = hu;
}
| static int ath_open(struct hci_uart *hu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("hu %p", hu);
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ath->hu = hu;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int ath_open(struct hci_uart *hu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("hu %p", hu);
if (!hci_uart_has_flow_control(hu)) {
return -EOPNOTSUPP;
}
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ath->hu = hu;
/* PLACEH... | static int ath_open(struct hci_uart *hu) {
BT_DBG("hu %p", hu);
+ if (!hci_uart_has_flow_control(hu)) {
+ return -EOPNOTSUPP;
+ }
ath = kzalloc(sizeof(*ath), GFP_KERNEL);
ath->hu = hu;
} |
CVE-2019-10638 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/route.c | __ip_select_ident | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
static u32 ip_idents_hashrnd __read_mostly;
u32 hash, id;
net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd));
hash = jhash_3words((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protocol ^ net_hash_mix(net), ip... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
u32 hash, id;
if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) {
get_random_bytes(&net->ipv4.ip_id_key, sizeof(net->ipv4.ip_id_key));
}
hash = siphash_3u32((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protoc... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
static u32 ip_idents_hashrnd __read_mostly;
u32 hash, id;
net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd));
hash = jhash_3words((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protocol ^ net_hash_mix(net), ip... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
u32 hash, id;
if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) {
get_random_bytes(&net->ipv4.ip_id_key, sizeof(net->ipv4.ip_id_key));
}
hash = siphash_3u32((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protoc... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
static u32 ip_idents_hashrnd __read_mostly;
u32 hash, id;
net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd));
hash = jhash_3words((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protocol ^ net_hash_mix(net), ip... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
u32 hash, id;
if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) {
get_random_bytes(&net->ipv4.ip_id_key, sizeof(net->ipv4.ip_id_key));
}
hash = siphash_3u32((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protoc... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
static u32 ip_idents_hashrnd __read_mostly;
u32 hash, id;
net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd));
hash = jhash_3words((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protocol ^ net_hash_mix(net), ip... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
u32 hash, id;
if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) {
get_random_bytes(&net->ipv4.ip_id_key, sizeof(net->ipv4.ip_id_key));
}
hash = siphash_3u32((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protoc... | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) {
- static u32 ip_idents_hashrnd __read_mostly;
u32 hash, id;
- net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd));
- hash = jhash_3words((__force u32)iph->daddr, (__force u32)iph->saddr, iph->protocol ^ net_hash_mix(net... |
CVE-2019-10638 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/output_core.c | __ipv6_select_ident | static u32 __ipv6_select_ident(struct net *net, u32 hashrnd, const struct in6_addr *dst, const struct in6_addr *src) {
u32 hash, id;
hash = __ipv6_addr_jhash(dst, hashrnd);
hash = __ipv6_addr_jhash(src, hash);
hash ^= net_hash_mix(net);
id = ip_idents_reserve(hash, 1);
if (unlikely(!id)) {
... | static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) {
const struct {
struct in6_addr dst;
struct in6_addr src;
} __aligned(SIPHASH_ALIGNMENT) combined = {
.dst = *dst, .src = *src,
};
u32 hash, id;
if (unlikely(siphash_key_i... | static u32 __ipv6_select_ident(struct net *net, u32 hashrnd, const struct in6_addr *dst, const struct in6_addr *src) {
u32 hash, id;
hash = __ipv6_addr_jhash(dst, hashrnd);
hash = __ipv6_addr_jhash(src, hash);
hash ^= net_hash_mix(net);
id = ip_idents_reserve(hash, 1);
if (unlikely(!id)) {
... | static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) {
const struct {
struct in6_addr dst;
struct in6_addr src;
} __aligned(SIPHASH_ALIGNMENT) combined = {
.dst = *dst, .src = *src,
};
u32 hash, id;
if (unlikely(siphash_key_i... | static u32 __ipv6_select_ident(struct net *net, u32 hashrnd, const struct in6_addr *dst, const struct in6_addr *src) {
u32 hash, id;
hash = __ipv6_addr_jhash(dst, hashrnd);
hash = __ipv6_addr_jhash(src, hash);
hash ^= net_hash_mix(net);
id = ip_idents_reserve(hash, 1);
return id;
}
| static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) {
const struct {
struct in6_addr dst;
struct in6_addr src;
} __aligned(SIPHASH_ALIGNMENT) combined = {
.dst = *dst, .src = *src,
};
u32 hash, id;
if (unlikely(siphash_key_i... | static u32 __ipv6_select_ident(struct net *net, u32 hashrnd, const struct in6_addr *dst, const struct in6_addr *src) {
u32 hash, id;
hash = __ipv6_addr_jhash(dst, hashrnd);
hash = __ipv6_addr_jhash(src, hash);
hash ^= net_hash_mix(net);
id = ip_idents_reserve(hash, 1);
/* PLACEHOLDER: DO NOT DEL... | static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) {
const struct {
struct in6_addr dst;
struct in6_addr src;
} __aligned(SIPHASH_ALIGNMENT) combined = {
.dst = *dst, .src = *src,
};
u32 hash, id;
if (unlikely(siphash_key_i... | -static u32 __ipv6_select_ident(struct net *net, u32 hashrnd, const struct in6_addr *dst, const struct in6_addr *src) {
+static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) {
+ const struct {
+ struct in6_addr dst;
+ struct in6_addr src;
+ } __alig... |
CVE-2019-10638 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/output_core.c | ipv6_proxy_select_ident | __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
static u32 ip6_proxy_idents_hashrnd __read_mostly;
struct in6_addr buf[2];
struct in6_addr *addrs;
u32 id;
addrs = skb_header_pointer(skb, skb_network_offset(skb) + offsetof(struct ipv6hdr, saddr), sizeof(buf), buf);
if (!add... | __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
struct in6_addr buf[2];
struct in6_addr *addrs;
u32 id;
addrs = skb_header_pointer(skb, skb_network_offset(skb) + offsetof(struct ipv6hdr, saddr), sizeof(buf), buf);
if (!addrs) {
return 0;
}
id = __ipv6_select_id... | void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
static u32 ip6_proxy_idents_hashrnd __read_mostly;
struct in6_addr buf[2];
struct in6_addr *addrs;
u32 id;
addrs = skb_header_pointer(skb, skb_network_offset(skb) + offsetof(struct ipv6hdr, saddr), sizeof(buf), buf);
if (!addrs... | void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
struct in6_addr buf[2];
struct in6_addr *addrs;
u32 id;
addrs = skb_header_pointer(skb, skb_network_offset(skb) + offsetof(struct ipv6hdr, saddr), sizeof(buf), buf);
if (!addrs) {
return;
}
id = __ipv6_select_ident(... | __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
static u32 ip6_proxy_idents_hashrnd __read_mostly;
struct in6_addr buf[2];
if (!addrs) {
return 0;
}
net_get_random_once(&ip6_proxy_idents_hashrnd, sizeof(ip6_proxy_idents_hashrnd));
id = __ipv6_select_ident(net, ip6_... | __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
struct in6_addr buf[2];
if (!addrs) {
return 0;
}
id = __ipv6_select_ident(net, &addrs[1], &addrs[0]);
return htonl(id);
}
| void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
static u32 ip6_proxy_idents_hashrnd __read_mostly;
struct in6_addr buf[2];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!addrs) {
return;
}
net_get_random_once(&ip6_proxy_idents_hashrnd, sizeof(ip6_proxy_idents_has... | void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
struct in6_addr buf[2];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!addrs) {
return;
}
id = __ipv6_select_ident(net, &addrs[1], &addrs[0]);
skb_shinfo(skb)->ip6_frag_id = htonl(id);
} | __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb) {
- static u32 ip6_proxy_idents_hashrnd __read_mostly;
struct in6_addr buf[2];
if (!addrs) {
return 0;
}
- net_get_random_once(&ip6_proxy_idents_hashrnd, sizeof(ip6_proxy_idents_hashrnd));
- id = __ipv6_select_ident(n... |
CVE-2019-10638 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/output_core.c | ipv6_select_ident | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
static u32 ip6_idents_hashrnd __read_mostly;
u32 id;
net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
id = __ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr);
return h... | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
u32 id;
id = __ipv6_select_ident(net, daddr, saddr);
return htonl(id);
} | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
static u32 ip6_idents_hashrnd __read_mostly;
u32 id;
net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
id = __ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr);
return h... | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
u32 id;
id = __ipv6_select_ident(net, daddr, saddr);
return htonl(id);
} | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
static u32 ip6_idents_hashrnd __read_mostly;
u32 id;
net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
id = __ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr);
return h... | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
u32 id;
id = __ipv6_select_ident(net, daddr, saddr);
return htonl(id);
}
| __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
static u32 ip6_idents_hashrnd __read_mostly;
u32 id;
net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
id = __ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr);
return h... | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
u32 id;
id = __ipv6_select_ident(net, daddr, saddr);
return htonl(id);
} | __be32 ipv6_select_ident(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr) {
- static u32 ip6_idents_hashrnd __read_mostly;
u32 id;
- net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
- id = __ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr);
+ id... |
CVE-2019-11085 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/i915/gvt/kvmgt.c | intel_vgpu_mmap | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
unsigned int index;
u64 virtaddr;
unsigned long req_size, pgoff = 0;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);
if (index... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
unsigned int index;
u64 virtaddr;
unsigned long req_size, pgoff, req_start;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);
if... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
unsigned int index;
u64 virtaddr;
unsigned long req_size, pgoff = 0;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);
if (index... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
unsigned int index;
u64 virtaddr;
unsigned long req_size, pgoff, req_start;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);
if... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
u64 virtaddr;
unsigned long req_size, pgoff = 0;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);
if (vma->vm_end < vma->vm_start) ... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
u64 virtaddr;
unsigned long req_size, pgoff, req_start;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);
if (vma->vm_end < vma->vm_... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 virtaddr;
unsigned long req_size, pgoff = 0;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - ... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 virtaddr;
unsigned long req_size, pgoff, req_start;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_S... | static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {
u64 virtaddr;
- unsigned long req_size, pgoff = 0;
+ unsigned long req_size, pgoff, req_start;
pgprot_t pg_prot;
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT... |
CVE-2019-11190 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/binfmt_elf.c | load_elf_binary | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retv... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retv... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retv... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retv... | static int load_elf_binary(struct linux_binprm *bprm) {
char * elf_interpreter = NULL;
int executable_stack = EXSTACK_DEFAULT;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
if (loc->elf_ex.e_phnum < 1 || loc->elf_ex.... | static int load_elf_binary(struct linux_binprm *bprm) {
char * elf_interpreter = NULL;
int executable_stack = EXSTACK_DEFAULT;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
if (loc->elf_ex.e_phnum < 1 || loc->elf_ex.... | static int load_elf_binary(struct linux_binprm *bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char * elf_interpreter = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int executable_stack = EXSTACK_DEFAULT;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
loc = kmalloc(sizeof(*loc), GFP... | static int load_elf_binary(struct linux_binprm *bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char * elf_interpreter = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int executable_stack = EXSTACK_DEFAULT;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
loc = kmalloc(sizeof(*loc), GFP... | static int load_elf_binary(struct linux_binprm *bprm) {
char * elf_interpreter = NULL;
int executable_stack = EXSTACK_DEFAULT;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
if (loc->elf_ex.e_phnum < 1 || loc... |
CVE-2019-11477 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp.c | tcp_init | void tcp_init(void) {
int max_rshare, max_wshare, cnt;
unsigned long limit;
unsigned int i;
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL);
percpu_counter_init(&tcp_orphan_count, 0, GFP_KERNEL);
inet_hash... | void tcp_init(void) {
int max_rshare, max_wshare, cnt;
unsigned long limit;
unsigned int i;
BUILD_BUG_ON(TCP_M_SND_MSS <= MAX_TCP_OPTION_SPACE);
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL);
percpu_coun... | void tcp_init(void) {
struct sk_buff *skb = NULL;
unsigned long limit;
int max_rshare, max_wshare, cnt;
unsigned int i;
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
percpu_counter_init(&tcp_sockets_allocated, 0);
percpu_counter_init(&tcp_orphan_count, 0);
tcp_hashinfo.bind_... | void tcp_init(void) {
struct sk_buff *skb = NULL;
unsigned long limit;
int max_rshare, max_wshare, cnt;
unsigned int i;
BUILD_BUG_ON(TCP_M_SND_MSS <= MAX_TCP_OPTION_SPACE);
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
percpu_counter_init(&tcp_sockets_allocated, 0);
percpu_c... | void tcp_init(void) {
unsigned int i;
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL);
}
| void tcp_init(void) {
unsigned int i;
BUILD_BUG_ON(TCP_M_SND_MSS <= MAX_TCP_OPTION_SPACE);
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL);
}
| void tcp_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int i;
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
percpu_counter_init(&tcp_sockets_allocated, 0);
percpu_counter_init(&tcp_orphan_count, 0);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void tcp_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int i;
BUILD_BUG_ON(TCP_M_SND_MSS <= MAX_TCP_OPTION_SPACE);
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
percpu_counter_init(&tcp_sockets_allocated, 0);
percpu_counter_init(&tcp_orphan_count, 0);
/* PL... | void tcp_init(void) {
unsigned int i;
+ BUILD_BUG_ON(TCP_M_SND_MSS <= MAX_TCP_OPTION_SPACE);
BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL);
} |
CVE-2019-11477 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_input.c | tcp_shifted_skb | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start_seq + shifted;
BUG_ON(!pcount);... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start_seq + shifted;
BUG_ON(!pcount);... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *prev = tcp_write_queue_prev(sk, skb);
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *prev = tcp_write_queue_prev(sk, skb);
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start_seq + shifted;
BUG_ON(!pcount);... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start_seq + shifted;
BUG_ON(!pcount);... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start_seq + s... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start_seq + s... | static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) {
struct tcp_sock *tp = tcp_sk(sk);
u32 start_seq = TCP_SKB_CB(skb)->seq;
u32 end_seq = start_seq + shifted;
BUG_ON(!pco... |
CVE-2019-11477 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_output.c | __tcp_mtu_to_mss | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
if (dst && dst... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
if (dst && dst... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
if (dst ... |
CVE-2019-11478 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_output.c | tcp_fragment | int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff;
int nsize, old_factor;
int nlen;
u8 flags;
if (WARN_ON(len > skb->len)) {
return -EVAL;
}
nsize = s... | int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff;
int nsize, old_factor;
int nlen;
u8 flags;
if (WARN_ON(len > skb->len)) {
return -EVAL;
}
nsize = s... | int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff;
int nsize, old_factor;
int nlen;
u8 flags;
if (WARN_ON(len > skb->len)) {
return -EVAL;
}
nsize = skb_headlen(skb) - len;
... | int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff;
int nsize, old_factor;
int nlen;
u8 flags;
if (WARN_ON(len > skb->len)) {
return -EVAL;
}
nsize = skb_headlen(skb) - len;
... | int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
if (nsize < 0) {
nsize = 0;
}
if (skb_unclone(skb, gfp)) {
return -ENOMEM;
}
buff = sk_stream_alloc_skb(sk, nsize, gfp, t... | int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
if (nsize < 0) {
nsize = 0;
}
if (unlikely((sk->sk_wmem_queued >> 1) > sk->sk_sndbuf)) {
NET_C_STATS(sock_net(sk), LUX_MIB_TCPWQU... | int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nsize < 0) {
nsize = 0;
}
if (skb_unclone(skb, gfp)) {
return -ENOMEM;
}
buff = sk_stream_all... | int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nsize < 0) {
nsize = 0;
}
if (unlikely((sk->sk_wmem_queued >> 1) > sk->sk_sndbuf)) {
NET_C_STATS(sock... | int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, struct sk_buff *skb, u32 len, unsigned int mss_now, gfp_t gfp) {
struct tcp_sock *tp = tcp_sk(sk);
if (nsize < 0) {
nsize = 0;
+ }
+ if (unlikely((sk->sk_wmem_queued >> 1) > sk->sk_sndbuf)) {
+ NET_C_STATS(sock_net(sk), LUX_MIB... |
CVE-2019-11479 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_output.c | __tcp_mtu_to_mss | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
const struct d... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
const struct d... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_... | static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu) {
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
mss_now = pmtu - icsk->icsk_af_ops->net_header_len - sizeof(struct tcphdr);
if (icsk->icsk_af_ops->net_frag_header_len) {
const st... |
CVE-2019-11487 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/fuse/dev.c | fuse_dev_splice_write | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
unsigned nbuf;
unsigned idx;
struct pipe_buffer *bufs;
struct fuse_copy_state cs;
struct fuse_dev *fud;
size_t rem;
ssize_t ret;
fud = fuse_get_dev(out);
... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
unsigned nbuf;
unsigned idx;
struct pipe_buffer *bufs;
struct fuse_copy_state cs;
struct fuse_dev *fud;
size_t rem;
ssize_t ret;
fud = fuse_get_dev(out);
... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
unsigned nbuf;
unsigned idx;
struct pipe_buffer *bufs;
struct fuse_copy_state cs;
struct fuse_dev *fud;
size_t rem;
ssize_t ret;
fud = fuse_get_dev(out);
... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
unsigned nbuf;
unsigned idx;
struct pipe_buffer *bufs;
struct fuse_copy_state cs;
struct fuse_dev *fud;
size_t rem;
ssize_t ret;
fud = fuse_get_dev(out);
... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
pipe_lock(pipe);
if (rem < len) {
pipe_unlock(pipe);
goto out;
}
while (rem) {
struct pipe_buffer *ibuf;
struct pipe_buffer *obuf;
... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
pipe_lock(pipe);
if (rem < len) {
goto out_free;
}
while (rem) {
struct pipe_buffer *ibuf;
struct pipe_buffer *obuf;
BUG_ON(nbuf >= pipe->b... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pipe_lock(pipe);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (rem < len) {
pipe_unlock(pipe);
goto out;
... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pipe_lock(pipe);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (rem < len) {
goto out_free;
}
/* PLACEHOLD... | static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
pipe_lock(pipe);
if (rem < len) {
- pipe_unlock(pipe);
- goto out;
+ goto out_free;
}
while (rem) {
struct pipe_buffer *ibuf;
s... |
CVE-2019-11487 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/pipe.c | generic_pipe_buf_get | void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
get_page(buf->page);
} | bool generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
return try_get_page(buf->page);
} | void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
page_cache_get(buf->page);
} | bool generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
return try_get_page(buf->page);
} | void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
get_page(buf->page);
}
| bool generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
return try_get_page(buf->page);
}
| void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
page_cache_get(buf->page);
}
| bool generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
return try_get_page(buf->page);
} | -void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
- get_page(buf->page);
+bool generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
+ return try_get_page(buf->page);
} |
CVE-2019-11487 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/splice.c | link_pipe | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
if (!... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
if (!... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
if (!... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
if (!... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
if (!ret) {
ret = -EPIPE;
... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
if (!ret) {
ret = -EPIPE;
... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
... | static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
int ret = 0, i = 0, nbuf;
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current, 0);
if (!ret) {
ret = ... |
CVE-2019-11487 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/splice.c | splice_pipe_to_pipe | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, nbuf;
bool input_wakeup = false;
retry:
ret = ipipe_prep(ipipe, flags);
if (ret) {
return ret;
}
ret = opipe_pr... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, nbuf;
bool input_wakeup = false;
retry:
ret = ipipe_prep(ipipe, flags);
if (ret) {
return ret;
}
ret = opipe_pr... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, nbuf;
bool input_wakeup = false;
retry:
ret = ipipe_prep(ipipe, flags);
if (ret) {
return ret;
}
ret = opipe_pr... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
struct pipe_buffer *ibuf, *obuf;
int ret = 0, nbuf;
bool input_wakeup = false;
retry:
ret = ipipe_prep(ipipe, flags);
if (ret) {
return ret;
}
ret = opipe_pr... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
retry:
ret = ipipe_prep(ipipe, flags);
ret = opipe_prep(opipe, flags);
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current,... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
retry:
ret = ipipe_prep(ipipe, flags);
ret = opipe_prep(opipe, flags);
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, current,... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retry:
ret = ipipe_prep(ipipe, flags);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = opipe_prep(opipe, flags);
/* PLACEHO... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retry:
ret = ipipe_prep(ipipe, flags);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = opipe_prep(opipe, flags);
/* PLACEHO... | static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) {
retry:
ret = ipipe_prep(ipipe, flags);
ret = opipe_prep(opipe, flags);
pipe_double_lock(ipipe, opipe);
do {
if (!opipe->readers) {
send_sig(SIGPIPE, ... |
CVE-2019-11487 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/trace/trace.c | buffer_pipe_buf_get | static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
refcount_inc(&ref->refcount);
} | static bool buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
if (refcount_read(&ref->refcount) > T_MAX/2) {
return false;
}
refcount_inc(&ref->refcount);
return true;
} | static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
ref->ref++;
} | static bool buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
if (ref->ref > T_MAX/2) {
return false;
}
ref->ref++;
return true;
} | static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
refcount_inc(&ref->refcount);
}
| static bool buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
if (refcount_read(&ref->refcount) > T_MAX/2) {
return false;
}
refcount_inc(&ref->refcount);
return true;
}
| static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
ref->ref++;
}
| static bool buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
if (ref->ref > T_MAX/2) {
return false;
}
ref->ref++;
return true;
} | -static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
+static bool buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) {
struct buffer_ref *ref = (struct buffer_ref *)buf->private;
+ if (refcount_read(&ref->refcount) > T_MAX/2) {
+ return false;
... |
CVE-2019-11683 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/udp_offload.c | udp_gro_receive_segment | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
struct sk_buff *pp = NULL;
struct udphdr *uh2;
struct sk_buff *p;
if (!uh->check) {
NAPI_GRO_CB(skb)->flush = 1;
return NULL;
}
skb_gro_pull(skb, si... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
struct sk_buff *pp = NULL;
struct udphdr *uh2;
struct sk_buff *p;
unsigned int ulen;
if (!uh->check) {
NAPI_GRO_CB(skb)->flush = 1;
return NULL;
}
... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
struct sk_buff *pp = NULL;
struct udphdr *uh2;
struct sk_buff *p;
if (!uh->check) {
NAPI_GRO_CB(skb)->flush = 1;
return NULL;
}
skb_gro_pull(skb, si... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
struct sk_buff *pp = NULL;
struct udphdr *uh2;
struct sk_buff *p;
unsigned int ulen;
if (!uh->check) {
NAPI_GRO_CB(skb)->flush = 1;
return NULL;
}
... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
struct sk_buff *p;
if (!uh->check) {
return NULL;
}
skb_gro_pull(skb, sizeof(struct udphdr));
skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr));
list_f... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
struct sk_buff *p;
unsigned int ulen;
if (!uh->check) {
return NULL;
}
ulen = ntohs(uh->len);
if (ulen <= sizeof(*uh) || ulen != skb_gro_len(skb)) {
... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sk_buff *p;
if (!uh->check) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return NULL;
}
skb_gro_pull... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sk_buff *p;
unsigned int ulen;
if (!uh->check) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
/* PLACEHOLD... | static struct sk_buff *udp_gro_receive_segment(struct list_head *head, struct sk_buff *skb) {
struct udphdr *uh = udp_hdr(skb);
struct sk_buff *p;
+ unsigned int ulen;
if (!uh->check) {
+ return NULL;
+ }
+ ulen = ntohs(uh->len);
+ if (ulen <= sizeof(*uh) || ulen != skb_gro_len(skb)) ... |
CVE-2019-11810 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/megaraid/megaraid_sas_base.c | megasas_alloc_cmds | int megasas_alloc_cmds(struct megasas_instance *instance) {
int i;
int j;
u32 max_cmd;
struct megasas_cmd *cmd;
struct fusion_context *fusion;
fusion = instance->ctrl_context;
max_cmd = instance->max_mfi_cmds;
instance->cmd_list = kcalloc(max_cmd, sizeof(struct megasas_cmd*), GFP_KERNEL)... | int megasas_alloc_cmds(struct megasas_instance *instance) {
int i;
int j;
u32 max_cmd;
struct megasas_cmd *cmd;
struct fusion_context *fusion;
fusion = instance->ctrl_context;
max_cmd = instance->max_mfi_cmds;
instance->cmd_list = kcalloc(max_cmd, sizeof(struct megasas_cmd*), GFP_KERNEL)... | int megasas_alloc_cmds(struct megasas_instance *instance) {
int i;
int j;
u32 max_cmd;
struct megasas_cmd *cmd;
max_cmd = instance->max_mfi_cmds;
instance->cmd_list = kcalloc(max_cmd, sizeof(struct megasas_cmd*), GFP_KERNEL);
if (!instance->cmd_list) {
printk(KERN_DEBUG "megasas: out... | int megasas_alloc_cmds(struct megasas_instance *instance) {
int i;
int j;
u32 max_cmd;
struct megasas_cmd *cmd;
max_cmd = instance->max_mfi_cmds;
instance->cmd_list = kcalloc(max_cmd, sizeof(struct megasas_cmd*), GFP_KERNEL);
if (!instance->cmd_list) {
printk(KERN_DEBUG "megasas: out... | int megasas_alloc_cmds(struct megasas_instance *instance) {
if (megasas_create_frame_pool(instance)) {
megasas_free_cmds(instance);
}
}
| int megasas_alloc_cmds(struct megasas_instance *instance) {
if (megasas_create_frame_pool(instance)) {
megasas_free_cmds(instance);
return -ENOMEM;
}
}
| int megasas_alloc_cmds(struct megasas_instance *instance) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (megasas_create_frame_pool(instance)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
megasas_free_cmds(instance);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int megasas_alloc_cmds(struct megasas_instance *instance) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (megasas_create_frame_pool(instance)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
megasas_free_cmds(instance);
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | int megasas_alloc_cmds(struct megasas_instance *instance) {
if (megasas_create_frame_pool(instance)) {
megasas_free_cmds(instance);
+ return -ENOMEM;
}
} |
CVE-2019-11811 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/ipmi/ipmi_si_intf.c | try_smi_init | static int try_smi_init(struct smi_info *new_smi) {
int rv = 0;
int i;
char *init_name = NULL;
pr_info(PFX "Trying %s-specified %s state machine at %s address 0x%lx, slave address 0x%x, irq %d\n", ipmi_addr_src_to_str(new_smi->io.addr_source), si_to_str[new_smi->io.si_type],
addr_space_to_st... | static int try_smi_init(struct smi_info *new_smi) {
int rv = 0;
int i;
char *init_name = NULL;
pr_info(PFX "Trying %s-specified %s state machine at %s address 0x%lx, slave address 0x%x, irq %d\n", ipmi_addr_src_to_str(new_smi->io.addr_source), si_to_str[new_smi->io.si_type],
addr_space_to_st... | static int try_smi_init(struct smi_info *new_smi) {
int rv = 0;
int i;
char *init_name = NULL;
pr_info("Trying %s-specified %s state machine at %s address 0x%lx, slave address 0x%x, irq %d\n", ipmi_addr_src_to_str(new_smi->io.addr_source), si_to_str[new_smi->io.si_type],
addr_space_to_str[ne... | static int try_smi_init(struct smi_info *new_smi) {
int rv = 0;
int i;
char *init_name = NULL;
pr_info("Trying %s-specified %s state machine at %s address 0x%lx, slave address 0x%x, irq %d\n", ipmi_addr_src_to_str(new_smi->io.addr_source), si_to_str[new_smi->io.si_type],
addr_space_to_str[ne... | static int try_smi_init(struct smi_info *new_smi) {
switch (new_smi->io.si_type) {
default:
rv = -EIO;
goto out_err;
}
new_smi->si_num = smi_num;
if (!new_smi->io.dev) {
init_name = kasprintf(GFP_KERNEL, "ipmi_si.%d", new_smi->si_num);
new_smi->pdev = platform_device_... | static int try_smi_init(struct smi_info *new_smi) {
switch (new_smi->io.si_type) {
default:
rv = -EIO;
goto out_err;
}
new_smi->si_num = smi_num;
if (!new_smi->io.dev) {
init_name = kasprintf(GFP_KERNEL, "ipmi_si.%d", new_smi->si_num);
new_smi->pdev = platform_device_... | static int try_smi_init(struct smi_info *new_smi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (new_smi->io.si_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
default:
rv = -EIO;
goto out_err;
}
new_smi->si_num = smi_num;
if (!new_smi->io.dev) {
init_n... | static int try_smi_init(struct smi_info *new_smi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (new_smi->io.si_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
default:
rv = -EIO;
goto out_err;
}
new_smi->si_num = smi_num;
if (!new_smi->io.dev) {
init_n... | static int try_smi_init(struct smi_info *new_smi) {
switch (new_smi->io.si_type) {
default:
rv = -EIO;
goto out_err;
}
new_smi->si_num = smi_num;
if (!new_smi->io.dev) {
init_name = kasprintf(GFP_KERNEL, "ipmi_si.%d", new_smi->si_num);
new_smi->pdev = platfo... |
CVE-2019-11811 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/ipmi/ipmi_si_mem_io.c | ipmi_si_mem_setup | int ipmi_si_mem_setup(struct si_sm_io *io) {
unsigned long addr = io->addr_data;
int mapsize, idx;
if (!addr) {
return -ENODEV;
}
io->io_cleanup = mem_cleanup;
switch (io->regsize) {
case 1:
io->inputb = intf_mem_inb;
io->outputb = intf_mem_outb;
break;
ca... | int ipmi_si_mem_setup(struct si_sm_io *io) {
unsigned long addr = io->addr_data;
int mapsize, idx;
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
case 1:
io->inputb = intf_mem_inb;
io->outputb = intf_mem_outb;
break;
case 2:
io->inputb = intf_me... | int ipmi_si_mem_setup(struct si_sm_io *io) {
unsigned long addr = io->addr_data;
int mapsize, idx;
if (!addr) {
return -ENODEV;
}
io->io_cleanup = mem_cleanup;
switch (io->regsize) {
case 1:
io->inputb = intf_mem_inb;
io->outputb = intf_mem_outb;
break;
ca... | int ipmi_si_mem_setup(struct si_sm_io *io) {
unsigned long addr = io->addr_data;
int mapsize, idx;
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
case 1:
io->inputb = intf_mem_inb;
io->outputb = intf_mem_outb;
break;
case 2:
io->inputb = intf_me... | int ipmi_si_mem_setup(struct si_sm_io *io) {
if (!addr) {
return -ENODEV;
}
io->io_cleanup = mem_cleanup;
switch (io->regsize) {
}
for (idx = 0; idx < io->io_size; idx++) {
if (request_mem_region(addr + idx * io->regspacing, io->regsize, DEVICE_NAME) == NULL) {
mem_re... | int ipmi_si_mem_setup(struct si_sm_io *io) {
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
}
for (idx = 0; idx < io->io_size; idx++) {
if (request_mem_region(addr + idx * io->regspacing, io->regsize, DEVICE_NAME) == NULL) {
mem_region_cleanup(io, idx);
... | int ipmi_si_mem_setup(struct si_sm_io *io) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!addr) {
return -ENODEV;
}
io->io_cleanup = mem_cleanup;
switch (io->regsize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
for (idx = 0; idx < io->io_size; idx++) {
if (req... | int ipmi_si_mem_setup(struct si_sm_io *io) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
for (idx = 0; idx < io->io_size; idx++) {
if (request_mem_region(addr + idx * io->r... | int ipmi_si_mem_setup(struct si_sm_io *io) {
if (!addr) {
return -ENODEV;
}
- io->io_cleanup = mem_cleanup;
switch (io->regsize) {
}
for (idx = 0; idx < io->io_size; idx++) {
if (request_mem_region(addr + idx * io->regspacing, io->regsize, DEVICE_NAME) == NULL) {
... |
CVE-2019-11811 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/ipmi/ipmi_si_port_io.c | ipmi_si_port_setup | int ipmi_si_port_setup(struct si_sm_io *io) {
unsigned int addr = io->addr_data;
int idx;
if (!addr) {
return -ENODEV;
}
io->io_cleanup = port_cleanup;
switch (io->regsize) {
case 1:
io->inputb = port_inb;
io->outputb = port_outb;
break;
case 2:
io... | int ipmi_si_port_setup(struct si_sm_io *io) {
unsigned int addr = io->addr_data;
int idx;
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
case 1:
io->inputb = port_inb;
io->outputb = port_outb;
break;
case 2:
io->inputb = port_inw;
io->ou... | int ipmi_si_port_setup(struct si_sm_io *io) {
unsigned int addr = io->addr_data;
int idx;
if (!addr) {
return -ENODEV;
}
io->io_cleanup = port_cleanup;
switch (io->regsize) {
case 1:
io->inputb = port_inb;
io->outputb = port_outb;
break;
case 2:
io... | int ipmi_si_port_setup(struct si_sm_io *io) {
unsigned int addr = io->addr_data;
int idx;
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
case 1:
io->inputb = port_inb;
io->outputb = port_outb;
break;
case 2:
io->inputb = port_inw;
io->ou... | int ipmi_si_port_setup(struct si_sm_io *io) {
if (!addr) {
return -ENODEV;
}
io->io_cleanup = port_cleanup;
switch (io->regsize) {
}
for (idx = 0; idx < io->io_size; idx++) {
}
return 0;
}
| int ipmi_si_port_setup(struct si_sm_io *io) {
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
}
for (idx = 0; idx < io->io_size; idx++) {
}
io->io_cleanup = port_cleanup;
return 0;
}
| int ipmi_si_port_setup(struct si_sm_io *io) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!addr) {
return -ENODEV;
}
io->io_cleanup = port_cleanup;
switch (io->regsize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
for (idx = 0; idx < io->io_size; idx++) {
/* PLACEH... | int ipmi_si_port_setup(struct si_sm_io *io) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!addr) {
return -ENODEV;
}
switch (io->regsize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
for (idx = 0; idx < io->io_size; idx++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT *... | int ipmi_si_port_setup(struct si_sm_io *io) {
if (!addr) {
return -ENODEV;
}
- io->io_cleanup = port_cleanup;
switch (io->regsize) {
}
for (idx = 0; idx < io->io_size; idx++) {
}
+ io->io_cleanup = port_cleanup;
return 0;
} |
CVE-2019-11815 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/rds/tcp.c | rds_tcp_kill_sock | static void rds_tcp_kill_sock(struct net *net) {
struct rds_tcp_connection *tc, *_tc;
LIST_HEAD(tmp_list);
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
struct socket *lsock = rtn->rds_tcp_listen_sock;
rtn->rds_tcp_listen_sock = NULL;
rds_tcp_listen_stop(lsock, &rtn->rds_tcp_accept_... | static void rds_tcp_kill_sock(struct net *net) {
struct rds_tcp_connection *tc, *_tc;
LIST_HEAD(tmp_list);
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
struct socket *lsock = rtn->rds_tcp_listen_sock;
rtn->rds_tcp_listen_sock = NULL;
rds_tcp_listen_stop(lsock, &rtn->rds_tcp_accept_... | static void rds_tcp_kill_sock(struct net *net) {
struct rds_tcp_connection *tc, *_tc;
struct sock *sk;
LIST_HEAD(tmp_list);
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
rds_tcp_listen_stop(rtn->rds_tcp_listen_sock);
rtn->rds_tcp_listen_sock = NULL;
flush_work(&rtn->rds_tcp_acce... | static void rds_tcp_kill_sock(struct net *net) {
struct rds_tcp_connection *tc, *_tc;
struct sock *sk;
LIST_HEAD(tmp_list);
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
rds_tcp_listen_stop(rtn->rds_tcp_listen_sock);
rtn->rds_tcp_listen_sock = NULL;
flush_work(&rtn->rds_tcp_acce... | static void rds_tcp_kill_sock(struct net *net) {
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
list_for_each_entry_safe(tc, _tc, &rds_tcp_conn_list, t_tcp_node) {
struct net *c_net = read_pnet(&tc->t_cpath->cp_conn->c_net);
if (net != c_net || !tc->t_sock) {
continue;
... | static void rds_tcp_kill_sock(struct net *net) {
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
list_for_each_entry_safe(tc, _tc, &rds_tcp_conn_list, t_tcp_node) {
struct net *c_net = read_pnet(&tc->t_cpath->cp_conn->c_net);
if (net != c_net) {
continue;
}
... | static void rds_tcp_kill_sock(struct net *net) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe(tc, _tc, &rds_tcp_conn_list, t_tcp_node) {
struct net *c_net = read_pne... | static void rds_tcp_kill_sock(struct net *net) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe(tc, _tc, &rds_tcp_conn_list, t_tcp_node) {
struct net *c_net = read_pne... | static void rds_tcp_kill_sock(struct net *net) {
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
list_for_each_entry_safe(tc, _tc, &rds_tcp_conn_list, t_tcp_node) {
struct net *c_net = read_pnet(&tc->t_cpath->cp_conn->c_net);
- if (net != c_net || !tc->t_sock) {
+ if (net !=... |
CVE-2019-11833 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ext4/extents.c | ext4_ext_grow_indepth | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags) {
struct ext4_extent_header *neh;
struct buffer_head *bh;
ext4_fsblk_t newblock, goal = 0;
struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
int err = 0;
if (ext_depth(inode)) {
goal = ext... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags) {
struct ext4_extent_header *neh;
struct buffer_head *bh;
ext4_fsblk_t newblock, goal = 0;
struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
int err = 0;
size_t ext_size = 0;
if (ext_depth(ino... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_extent *newext) {
struct ext4_extent_header *neh;
struct buffer_head *bh;
ext4_fsblk_t newblock;
int err = 0;
newblock = ext4_ext_new_meta_block(handle, inode, NULL, newext, &err, flags);
if (... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_extent *newext) {
struct ext4_extent_header *neh;
struct buffer_head *bh;
ext4_fsblk_t newblock;
int err = 0;
size_t ext_size = 0;
newblock = ext4_ext_new_meta_block(handle, inode, NULL, newex... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags) {
ext4_fsblk_t newblock, goal = 0;
struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
int err = 0;
if (ext_depth(inode)) {
goal = ext4_idx_pblock(EXT_FIRST_DEX(ext_inode_hdr(inode)));
}
if ... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags) {
ext4_fsblk_t newblock, goal = 0;
struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
int err = 0;
size_t ext_size = 0;
if (ext_depth(inode)) {
goal = ext4_idx_pblock(EXT_FIRST_DEX(ext_inode_hd... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_extent *newext) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ext4_fsblk_t newblock;
int err = 0;
newblock = ext4_ext_new_meta_block(handle, inode, NULL, newext, &err, flags);
if (newblock == 0)... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_extent *newext) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ext4_fsblk_t newblock;
int err = 0;
size_t ext_size = 0;
newblock = ext4_ext_new_meta_block(handle, inode, NULL, newext, &err, flags... | static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags) {
ext4_fsblk_t newblock, goal = 0;
struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
int err = 0;
+ size_t ext_size = 0;
if (ext_depth(inode)) {
goal = ext4_idx_pblock(EXT_FIRST_DEX(ext_i... |
CVE-2019-11833 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ext4/extents.c | ext4_ext_split | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
struct buffer_head *bh = NULL;
int depth = ext_depth(inode);
struct ext4_extent_header *neh;
struct ext4_extent_idx *fidx;
int i = at, k, m, a;
e... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
struct buffer_head *bh = NULL;
int depth = ext_depth(inode);
struct ext4_extent_header *neh;
struct ext4_extent_idx *fidx;
int i = at, k, m, a;
e... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
struct buffer_head *bh = NULL;
int depth = ext_depth(inode);
struct ext4_extent_header *neh;
struct ext4_extent_idx *fidx;
int i = at, k, m, a;
e... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
struct buffer_head *bh = NULL;
int depth = ext_depth(inode);
struct ext4_extent_header *neh;
struct ext4_extent_idx *fidx;
int i = at, k, m, a;
e... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
int depth = ext_depth(inode);
int err = 0;
if (unlikely(path[depth].p_ext > EXT_MAX_EXTENT(path[depth].p_hdr))) {
return -EFSCORRUPTED;
}
abl... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
int depth = ext_depth(inode);
int err = 0;
size_t ext_size = 0;
if (unlikely(path[depth].p_ext > EXT_MAX_EXTENT(path[depth].p_hdr))) {
return -EF... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int depth = ext_depth(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
if (unlikely(p... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int depth = ext_depth(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
size_t ext_siz... | static int ext4_ext_split(handle_t *handle, struct inode *inode, unsigned int flags, struct ext4_ext_path *path, struct ext4_extent *newext, int at) {
int depth = ext_depth(inode);
int err = 0;
+ size_t ext_size = 0;
if (unlikely(path[depth].p_ext > EXT_MAX_EXTENT(path[depth].p_hdr))) {
retu... |
CVE-2019-11884 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/hidp/sock.c | hidp_sock_ioctl | static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *) arg;
struct hidp_connadd_req ca;
struct hidp_conndel_req cd;
struct hidp_connlist_req cl;
struct hidp_conninfo ci;
struct socket *csock;
struct socket *isock;
int err;
BT_DBG(... | static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *) arg;
struct hidp_connadd_req ca;
struct hidp_conndel_req cd;
struct hidp_connlist_req cl;
struct hidp_conninfo ci;
struct socket *csock;
struct socket *isock;
int err;
BT_DBG(... | static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *) arg;
struct hidp_connadd_req ca;
struct hidp_conndel_req cd;
struct hidp_connlist_req cl;
struct hidp_conninfo ci;
struct socket *csock;
struct socket *isock;
int err;
BT_DBG(... | static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *) arg;
struct hidp_connadd_req ca;
struct hidp_conndel_req cd;
struct hidp_connlist_req cl;
struct hidp_conninfo ci;
struct socket *csock;
struct socket *isock;
int err;
BT_DBG(... | static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
switch (cmd) {
case HIDPCONNADD:
if (!isock) {
return err;
}
err = hidp_connection_add(&ca, csock, isock);
return err;
}
}
| static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
switch (cmd) {
case HIDPCONNADD:
if (!isock) {
return err;
}
ca.name[sizeof(ca.name)-1] = 0;
err = hidp_connection_add(&ca, csock, isock);
return err;
}
}
| static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
case HIDPCONNADD:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!isock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return e... | static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
case HIDPCONNADD:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!isock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return e... | static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
switch (cmd) {
case HIDPCONNADD:
if (!isock) {
return err;
}
+ ca.name[sizeof(ca.name)-1] = 0;
err = hidp_connection_add(&ca, csock, isock);
return err;
}
} |
CVE-2019-12382 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/drm_edid_load.c | drm_load_edid_firmware | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
const char *connector_name = connector->name;
char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
struct edid *edid;
if (edid_firmware[0] == '\0') {
return ERR_PTR(-ENOENT);
}
fwstr = kstrdup(edid_firmw... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
const char *connector_name = connector->name;
char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
struct edid *edid;
if (edid_firmware[0] == '\0') {
return ERR_PTR(-ENOENT);
}
fwstr = kstrdup(edid_firmw... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
const char *connector_name = connector->name;
char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
struct edid *edid;
if (edid_firmware[0] == '\0') {
return ERR_PTR(-ENOENT);
}
fwstr = kstrdup(edid_firmw... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
const char *connector_name = connector->name;
char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL;
struct edid *edid;
if (edid_firmware[0] == '\0') {
return ERR_PTR(-ENOENT);
}
fwstr = kstrdup(edid_firmw... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
fwstr = kstrdup(edid_firmware, GFP_KERNEL);
edidstr = fwstr;
while ((edidname = strsep(&edidstr, ","))) {
colon = strchr(edidname, ':');
if (colon != NULL) {
if (strncmp(connector_name, edidname, colon - edidn... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
fwstr = kstrdup(edid_firmware, GFP_KERNEL);
if (!fwstr) {
return ERR_PTR(-ENOMEM);
}
edidstr = fwstr;
while ((edidname = strsep(&edidstr, ","))) {
colon = strchr(edidname, ':');
if (colon != NULL) {
... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fwstr = kstrdup(edid_firmware, GFP_KERNEL);
edidstr = fwstr;
while ((edidname = strsep(&edidstr, ","))) {
colon = strchr(edidname, ':');
if (colon != NULL) {
i... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fwstr = kstrdup(edid_firmware, GFP_KERNEL);
if (!fwstr) {
return ERR_PTR(-ENOMEM);
}
edidstr = fwstr;
while ((edidname = strsep(&edidstr, ","))) {
colon = strchr(e... | struct edid *drm_load_edid_firmware(struct drm_connector *connector) {
fwstr = kstrdup(edid_firmware, GFP_KERNEL);
+ if (!fwstr) {
+ return ERR_PTR(-ENOMEM);
+ }
edidstr = fwstr;
while ((edidname = strsep(&edidstr, ","))) {
colon = strchr(edidname, ':');
if (colon != NULL)... |
CVE-2019-12614 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/powerpc/platforms/pseries/dlpar.c | dlpar_parse_cc_property | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
struct property *prop;
char *name;
char *value;
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
struct property *prop;
char *name;
char *value;
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
struct property *prop;
char *name;
char *value;
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
struct property *prop;
char *name;
char *value;
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_KERNEL);
prop->length = be32_to_cpu(ccwa->prop_length);
... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_KERNEL);
if (!prop->name) {
dlpar_free_cc_proper... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_KERNEL);
... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_KERNEL);
... | static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) {
prop = kzalloc(sizeof(*prop), GFP_KERNEL);
if (!prop) {
return NULL;
}
name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
prop->name = kstrdup(name, GFP_KERNEL);
+ if (!prop->name) {
+ dlpar_free_... |
CVE-2019-12615 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/sparc/kernel/mdesc.c | get_vdev_port_node_info | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
const u64 *parent_cfg_hdlp;
const char *name;
const u64 *idp;
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_han... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
const u64 *parent_cfg_hdlp;
const char *name;
const u64 *idp;
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_han... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
const u64 *parent_cfg_hdlp;
const char *name;
const u64 *idp;
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_han... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
const u64 *parent_cfg_hdlp;
const char *name;
const u64 *idp;
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_han... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_handle(md, node);
if (!idp || !name || !parent_cfg_hdlp) {
return... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_handle(md, node);
if (!idp || !name || !parent_cfg_hdlp) {
return... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_handle(md, node);
if (!... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_handle(md, node);
if (!... | static int get_vdev_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) {
idp = mdesc_get_property(md, node, "id", NULL);
name = mdesc_get_property(md, node, "name", NULL);
parent_cfg_hdlp = parent_cfg_handle(md, node);
if (!idp || !name || !parent_cfg_hdlp) {
... |
CVE-2019-12817 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/powerpc/mm/mmu_context_book3s64.c | hash_new_context | static int hash_new_context(struct mm_struct *mm) {
int index;
index = hash__alloc_context_id();
if (index < 0) {
return index;
}
if (mm->context.id == 0) {
slice_init_new_context_exec(mm);
}
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
} | static int hash_new_context(struct mm_struct *mm) {
int index;
if (mm->context.id == 0) {
slice_init_new_context_exec(mm);
}
index = realloc_context_ids(&mm->context);
if (index < 0) {
return index;
}
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
... | static int hash_new_context(struct mm_struct *mm) {
int index;
index = hash__alloc_context_id();
if (index < 0) {
return index;
}
if (mm->context.id == 0) {
slice_init_new_context_exec(mm);
}
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
} | static int hash_new_context(struct mm_struct *mm) {
int index;
if (mm->context.id == 0) {
slice_init_new_context_exec(mm);
}
index = realloc_context_ids(&mm->context);
if (index < 0) {
return index;
}
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
... | static int hash_new_context(struct mm_struct *mm) {
int index;
index = hash__alloc_context_id();
if (index < 0) {
return index;
}
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
}
| static int hash_new_context(struct mm_struct *mm) {
int index;
if (mm->context.id == 0) {
slice_init_new_context_exec(mm);
}
index = realloc_context_ids(&mm->context);
if (index < 0) {
return index;
}
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
... | static int hash_new_context(struct mm_struct *mm) {
int index;
index = hash__alloc_context_id();
if (index < 0) {
return index;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
}
| static int hash_new_context(struct mm_struct *mm) {
int index;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
index = realloc_context_ids(&mm->context);
if (index < 0) {
return index;
}
subpage_prot_init_new_context(mm);
pkey_mm_init(mm);
return index;
} | static int hash_new_context(struct mm_struct *mm) {
int index;
- index = hash__alloc_context_id();
+ if (mm->context.id == 0) {
+ slice_init_new_context_exec(mm);
+ }
+ index = realloc_context_ids(&mm->context);
if (index < 0) {
return index;
}
subpage_prot_init_new_cont... |
CVE-2019-12818 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/nfc/llcp_commands.c | nfc_llcp_send_cc | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0;
__be16 miux;
pr_debug("Sending CC\n");
local = sock->local;
if (local == NULL) ... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0;
__be16 miux;
pr_debug("Sending CC\n");
local = sock->local;
if (local == NULL) ... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0, miux;
pr_debug("Sending CC\n");
local = sock->local;
if (local == NULL) {
r... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0, miux;
pr_debug("Sending CC\n");
local = sock->local;
if (local == NULL) {
r... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
miux = be16_to_cpu(sock->miux) > LLCP_MAX_MIUX ? local->miux : sock->miux;
rw = sock->rw > LLCP_MAX_RW ? local->rw : sock->rw;
miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
miux = be16_to_cpu(sock->miux) > LLCP_MAX_MIUX ? local->miux : sock->miux;
rw = sock->rw > LLCP_MAX_RW ? local->rw : sock->rw;
miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
miux = be16_to_cpu(sock->miux) > LLCP_MAX_MIUX ? local->miux : sock->miux;
rw = sock->rw > LLCP_MAX_RW ? local->rw : sock->rw;
... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
miux = be16_to_cpu(sock->miux) > LLCP_MAX_MIUX ? local->miux : sock->miux;
rw = sock->rw > LLCP_MAX_RW ? local->rw : sock->rw;
... | int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) {
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
miux = be16_to_cpu(sock->miux) > LLCP_MAX_MIUX ? local->miux : sock->miux;
rw = sock->rw > LLCP_MAX_RW ? local->rw : sock->rw;
miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIU... |
CVE-2019-12818 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/nfc/llcp_commands.c | nfc_llcp_send_connect | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *service_name_tlv = NULL, service_name_tlv_length;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0;
__be16 miux;
pr_debug("S... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *service_name_tlv = NULL, service_name_tlv_length;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0;
__be16 miux;
pr_debug("S... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *service_name_tlv = NULL, service_name_tlv_length;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0, miux;
pr_debug("Sending CONN... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
struct nfc_llcp_local *local;
struct sk_buff *skb;
u8 *service_name_tlv = NULL, service_name_tlv_length;
u8 *miux_tlv = NULL, miux_tlv_length;
u8 *rw_tlv = NULL, rw_tlv_length, rw;
int err;
u16 size = 0, miux;
pr_debug("Sending CONN... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
if (sock->service_name != NULL) {
service_name_tlv = nfc_llcp_build_tlv(LLCP_TLV_SN, sock->service_name, sock->service_name_len, &service_name_tlv_length);
size += ... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
if (sock->service_name != NULL) {
service_name_tlv = nfc_llcp_build_tlv(LLCP_TLV_SN, sock->service_name, sock->service_name_len, &service_name_tlv_length);
if (!ser... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
if (sock->service_name != NULL) {
service_name_tlv = nfc_llcp_build_tlv(LLCP_TLV_SN, sock->service_name, sock->service_nam... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
if (sock->service_name != NULL) {
service_name_tlv = nfc_llcp_build_tlv(LLCP_TLV_SN, sock->service_name, sock->service_nam... | int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) {
local = sock->local;
if (local == NULL) {
return -ENODEV;
}
if (sock->service_name != NULL) {
service_name_tlv = nfc_llcp_build_tlv(LLCP_TLV_SN, sock->service_name, sock->service_name_len, &service_name_tlv_length);
+ ... |
CVE-2019-12818 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/nfc/llcp_core.c | nfc_llcp_build_gb | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, *version_tlv, version, version_length;
u8 *lto_tlv, lto_length;
u8 *wks_tlv, wks_length;
u8 *miux_tlv, miux_length;
__be16 wks = cpu_to_be16(local->local_wks);
u8 gb_len = 0;
int ret = 0;
version = LLCP_VERSION_11;
... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, version, version_length;
u8 lto_length, wks_length, miux_length;
u8 *version_tlv = NULL, *lto_tlv = NULL, *wks_tlv = NULL, *miux_tlv = NULL;
__be16 wks = cpu_to_be16(local->local_wks);
u8 gb_len = 0;
int ret = 0;
versio... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, *version_tlv, version, version_length;
u8 *lto_tlv, lto_length;
u8 *wks_tlv, wks_length;
u8 *miux_tlv, miux_length;
__be16 wks = cpu_to_be16(local->local_wks);
u8 gb_len = 0;
int ret = 0;
version = LLCP_VERSION_11;
... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, version, version_length;
u8 lto_length, wks_length, miux_length;
u8 *version_tlv = NULL, *lto_tlv = NULL, *wks_tlv = NULL, *miux_tlv = NULL;
__be16 wks = cpu_to_be16(local->local_wks);
u8 gb_len = 0;
int ret = 0;
versio... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, *version_tlv, version, version_length;
u8 *lto_tlv, lto_length;
u8 *wks_tlv, wks_length;
u8 *miux_tlv, miux_length;
__be16 wks = cpu_to_be16(local->local_wks);
version = LLCP_VERSION_11;
version_tlv = nfc_llcp_build_tlv... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, version, version_length;
u8 lto_length, wks_length, miux_length;
u8 *version_tlv = NULL, *lto_tlv = NULL, *wks_tlv = NULL, *miux_tlv = NULL;
__be16 wks = cpu_to_be16(local->local_wks);
version = LLCP_VERSION_11;
version_tlv... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, *version_tlv, version, version_length;
u8 *lto_tlv, lto_length;
u8 *wks_tlv, wks_length;
u8 *miux_tlv, miux_length;
__be16 wks = cpu_to_be16(local->local_wks);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
version = LLC... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
u8 *gb_cur, version, version_length;
u8 lto_length, wks_length, miux_length;
u8 *version_tlv = NULL, *lto_tlv = NULL, *wks_tlv = NULL, *miux_tlv = NULL;
__be16 wks = cpu_to_be16(local->local_wks);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int nfc_llcp_build_gb(struct nfc_llcp_local *local) {
- u8 *gb_cur, *version_tlv, version, version_length;
- u8 *lto_tlv, lto_length;
- u8 *wks_tlv, wks_length;
- u8 *miux_tlv, miux_length;
+ u8 *gb_cur, version, version_length;
+ u8 lto_length, wks_length, miux_length;
+ u8 *version_tlv = ... |
CVE-2019-12881 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/i915/i915_gem_userptr.c | i915_gem_userptr_ioctl | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_i915_gem_userptr *args = data;
struct drm_i915_gem_object *obj;
int ret;
u32 handle;
if (!HAS_LLC(dev_priv) && !HAS_SNOOP(dev_priv)) {
retu... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_i915_gem_userptr *args = data;
struct drm_i915_gem_object *obj;
int ret;
u32 handle;
if (!HAS_LLC(dev_priv) && !HAS_SNOOP(dev_priv)) {
retu... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_gem_userptr *args = data;
struct drm_i915_gem_object *obj;
int ret;
u32 handle;
if (args->flags & ~(I915_USERPTR_READ_ONLY | I915_USERPTR_... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_gem_userptr *args = data;
struct drm_i915_gem_object *obj;
int ret;
u32 handle;
if (args->flags & ~(I915_USERPTR_READ_ONLY | I915_USERPTR_... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
struct drm_i915_gem_userptr *args = data;
if (args->flags & ~(I915_USERPTR_READ_ONLY | I915_USERPTR_UNSYNCHRONIZED)) {
return -EVAL;
}
if (offset_in_page(args->user_ptr | args->user_size)) {
return -E... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
struct drm_i915_gem_userptr *args = data;
if (args->flags & ~(I915_USERPTR_READ_ONLY | I915_USERPTR_UNSYNCHRONIZED)) {
return -EVAL;
}
if (!args->user_size) {
return -EVAL;
}
if (offset_in_pag... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct drm_i915_gem_userptr *args = data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (args->flags & ~(I915_USERPTR_READ_ONLY | I915_USERPTR_UNSYNCHRONIZED)) {
... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct drm_i915_gem_userptr *args = data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (args->flags & ~(I915_USERPTR_READ_ONLY | I915_USERPTR_UNSYNCHRONIZED)) {
... | int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) {
struct drm_i915_gem_userptr *args = data;
if (args->flags & ~(I915_USERPTR_READ_ONLY | I915_USERPTR_UNSYNCHRONIZED)) {
+ return -EVAL;
+ }
+ if (!args->user_size) {
return -EVAL;
}
if (offs... |
CVE-2019-12984 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/nfc/netlink.c | nfc_genl_deactivate_target | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
struct nfc_dev *dev;
u32 device_idx, target_idx;
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_DEX]);
dev = nfc_get_device(devi... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
struct nfc_dev *dev;
u32 device_idx, target_idx;
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX] || !info->attrs[NFC_ATTR_TARGET_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
struct nfc_dev *dev;
u32 device_idx, target_idx;
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_DEX]);
dev = nfc_get_device(devi... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
struct nfc_dev *dev;
u32 device_idx, target_idx;
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX] || !info->attrs[NFC_ATTR_TARGET_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_DEX]);
dev = nfc_get_device(device_idx);
if (!dev) {
return -ENODEV;
}
... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX] || !info->attrs[NFC_ATTR_TARGET_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_DEX]);
dev = nfc_get_device(device_idx);
if (!de... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_DEX]);
dev = nfc_get_device(device_idx)... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
if (!info->attrs[NFC_ATTR_DEVICE_DEX] || !info->attrs[NFC_ATTR_TARGET_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_DEX]);... | static int nfc_genl_deactivate_target(struct sk_buff *skb, struct genl_info *info) {
int rc;
- if (!info->attrs[NFC_ATTR_DEVICE_DEX]) {
+ if (!info->attrs[NFC_ATTR_DEVICE_DEX] || !info->attrs[NFC_ATTR_TARGET_DEX]) {
return -EVAL;
}
device_idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_DEX]... |
CVE-2019-13233 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/lib/insn-eval.c | get_desc | static struct desc_struct *get_desc(unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
unsigned long desc_base;
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
struct desc_struct *desc = NULL;
struct ldt_struct *ldt;
sel >>= 3;
mutex_lock(¤t->active_mm->context.lock... | static bool get_desc(struct desc_struct *out, unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
unsigned long desc_base;
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
bool success = false;
struct ldt_struct *ldt;
sel >>= 3;
mutex_lock(¤t->active_mm->context.lock)... | static struct desc_struct *get_desc(unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
unsigned long desc_base;
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
struct desc_struct *desc = NULL;
struct ldt_struct *ldt;
sel >>= 3;
mutex_lock(¤t->active_mm->context.lock... | static bool get_desc(struct desc_struct *out, unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
unsigned long desc_base;
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
bool success = false;
struct ldt_struct *ldt;
sel >>= 3;
mutex_lock(¤t->active_mm->context.lock)... | static struct desc_struct *get_desc(unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
struct desc_struct *desc = NULL;
struct ldt_struct *ldt;
sel >>= 3;
if (ldt && sel < ldt->nr_entries) {
desc = &ldt->entries[sel]... | static bool get_desc(struct desc_struct *out, unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
bool success = false;
struct ldt_struct *ldt;
sel >>= 3;
if (ldt && sel < ldt->nr_entries) {
*out = ldt->entries[sel];
... | static struct desc_struct *get_desc(unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
struct desc_struct *desc = NULL;
struct ldt_struct *ldt;
sel >>= 3;
/* PLACEHOLDER: DO NOT DELE... | static bool get_desc(struct desc_struct *out, unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
bool success = false;
struct ldt_struct *ldt;
sel >>= 3;
/* PLACEHOLDER: DO NOT DELET... | -static struct desc_struct *get_desc(unsigned short sel) {
+static bool get_desc(struct desc_struct *out, unsigned short sel) {
struct desc_ptr gdt_desc = {0, 0};
if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) {
- struct desc_struct *desc = NULL;
+ bool success = false;
struct ldt_struct *... |
CVE-2019-13233 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/lib/insn-eval.c | get_seg_limit | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
unsigned long limit;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
if (user_64bit_mode(regs) || v8086_mode(regs)) {
return -1L;
}
... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
unsigned long limit;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
if (user_64bit_mode(regs) || v8086_mode(regs)) {
return -1L;
}
... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
unsigned long limit;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
if (user_64bit_mode(regs) || v8086_mode(regs)) {
return -1L;
}
... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
unsigned long limit;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
if (user_64bit_mode(regs) || v8086_mode(regs)) {
return -1L;
}
... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
unsigned long limit;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
if (!sel) {
return 0;
}
desc = get_desc(sel);
if (!desc) {
retu... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
unsigned long limit;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
if (!sel) {
return 0;
}
if (!get_desc(&desc, sel)) {
return 0;
}... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
unsigned long limit;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMEN... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
unsigned long limit;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) {
- struct desc_struct *desc;
+ struct desc_struct desc;
unsigned long limit;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return 0;
}
if (!sel) {
return 0;
}
- desc = get... |
CVE-2019-13233 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/lib/insn-eval.c | insn_get_code_seg_params | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct *desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
desc = get_desc(sel);
if (!desc) {
... | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
if (!get_desc(&desc, sel)) {
return -E... | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct *desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
desc = get_desc(sel);
if (!desc) {
... | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
if (!get_desc(&desc, sel)) {
return -E... | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct *desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
desc = get_desc(sel);
if (!desc) {
... | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
if (!get_desc(&desc, sel)) {
return -E... | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct *desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
desc = get_desc(sel);
if (!desc) {
... | int insn_get_code_seg_params(struct pt_regs *regs) {
struct desc_struct desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
if (!get_desc(&desc, sel)) {
return -E... | int insn_get_code_seg_params(struct pt_regs *regs) {
- struct desc_struct *desc;
+ struct desc_struct desc;
short sel;
if (v8086_mode(regs)) {
return SN_CODE_SEG_PARAMS(2, 2);
}
sel = get_segment_selector(regs, AT_SEG_REG_CS);
if (sel < 0) {
return sel;
}
- desc... |
CVE-2019-13233 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/lib/insn-eval.c | insn_get_seg_base | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
if (v8086_mode(regs)) {
return (unsigned long)(sel << 4);
}
if (user_64bit_mode(regs))... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
if (v8086_mode(regs)) {
return (unsigned long)(sel << 4);
}
if (user_64bit_mode(regs)) ... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
if (v8086_mode(regs)) {
return (unsigned long)(sel << 4);
}
if (user_64bit_mode(regs))... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
if (v8086_mode(regs)) {
return (unsigned long)(sel << 4);
}
if (user_64bit_mode(regs)) ... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
if (!sel) {
return -1L;
}
desc = get_desc(sel);
if (!desc) {
return -1L;
... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
if (!sel) {
return -1L;
}
if (!get_desc(&desc, sel)) {
return -1L;
}
re... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct *desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!sel) {
return -1L;
}
desc = get... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
struct desc_struct desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!sel) {
return -1L;
}
if (!get_de... | unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) {
- struct desc_struct *desc;
+ struct desc_struct desc;
short sel;
sel = get_segment_selector(regs, seg_reg_idx);
if (sel < 0) {
return -1L;
}
if (!sel) {
return -1L;
}
- desc = get_desc(sel... |
CVE-2019-13272 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/ptrace.c | ptrace_link | static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
rcu_read_lock();
__ptrace_link(child, new_parent, __task_cred(new_parent));
rcu_read_unlock();
} | static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
__ptrace_link(child, new_parent, current_cred());
} | static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
rcu_read_lock();
__ptrace_link(child, new_parent, __task_cred(new_parent));
rcu_read_unlock();
} | static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
__ptrace_link(child, new_parent, current_cred());
} | static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
rcu_read_lock();
__ptrace_link(child, new_parent, __task_cred(new_parent));
rcu_read_unlock();
}
| static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
__ptrace_link(child, new_parent, current_cred());
}
| static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
rcu_read_lock();
__ptrace_link(child, new_parent, __task_cred(new_parent));
rcu_read_unlock();
}
| static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
__ptrace_link(child, new_parent, current_cred());
} | static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) {
- rcu_read_lock();
- __ptrace_link(child, new_parent, __task_cred(new_parent));
- rcu_read_unlock();
+ __ptrace_link(child, new_parent, current_cred());
} |
CVE-2019-13631 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/input/tablet/gtco.c | parse_hid_report_descriptor | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
int x, i = 0;
__u8 prefix;
__u8 size;
__u8 tag;
__u8 type;
__u8 data = 0;
__u16 data16 = 0;
__u32 data32 = 0;
int inputnum = 0;
__u32 usage = 0;... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
int x, i = 0;
__u8 prefix;
__u8 size;
__u8 tag;
__u8 type;
__u8 data = 0;
__u16 data16 = 0;
__u32 data32 = 0;
int inputnum = 0;
__u32 usage = 0;... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
int x, i = 0;
__u8 prefix;
__u8 size;
__u8 tag;
__u8 type;
__u8 data = 0;
__u16 data16 = 0;
__u32 data32 = 0;
int inputnum = 0;
__u32 usage = 0;... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
int x, i = 0;
__u8 prefix;
__u8 size;
__u8 tag;
__u8 type;
__u8 data = 0;
__u16 data16 = 0;
__u32 data32 = 0;
int inputnum = 0;
__u32 usage = 0;... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
int inputnum = 0;
__u32 usage = 0;
int indent = 0;
char indentstr[10] = "";
dev_dbg(ddev, "======>>>>>>PARSE<<<<<<======\n");
while (i < length) {
prefi... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
int inputnum = 0;
__u32 usage = 0;
int indent = 0;
char indentstr[MAX_COLLECTION_LEVELS + 1] = { 0 };
dev_dbg(ddev, "======>>>>>>PARSE<<<<<<======\n");
while (i... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int inputnum = 0;
__u32 usage = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int indent = 0;
char indentstr[10... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int inputnum = 0;
__u32 usage = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int indent = 0;
char indentstr[MA... | static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) {
struct device *ddev = &device->intf->dev;
int inputnum = 0;
__u32 usage = 0;
int indent = 0;
- char indentstr[10] = "";
+ char indentstr[MAX_COLLECTION_LEVELS + 1] = { 0 };
dev_dbg(ddev, "======>>>>... |
CVE-2019-14283 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/floppy.c | set_geometry | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if ((int)g->sect <= 0 || (int)g->head <= 0 || (int)(g->sect * g->head) <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETC... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if ((int)g->sect <= 0 || (int)g->head <= 0 || (int)(g->sect * g->head) <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETC... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if ((int)g->sect <= 0 || (int)g->head <= 0 || (int)(g->sect * g->head) <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETC... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if ((int)g->sect <= 0 || (int)g->head <= 0 || (int)(g->sect * g->head) <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETC... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
- if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
+ if ((int)g->sect <= 0 || (int)... |
CVE-2019-14284 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/floppy.c | set_geometry | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g) || (g->stretch & ~(FD_STRETCH | FD_SWAPSIDES | FD_SECTBASEMASK)) != 0) {
return -EVAL;
... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g) || (g->stretch & ~(FD_STRETCH | FD_SWAPSIDES | FD_SECTBASEMASK)) != 0) {
return -EVAL;
... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g) || (g->stretch & ~(FD_STRETCH | FD_SWAPSIDES | FD_SECTBASEMASK)) != 0) {
return -EVAL;
... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g) || (g->stretch & ~(FD_STRETCH | FD_SWAPSIDES | FD_SECTBASEMASK)) != 0) {
return -EVAL;
... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
if (g->sect <= 0 || g->head <= 0 || (unsigned char)((g->sect << 2) >> FD_SIZECODE(g)) == 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g)
|| (g->stretch & ~(FD_STRE... | static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) {
int cnt;
- if (g->sect <= 0 || g->head <= 0 || g->track <= 0 || g->track > UDP->tracks >> STRETCH(g) || (g->stretch & ~(FD_STRETCH | FD_SWAPSIDES | FD_SECTBASEMASK)) != 0) {
+ if (g->sect <= ... |
CVE-2019-14284 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/floppy.c | setup_format_params | static void setup_format_params(int track) {
int n;
int il;
int count;
int head_shift;
int track_shift;
struct fparm {
unsigned char track, head, sect, size;
} *here = (struct fparm *)floppy_track_buffer;
raw_cmd = &default_raw_cmd;
raw_cmd->track = track;
raw_cmd->flags ... | static void setup_format_params(int track) {
int n;
int il;
int count;
int head_shift;
int track_shift;
struct fparm {
unsigned char track, head, sect, size;
} *here = (struct fparm *)floppy_track_buffer;
raw_cmd = &default_raw_cmd;
raw_cmd->track = track;
raw_cmd->flags ... | static void setup_format_params(int track) {
int n;
int il;
int count;
int head_shift;
int track_shift;
struct fparm {
unsigned char track, head, sect, size;
} *here = (struct fparm *)floppy_track_buffer;
raw_cmd = &default_raw_cmd;
raw_cmd->track = track;
raw_cmd->flags ... | static void setup_format_params(int track) {
int n;
int il;
int count;
int head_shift;
int track_shift;
struct fparm {
unsigned char track, head, sect, size;
} *here = (struct fparm *)floppy_track_buffer;
raw_cmd = &default_raw_cmd;
raw_cmd->track = track;
raw_cmd->flags ... | static void setup_format_params(int track) {
COMMAND = FM_MODE(_floppy, FD_FORMAT);
DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head);
F_SIZECODE = FD_SIZECODE(_floppy);
F_SECT_PER_TRACK = _floppy->sect << 2 >> F_SIZECODE;
raw_cmd->length = 4 * F_SECT_PER_TRACK;
head_shift = (F... | static void setup_format_params(int track) {
COMMAND = FM_MODE(_floppy, FD_FORMAT);
DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head);
F_SIZECODE = FD_SIZECODE(_floppy);
F_SECT_PER_TRACK = _floppy->sect << 2 >> F_SIZECODE;
raw_cmd->length = 4 * F_SECT_PER_TRACK;
if (!F_SECT_PER... | static void setup_format_params(int track) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
COMMAND = FM_MODE(_floppy, FD_FORMAT);
DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head);
F_SIZECODE = FD_SIZECODE(_floppy);
F_SECT_PER_TRACK = _floppy->sect << 2 >> F_SIZECODE;
/* PLACEH... | static void setup_format_params(int track) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
COMMAND = FM_MODE(_floppy, FD_FORMAT);
DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head);
F_SIZECODE = FD_SIZECODE(_floppy);
F_SECT_PER_TRACK = _floppy->sect << 2 >> F_SIZECODE;
/* PLACEH... | static void setup_format_params(int track) {
COMMAND = FM_MODE(_floppy, FD_FORMAT);
DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head);
F_SIZECODE = FD_SIZECODE(_floppy);
F_SECT_PER_TRACK = _floppy->sect << 2 >> F_SIZECODE;
raw_cmd->length = 4 * F_SECT_PER_TRACK;
+ if (!F_S... |
CVE-2019-14615 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/i915/gt/intel_lrc.c | gen9_init_indirectctx_bb | static int gen9_init_indirectctx_bb(struct intel_engine_cs *ring, struct i915_wa_ctx_bb *wa_ctx, uint32_t *const batch, uint32_t *offset) {
int ret;
struct drm_device *dev = ring->dev;
uint32_t index = wa_ctx_start(wa_ctx, *offset, CACHELE_DWORDS);
if ((IS_SKYLAKE(dev) && (TEL_REVID(dev) <= SKL_REVID_D0... | static int gen9_init_indirectctx_bb(struct intel_engine_cs *ring, struct i915_wa_ctx_bb *wa_ctx, uint32_t *const batch, uint32_t *offset) {
int ret;
struct drm_device *dev = ring->dev;
uint32_t index = wa_ctx_start(wa_ctx, *offset, CACHELE_DWORDS);
uint32_t scratch_addr;
if ((IS_SKYLAKE(dev) && (TEL... | static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) {
static const struct lri lri[] = {
{
COMMON_SLICE_CHICKEN2, __MASKED_FIELD(GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE, 0),
}, {
FF_SLICE_CHICKEN, __MASKED_FIELD(FF_SLICE_CHICKEN_CL_PROVOKG_V... | static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) {
static const struct lri lri[] = {
{
COMMON_SLICE_CHICKEN2, __MASKED_FIELD(GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE, 0),
}, {
FF_SLICE_CHICKEN, __MASKED_FIELD(FF_SLICE_CHICKEN_CL_PROVOKG_V... | static int gen9_init_indirectctx_bb(struct intel_engine_cs *ring, struct i915_wa_ctx_bb *wa_ctx, uint32_t *const batch, uint32_t *offset) {
uint32_t index = wa_ctx_start(wa_ctx, *offset, CACHELE_DWORDS);
if ((IS_SKYLAKE(dev) && (TEL_REVID(dev) <= SKL_REVID_D0)) || (IS_BROXTON(dev) && (TEL_REVID(dev) == BXT_REVI... | static int gen9_init_indirectctx_bb(struct intel_engine_cs *ring, struct i915_wa_ctx_bb *wa_ctx, uint32_t *const batch, uint32_t *offset) {
uint32_t index = wa_ctx_start(wa_ctx, *offset, CACHELE_DWORDS);
uint32_t scratch_addr;
if ((IS_SKYLAKE(dev) && (TEL_REVID(dev) <= SKL_REVID_D0)) || (IS_BROXTON(dev) && ... | static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) {
static const struct lri lri[] = {
{
COMMON_SLICE_CHICKEN2, __MASKED_FIELD(GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE, 0),
}, {
FF_SLICE_CHICKEN, __MASKED_FIELD(FF_SLICE_CHICKEN_CL_PROVOKG_V... | static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) {
static const struct lri lri[] = {
{
COMMON_SLICE_CHICKEN2, __MASKED_FIELD(GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE, 0),
}, {
FF_SLICE_CHICKEN, __MASKED_FIELD(FF_SLICE_CHICKEN_CL_PROVOKG_V... | static int gen9_init_indirectctx_bb(struct intel_engine_cs *ring, struct i915_wa_ctx_bb *wa_ctx, uint32_t *const batch, uint32_t *offset) {
uint32_t index = wa_ctx_start(wa_ctx, *offset, CACHELE_DWORDS);
+ uint32_t scratch_addr;
if ((IS_SKYLAKE(dev) && (TEL_REVID(dev) <= SKL_REVID_D0)) || (IS_BROXTON(dev)... |
CVE-2019-14763 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/dwc3/gadget.c | __dwc3_gadget_kick_transfer | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param) {
struct dwc3_gadget_ep_cmd_params params;
struct dwc3_request *req;
int starting;
int ret;
u32 cmd;
starting = !(dep->flags & DWC3_EP_BUSY);
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if ... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param) {
struct dwc3_gadget_ep_cmd_params params;
struct dwc3_request *req;
int starting;
int ret;
u32 cmd;
starting = !(dep->flags & DWC3_EP_BUSY);
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if ... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep) {
struct dwc3_gadget_ep_cmd_params params;
struct dwc3_request *req;
int starting;
int ret;
u32 cmd;
if (!dwc3_calc_trbs_left(dep)) {
return 0;
}
starting = !(dep->flags & DWC3_EP_BUSY);
dwc3_prepare_trbs(dep);
r... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep) {
struct dwc3_gadget_ep_cmd_params params;
struct dwc3_request *req;
int starting;
int ret;
u32 cmd;
if (!dwc3_calc_trbs_left(dep)) {
return 0;
}
starting = !(dep->flags & DWC3_EP_BUSY);
dwc3_prepare_trbs(dep);
r... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param) {
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if (!req) {
return 0;
}
if (starting) {
cmd = DWC3_DEPCMD_STARTTRANSFER | DWC3_DEPCMD_PARAM(cmd_param);
} else {
cmd = DWC3_DEPCMD_... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param) {
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if (!req) {
return 0;
}
if (starting) {
cmd = DWC3_DEPCMD_STARTTRANSFER | DWC3_DEPCMD_PARAM(cmd_param);
} else {
cmd = DWC3_DEPCMD_... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if (!req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if (!req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param) {
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if (!req) {
return 0;
}
if (starting) {
cmd = DWC3_DEPCMD_STARTTRANSFER | DWC3_DEPCMD_PARAM(cmd_param);
} else {
cmd = DW... |
CVE-2019-14814 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/ie.c | mwifiex_update_vs_ie | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(sizeof(... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(sizeof(... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mwifiex_ie *ie = *ie_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(oui, oui_typ... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mwifiex_ie *ie = *ie_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(oui, oui_typ... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(s... |
CVE-2019-14814 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/uap_cmd.c | mwifiex_set_uap_rates | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
if (r... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
if (r... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_fin... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_fin... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
... |
CVE-2019-14814 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/uap_cmd.c | mwifiex_set_wmm_params | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor_ie;... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor_ie;... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len)... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len)... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor... |
CVE-2019-14815 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/marvell/mwifiex/ie.c | mwifiex_update_vs_ie | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(sizeof(... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(sizeof(... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mwifiex_ie *ie = *ie_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(oui, oui_typ... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mwifiex_ie *ie = *ie_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(oui, oui_typ... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(s... |
CVE-2019-14815 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/marvell/mwifiex/uap_cmd.c | mwifiex_set_uap_rates | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
if (r... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
if (r... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_fin... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_fin... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
... |
CVE-2019-14815 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/marvell/mwifiex/uap_cmd.c | mwifiex_set_wmm_params | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor_ie;... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor_ie;... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len)... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len)... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor... |
CVE-2019-14816 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/ie.c | mwifiex_update_vs_ie | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(sizeof(... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(sizeof(... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mwifiex_ie *ie = *ie_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(oui, oui_typ... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mwifiex_ie *ie = *ie_ptr;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(oui, oui_typ... | static int mwifiex_update_vs_ie(const u8 *ies, int ies_len, struct mwifiex_ie **ie_ptr, u16 mask, unsigned int oui, u8 oui_type) {
struct mwifiex_ie *ie = *ie_ptr;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if (!*ie_ptr) {
*ie_ptr = kzalloc(s... |
CVE-2019-14816 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/uap_cmd.c | mwifiex_set_uap_rates | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
struct ieee_types_header *rate_ie;
int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_o... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
if (r... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
if (r... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_fin... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_fin... | void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *var_pos = params->beacon.head + var_offset;
int len = params->beacon.head_len - var_offset;
u8 rate_len = 0;
rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
... |
CVE-2019-14816 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/uap_cmd.c | mwifiex_set_wmm_params | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
const u8 *vendor_ie;
const u8 *wmm_ie;
u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, par... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor_ie;... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor_ie;... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len)... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len)... | void mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) {
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WMM, params->beacon.tail, params->beacon.tail_len);
if (vendor_ie) {
wmm_ie = vendor... |
CVE-2019-14821 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | virt/kvm/coalesced_mmio.c | coalesced_mmio_has_room | static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev) {
struct kvm_coalesced_mmio_ring *ring;
unsigned avail;
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - ring->last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
return 1;
} | static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev, u32 last) {
struct kvm_coalesced_mmio_ring *ring;
unsigned avail;
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
return 1;
} | static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev) {
struct kvm_coalesced_mmio_ring *ring;
unsigned avail;
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - ring->last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
return 1;
} | static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev, u32 last) {
struct kvm_coalesced_mmio_ring *ring;
unsigned avail;
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
return 1;
} | static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev) {
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - ring->last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
}
| static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev, u32 last) {
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
}
| static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - ring->last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS C... | static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev, u32 last) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ring = dev->kvm->coalesced_mmio_ring;
avail = (ring->first - last - 1) % KVM_COALESCED_MMIO_MAX;
if (avail == 0) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE TH... | -static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev) {
+static int coalesced_mmio_has_room(struct kvm_coalesced_mmio_dev *dev, u32 last) {
ring = dev->kvm->coalesced_mmio_ring;
- avail = (ring->first - ring->last - 1) % KVM_COALESCED_MMIO_MAX;
+ avail = (ring->first - last - 1) % KVM_COALE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.