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-2022-2978 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/inode.c | inode_init_always | int inode_init_always(struct super_block *sb, struct inode *inode) {
static const struct inode_operations empty_iops;
static const struct file_operations no_open_fops = {.open = no_open};
struct address_space *const mapping = &inode->i_data;
inode->i_sb = sb;
inode->i_blkbits = sb->s_blocksize_bits;... | int inode_init_always(struct super_block *sb, struct inode *inode) {
static const struct inode_operations empty_iops;
static const struct file_operations no_open_fops = {.open = no_open};
struct address_space *const mapping = &inode->i_data;
inode->i_sb = sb;
inode->i_blkbits = sb->s_blocksize_bits;... | int inode_init_always(struct super_block *sb, struct inode *inode) {
static const struct inode_operations empty_iops;
static const struct file_operations no_open_fops = {.open = no_open};
struct address_space *const mapping = &inode->i_data;
inode->i_sb = sb;
inode->i_blkbits = sb->s_blocksize_bits;... | int inode_init_always(struct super_block *sb, struct inode *inode) {
static const struct inode_operations empty_iops;
static const struct file_operations no_open_fops = {.open = no_open};
struct address_space *const mapping = &inode->i_data;
inode->i_sb = sb;
inode->i_blkbits = sb->s_blocksize_bits;... | int inode_init_always(struct super_block *sb, struct inode *inode) {
i_uid_write(inode, 0);
i_gid_write(inode, 0);
if (security_inode_alloc(inode)) {
goto out;
}
spin_lock_init(&inode->i_lock);
lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key);
init_rwsem(&inode->i_rwsem);
... | int inode_init_always(struct super_block *sb, struct inode *inode) {
i_uid_write(inode, 0);
i_gid_write(inode, 0);
spin_lock_init(&inode->i_lock);
lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key);
init_rwsem(&inode->i_rwsem);
lockdep_set_class(&inode->i_rwsem, &sb->s_type->i_mutex_key)... | int inode_init_always(struct super_block *sb, struct inode *inode) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
i_uid_write(inode, 0);
i_gid_write(inode, 0);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (security_inode_alloc(inode)) {
goto out;
}
spin_lock_init(&inode->i_lock)... | int inode_init_always(struct super_block *sb, struct inode *inode) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
i_uid_write(inode, 0);
i_gid_write(inode, 0);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_lock_init(&inode->i_lock);
lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key... | int inode_init_always(struct super_block *sb, struct inode *inode) {
i_uid_write(inode, 0);
i_gid_write(inode, 0);
- if (security_inode_alloc(inode)) {
- goto out;
- }
spin_lock_init(&inode->i_lock);
lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key);
init_rwsem(&inode->i_... |
CVE-2022-29900 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/x86.c | kvm_arch_has_assigned_device | bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
} | bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
} | bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
} | bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
} | bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
}
| bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
}
| bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
}
| bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
} | -bool kvm_arch_has_assigned_device(struct kvm *kvm) {
- return atomic_read(&kvm->arch.assigned_device_count);
+bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
+ return arch_atomic_read(&kvm->arch.assigned_device_count);
} |
CVE-2022-29901 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/x86.c | kvm_arch_has_assigned_device | bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
} | bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
} | bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
} | bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
} | bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
}
| bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
}
| bool kvm_arch_has_assigned_device(struct kvm *kvm) {
return atomic_read(&kvm->arch.assigned_device_count);
}
| bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
return arch_atomic_read(&kvm->arch.assigned_device_count);
} | -bool kvm_arch_has_assigned_device(struct kvm *kvm) {
- return atomic_read(&kvm->arch.assigned_device_count);
+bool noinstr kvm_arch_has_assigned_device(struct kvm *kvm) {
+ return arch_atomic_read(&kvm->arch.assigned_device_count);
} |
CVE-2022-3028 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/key/af_key.c | pfkey_register | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
struct pfkey_sock *pfk = pfkey_sk(sk);
struct sk_buff *supp_skb;
if (hdr->sadb_msg_satype > SADB_SATYPE_MAX) {
return -EVAL;
}
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
struct pfkey_sock *pfk = pfkey_sk(sk);
struct sk_buff *supp_skb;
if (hdr->sadb_msg_satype > SADB_SATYPE_MAX) {
return -EVAL;
}
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
struct pfkey_sock *pfk = pfkey_sk(sk);
struct sk_buff *supp_skb;
if (hdr->sadb_msg_satype > SADB_SATYPE_MAX) {
return -EVAL;
}
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
struct pfkey_sock *pfk = pfkey_sk(sk);
struct sk_buff *supp_skb;
if (hdr->sadb_msg_satype > SADB_SATYPE_MAX) {
return -EVAL;
}
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC)... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC) {
pfk->registered |= (1<<hdr->sadb_msg_satype);
}
xfrm_probe_algs();
supp_skb = compose_sadb_supported(hdr, GFP_KERNEL | __GFP_ZER... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC) {
pfk->registered |= (1<<hdr->sadb_msg_satype);
}
mutex_lock(&pfkey_mutex);
xfrm_probe_algs();
supp_skb = compose_sadb_support... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pfk->registered |= (1<<hdr->sadb_msg_sat... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pfk->registered |= (1<<hdr->sadb_msg_sat... | static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) {
if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC) {
pfk->registered |= (1<<hdr->sadb_msg_satype);
}
+ mutex_lock(&pfkey_mutex);
xfrm_probe_algs();
supp_skb = compose_sadb_... |
CVE-2022-30594 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/ptrace.c | ptrace_attach | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
bool seize = (request == PTRACE_SEIZE);
int retval;
retval = -EIO;
if (seize) {
if (addr != 0) {
goto out;
}
if (flags & ~(unsigned long)PTRACE_O_MASK) {
... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
bool seize = (request == PTRACE_SEIZE);
int retval;
retval = -EIO;
if (seize) {
if (addr != 0) {
goto out;
}
if (flags & ~(unsigned long)PTRACE_O_MASK) {
... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
bool seize = (request == PTRACE_SEIZE);
int retval;
retval = -EIO;
if (seize) {
if (addr != 0) {
goto out;
}
if (flags & ~(unsigned long)PTRACE_O_MASK) {
... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
bool seize = (request == PTRACE_SEIZE);
int retval;
retval = -EIO;
if (seize) {
if (addr != 0) {
goto out;
}
if (flags & ~(unsigned long)PTRACE_O_MASK) {
... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
if (seize) {
if (flags & ~(unsigned long)PTRACE_O_MASK) {
goto out;
}
flags = PT_PTRACED | PT_SEIZED | (flags << PT_OPT_FLAG_SHIFT);
} else {
}
task->ptrace = f... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
if (seize) {
if (flags & ~(unsigned long)PTRACE_O_MASK) {
goto out;
}
retval = check_ptrace_options(flags);
if (retval) {
return retval;
}
... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (seize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (flags & ~(unsigned long)PTRACE_O_MASK) {
goto out;
}
fl... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (seize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (flags & ~(unsigned long)PTRACE_O_MASK) {
goto out;
}
re... | static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) {
if (seize) {
if (flags & ~(unsigned long)PTRACE_O_MASK) {
goto out;
+ }
+ retval = check_ptrace_options(flags);
+ if (retval) {
+ return retval;
... |
CVE-2022-30594 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/ptrace.c | ptrace_setoptions | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
if (data & ~(unsigned long)PTRACE_O_MASK) {
return -EVAL;
}
if (unlikely(data & PTRACE_O_SUSPEND_SECCOMP)) {
if (!IS_ENABLED(CONFIG_CHECKPOT_RESTORE) || !IS_ENABLED(CONFIG_SECCOMP)) {
... | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
int ret;
ret = check_ptrace_options(data);
if (ret) {
return ret;
}
flags = child->ptrace;
flags &= ~(PTRACE_O_MASK << PT_OPT_FLAG_SHIFT);
flags |= (data << PT_OPT_FLAG_SHIFT);
child... | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
if (data & ~(unsigned long)PTRACE_O_MASK) {
return -EVAL;
}
if (unlikely(data & PTRACE_O_SUSPEND_SECCOMP)) {
if (!IS_ENABLED(CONFIG_CHECKPOT_RESTORE) || !IS_ENABLED(CONFIG_SECCOMP)) {
... | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
int ret;
ret = check_ptrace_options(data);
if (ret) {
return ret;
}
flags = child->ptrace;
flags &= ~(PTRACE_O_MASK << PT_OPT_FLAG_SHIFT);
flags |= (data << PT_OPT_FLAG_SHIFT);
child... | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
if (data & ~(unsigned long)PTRACE_O_MASK) {
return -EVAL;
}
if (unlikely(data & PTRACE_O_SUSPEND_SECCOMP)) {
if (!IS_ENABLED(CONFIG_CHECKPOT_RESTORE) || !IS_ENABLED(CONFIG_SECCOMP)) {
... | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
int ret;
ret = check_ptrace_options(data);
if (ret) {
return ret;
}
flags = child->ptrace;
flags |= (data << PT_OPT_FLAG_SHIFT);
child->ptrace = flags;
}
| static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
if (data & ~(unsigned long)PTRACE_O_MASK) {
return -EVAL;
}
if (unlikely(data & PTRACE_O_SUSPEND_SECCOMP)) {
if (!IS_ENABLED(CONFIG_CHECKPOT_RESTORE) || !IS_ENABLED(CONFIG_SECCOMP)) {
... | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
int ret;
ret = check_ptrace_options(data);
if (ret) {
return ret;
}
flags = child->ptrace;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
flags |= (data << PT_OPT_FLAG_SHIFT);
child->... | static int ptrace_setoptions(struct task_struct *child, unsigned long data) {
unsigned flags;
- if (data & ~(unsigned long)PTRACE_O_MASK) {
- return -EVAL;
- }
- if (unlikely(data & PTRACE_O_SUSPEND_SECCOMP)) {
- if (!IS_ENABLED(CONFIG_CHECKPOT_RESTORE) || !IS_ENABLED(CONFIG_SECCOMP)) {
- ... |
CVE-2022-3061 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/video/fbdev/i740fb.c | i740fb_check_var | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
switch (var->bits_per_pixel) {
case 8:
var->red.offset = var->green.offset = var->blue.offset = 0;
var->red.length = var->green.length = var->blue.length = 8;
break;
case 16:
switch (var->green... | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
if (!var->pixclock) {
return -EVAL;
}
switch (var->bits_per_pixel) {
case 8:
var->red.offset = var->green.offset = var->blue.offset = 0;
var->red.length = var->green.length = var->blue.length = 8;
... | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
switch (var->bits_per_pixel) {
case 8:
var->red.offset = var->green.offset = var->blue.offset = 0;
var->red.length = var->green.length = var->blue.length = 8;
break;
case 16:
switch (var->green... | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
if (!var->pixclock) {
return -EVAL;
}
switch (var->bits_per_pixel) {
case 8:
var->red.offset = var->green.offset = var->blue.offset = 0;
var->red.length = var->green.length = var->blue.length = 8;
... | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
switch (var->bits_per_pixel) {
}
if (info->monspecs.hfmax && info->monspecs.vfmax && info->monspecs.dclkmax && fb_validate_mode(var, info) < 0) {
return -EVAL;
}
}
| static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
if (!var->pixclock) {
return -EVAL;
}
switch (var->bits_per_pixel) {
}
if (info->monspecs.hfmax && info->monspecs.vfmax && info->monspecs.dclkmax && fb_validate_mode(var, info) < 0) {
return -EVAL;
... | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
switch (var->bits_per_pixel) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (info->monspecs.hfmax && info->monspecs.vfmax && info->monspecs.dclkmax && fb_validate_mo... | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
if (!var->pixclock) {
return -EVAL;
}
switch (var->bits_per_pixel) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (info->monspecs.hfmax && info->mons... | static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {
+ if (!var->pixclock) {
+ return -EVAL;
+ }
switch (var->bits_per_pixel) {
}
if (info->monspecs.hfmax && info->monspecs.vfmax && info->monspecs.dclkmax && fb_validate_mode(var, info) < 0) {
return -E... |
CVE-2022-3077 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/i2c/busses/i2c-ismt.c | ismt_access | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
int ret;
unsigned long time_left;
dma_addr_t dma_addr = 0;
u8 dma_size = 0;
enum dma_data_direction dma_direction = 0;
struct ismt_desc *desc;
... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
int ret;
unsigned long time_left;
dma_addr_t dma_addr = 0;
u8 dma_size = 0;
enum dma_data_direction dma_direction = 0;
struct ismt_desc *desc;
... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
int ret;
unsigned long time_left;
dma_addr_t dma_addr = 0;
u8 dma_size = 0;
enum dma_data_direction dma_direction = 0;
struct ismt_desc *desc;
... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
int ret;
unsigned long time_left;
dma_addr_t dma_addr = 0;
u8 dma_size = 0;
enum dma_data_direction dma_direction = 0;
struct ismt_desc *desc;
... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
switch (size) {
case I2C_SMBUS_BLOCK_PROC_CALL:
dev_dbg(dev, "I2C_SMBUS_BLOCK_PROC_CALL\n");
dma_size = I2C_SMBUS_BLOCK_MAX;
desc->wr_len_... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
switch (size) {
case I2C_SMBUS_BLOCK_PROC_CALL:
dev_dbg(dev, "I2C_SMBUS_BLOCK_PROC_CALL\n");
if (data->block[0] > I2C_SMBUS_BLOCK_MAX) {
... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case I2C_SMBUS_BLOCK_PROC_CALL:
dev_db... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case I2C_SMBUS_BLOCK_PROC_CALL:
dev_db... | static int ismt_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) {
switch (size) {
case I2C_SMBUS_BLOCK_PROC_CALL:
dev_dbg(dev, "I2C_SMBUS_BLOCK_PROC_CALL\n");
+ if (data->block[0] > I2C_SMBUS_BLOCK_MAX) {
+ ... |
CVE-2022-3078 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/test-drivers/vidtv/vidtv_s302m.c | vidtv_s302m_encoder_init | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
u32 priv_sz = sizeof(struct vidtv_s302m_ctx);
struct vidtv_s302m_ctx *ctx;
struct vidtv_encoder *e;
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
e->id = S302M;
if (args.na... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
u32 priv_sz = sizeof(struct vidtv_s302m_ctx);
struct vidtv_s302m_ctx *ctx;
struct vidtv_encoder *e;
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
e->id = S302M;
if (args.na... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
u32 priv_sz = sizeof(struct vidtv_s302m_ctx);
struct vidtv_s302m_ctx *ctx;
struct vidtv_encoder *e;
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
e->id = S302M;
if (args.na... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
u32 priv_sz = sizeof(struct vidtv_s302m_ctx);
struct vidtv_s302m_ctx *ctx;
struct vidtv_encoder *e;
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
e->id = S302M;
if (args.na... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
if (args.name) {
e->name = kstrdup(args.name, GFP_KERNEL);
}
e->encoder_buf = vzalloc(VIDTV_S302M_BUF_SZ);
e->encoder_buf_... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
if (args.name) {
e->name = kstrdup(args.name, GFP_KERNEL);
}
e->encoder_buf = vzalloc(VIDTV_S302M_BUF_SZ);
if (!e->encoder... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (args.name) {
e->name = kstrdup... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (args.name) {
e->name = kstrdup... | struct vidtv_encoder *vidtv_s302m_encoder_init(struct vidtv_s302m_encoder_init_args args) {
e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) {
return NULL;
}
if (args.name) {
e->name = kstrdup(args.name, GFP_KERNEL);
}
e->encoder_buf = vzalloc(VIDTV_S302M_BUF_SZ);
+ if (!... |
CVE-2022-3104 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/misc/lkdtm/bugs.c | lkdtm_ARRAY_BOUNDS | void lkdtm_ARRAY_BOUNDS(void) {
struct array_bounds_flex_array *not_checked;
struct array_bounds *checked;
volatile int i;
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
pr_info("Array access within bounds ...\n");
for (i = 0... | void lkdtm_ARRAY_BOUNDS(void) {
struct array_bounds_flex_array *not_checked;
struct array_bounds *checked;
volatile int i;
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
if (!not_checked || !checked) {
kfree(not_checked);... | void lkdtm_ARRAY_BOUNDS(void) {
struct array_bounds_flex_array *not_checked;
struct array_bounds *checked;
volatile int i;
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
pr_info("Array access within bounds ...\n");
for (i = 0... | void lkdtm_ARRAY_BOUNDS(void) {
struct array_bounds_flex_array *not_checked;
struct array_bounds *checked;
volatile int i;
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
if (!not_checked || !checked) {
kfree(not_checked);... | void lkdtm_ARRAY_BOUNDS(void) {
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
pr_info("Array access within bounds ...\n");
kfree(not_checked);
kfree(checked);
}
| void lkdtm_ARRAY_BOUNDS(void) {
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
if (!not_checked || !checked) {
kfree(not_checked);
kfree(checked);
return;
}
pr_info("Array access within bounds ...\n");
kfr... | void lkdtm_ARRAY_BOUNDS(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
pr_info("Array access within bounds ...\n");
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kfree(not_che... | void lkdtm_ARRAY_BOUNDS(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
if (!not_checked || !checked) {
kfree(not_checked);
kfree(checked);
return;
}
pr... | void lkdtm_ARRAY_BOUNDS(void) {
not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL);
checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL);
+ if (!not_checked || !checked) {
+ kfree(not_checked);
+ kfree(checked);
+ return;
+ }
pr_info("Array access within bounds ...\n")... |
CVE-2022-3105 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/infiniband/core/uverbs_uapi.c | uapi_finalize | static int uapi_finalize(struct uverbs_api *uapi) {
const struct uverbs_api_write_method **data;
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
struct radix_tree_iter iter;
void __rcu **slot;
int rc;
int i;
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
s... | static int uapi_finalize(struct uverbs_api *uapi) {
const struct uverbs_api_write_method **data;
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
struct radix_tree_iter iter;
void __rcu **slot;
int rc;
int i;
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
s... | static int uapi_finalize(struct uverbs_api *uapi) {
const struct uverbs_api_write_method **data;
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
struct radix_tree_iter iter;
void __rcu **slot;
int rc;
int i;
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
s... | static int uapi_finalize(struct uverbs_api *uapi) {
const struct uverbs_api_write_method **data;
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
struct radix_tree_iter iter;
void __rcu **slot;
int rc;
int i;
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
s... | static int uapi_finalize(struct uverbs_api *uapi) {
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
struct uverbs_api_ioctl_method *method_elm = rcu_dereference_protected(*slot, true);
if (uapi_key_is_ioctl_method(iter.in... | static int uapi_finalize(struct uverbs_api *uapi) {
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
struct uverbs_api_ioctl_method *method_elm = rcu_dereference_protected(*slot, true);
if (uapi_key_is_ioctl_method(iter.in... | static int uapi_finalize(struct uverbs_api *uapi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
struct uverbs_api_ioctl_metho... | static int uapi_finalize(struct uverbs_api *uapi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
struct uverbs_api_ioctl_metho... | static int uapi_finalize(struct uverbs_api *uapi) {
unsigned long max_write_ex = 0;
unsigned long max_write = 0;
radix_tree_for_each_slot (slot, &uapi->radix, &iter, 0) {
struct uverbs_api_ioctl_method *method_elm = rcu_dereference_protected(*slot, true);
if (uapi_key_is_ioctl_method(i... |
CVE-2022-3106 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/sfc/ef100_nic.c | ef100_update_stats | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
struct ef100_nic_data *nic_data = efx->nic_data;
DECLARE_BITMAP(mask, EF100_STAT_COUNT) = {};
u64 *stats ... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
struct ef100_nic_data *nic_data = efx->nic_data;
DECLARE_BITMAP(mask, EF100_STAT_COUNT) = {};
u64 *stats ... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
struct ef100_nic_data *nic_data = efx->nic_data;
DECLARE_BITMAP(mask, EF100_STAT_COUNT) = {};
u64 *stats ... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
struct ef100_nic_data *nic_data = efx->nic_data;
DECLARE_BITMAP(mask, EF100_STAT_COUNT) = {};
u64 *stats ... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
ef100_ethtool_stat_mask(mask);
efx_nic_copy_stats(efx, mc_stats);
efx_nic_update_stats(ef100_stat_desc, E... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
ef100_ethtool_stat_mask(mask);
if (!mc_stats) {
return 0;
}
efx_nic_copy_stats(efx, mc_stats)... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ef100_ethtool_stat_mask(mask);
efx_nic_copy_stats(efx, mc_s... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ef100_ethtool_stat_mask(mask);
if (!mc_stats) {
ret... | static size_t ef100_update_stats(struct efx_nic *efx, u64 *full_stats, struct rtnl_link_stats64 *core_stats) {
__le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
ef100_ethtool_stat_mask(mask);
+ if (!mc_stats) {
+ return 0;
+ }
efx_nic_copy_stats(efx, mc... |
CVE-2022-3107 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/hyperv/netvsc_drv.c | netvsc_get_ethtool_stats | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
struct net_device_context *ndc = netdev_priv(dev);
struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev);
const void *nds = &ndc->eth_stats;
const struct netvsc_stats *qstats;
struct netvsc_vf... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
struct net_device_context *ndc = netdev_priv(dev);
struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev);
const void *nds = &ndc->eth_stats;
const struct netvsc_stats *qstats;
struct netvsc_vf... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
struct net_device_context *ndc = netdev_priv(dev);
struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev);
const void *nds = &ndc->eth_stats;
const struct netvsc_stats *qstats;
struct netvsc_vf... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
struct net_device_context *ndc = netdev_priv(dev);
struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev);
const void *nds = &ndc->eth_stats;
const struct netvsc_stats *qstats;
struct netvsc_vf... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
pcpu_sum = kvmalloc_array(num_possible_cpus(), sizeof(struct netvsc_ethtool_pcpu_stats), GFP_KERNEL);
netvsc_get_pcpu_stats(dev, pcpu_sum);
for_each_present_cpu(cpu) {
struct netvsc_ethtool_pcpu_st... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
pcpu_sum = kvmalloc_array(num_possible_cpus(), sizeof(struct netvsc_ethtool_pcpu_stats), GFP_KERNEL);
if (!pcpu_sum) {
return;
}
netvsc_get_pcpu_stats(dev, pcpu_sum);
for_each_present_cpu(c... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pcpu_sum = kvmalloc_array(num_possible_cpus(), sizeof(struct netvsc_ethtool_pcpu_stats), GFP_KERNEL);
netvsc_get_pcpu_stats(dev, pcpu_sum);
for_each_presen... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pcpu_sum = kvmalloc_array(num_possible_cpus(), sizeof(struct netvsc_ethtool_pcpu_stats), GFP_KERNEL);
if (!pcpu_sum) {
return;
}
netvsc_get_pcp... | static void netvsc_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) {
pcpu_sum = kvmalloc_array(num_possible_cpus(), sizeof(struct netvsc_ethtool_pcpu_stats), GFP_KERNEL);
+ if (!pcpu_sum) {
+ return;
+ }
netvsc_get_pcpu_stats(dev, pcpu_sum);
for_each_presen... |
CVE-2022-3108 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/amd/amdkfd/kfd_crat.c | kfd_parse_subtype_iolink | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
struct kfd_topology_device *dev, *to_dev;
uint32_t id_from;
uint32_t id_to;
id_from = iolink->proximity_domain_from;
id_to = iolink->proxi... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
struct kfd_topology_device *dev, *to_dev;
uint32_t id_from;
uint32_t id_to;
id_from = iolink->proximity_domain_from;
id_to = iolink->proxi... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
struct kfd_topology_device *dev, *to_dev;
uint32_t id_from;
uint32_t id_to;
id_from = iolink->proximity_domain_from;
id_to = iolink->proxi... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
struct kfd_topology_device *dev, *to_dev;
uint32_t id_from;
uint32_t id_to;
id_from = iolink->proximity_domain_from;
id_to = iolink->proxi... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
if (props && (iolink->flags & CRAT_IOLK_FLAGS_BI_DIRECTIONAL)) {
props2 = kmemdup(props, sizeof(*props2), GFP_KERNEL);
props2->node_from =... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
if (props && (iolink->flags & CRAT_IOLK_FLAGS_BI_DIRECTIONAL)) {
props2 = kmemdup(props, sizeof(*props2), GFP_KERNEL);
if (!props2) {
... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (props && (iolink->flags & CRAT_IOLK_FLAGS_BI_DIRECTIONAL)) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (props && (iolink->flags & CRAT_IOLK_FLAGS_BI_DIRECTIONAL)) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static int kfd_parse_subtype_iolink(struct crat_subtype_iolink *iolink, struct list_head *device_list) {
struct kfd_iolink_properties *props = NULL, *props2;
if (props && (iolink->flags & CRAT_IOLK_FLAGS_BI_DIRECTIONAL)) {
props2 = kmemdup(props, sizeof(*props2), GFP_KERNEL);
+ if (!props2) {... |
CVE-2022-3110 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/staging/r8188eu/core/rtw_xmit.c | rtw_alloc_hwxmits | void rtw_alloc_hwxmits(struct adapter *padapter) {
struct hw_xmit *hwxmits;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
hwxmits = pxmitpriv->hwxmits;
if (pxm... | int rtw_alloc_hwxmits(struct adapter *padapter) {
struct hw_xmit *hwxmits;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
if (!pxmitpriv->hwxmits) {
return ... | void rtw_alloc_hwxmits(struct adapter *padapter) {
struct hw_xmit *hwxmits;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
hwxmits = pxmitpriv->hwxmits;
if (pxm... | int rtw_alloc_hwxmits(struct adapter *padapter) {
struct hw_xmit *hwxmits;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
if (!pxmitpriv->hwxmits) {
return ... | void rtw_alloc_hwxmits(struct adapter *padapter) {
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
hwxmits = pxmitpriv->hwxmits;
if (pxmitpriv->hwxmit_entry == 5) {
... | int rtw_alloc_hwxmits(struct adapter *padapter) {
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
if (!pxmitpriv->hwxmits) {
return -ENOMEM;
}
hwxmits = ... | void rtw_alloc_hwxmits(struct adapter *padapter) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
hwxmits = pxmitpriv-... | int rtw_alloc_hwxmits(struct adapter *padapter) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
if (!pxmitpriv->hwxmi... | -void rtw_alloc_hwxmits(struct adapter *padapter) {
+int rtw_alloc_hwxmits(struct adapter *padapter) {
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
+ if (!pxmitpriv... |
CVE-2022-3111 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/power/supply/wm8350_power.c | free_charger_irq | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq(wm835... | static void free_charger_irq(struct wm8350 *wm8350) {
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
wm8350_free_irq... |
CVE-2022-3112 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/staging/media/meson/vdec/esparser.c | esparser_queue | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
int ret;
struct vb2_buffer *vb = &vbuf->vb2_buf;
struct amvdec_core *core = sess->core;
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size = vb2_get_plane_payload(vb, 0);
dma_addr_... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
int ret;
struct vb2_buffer *vb = &vbuf->vb2_buf;
struct amvdec_core *core = sess->core;
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size = vb2_get_plane_payload(vb, 0);
dma_addr_... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
int ret;
struct vb2_buffer *vb = &vbuf->vb2_buf;
struct amvdec_core *core = sess->core;
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size = vb2_get_plane_payload(vb, 0);
dma_addr_... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
int ret;
struct vb2_buffer *vb = &vbuf->vb2_buf;
struct amvdec_core *core = sess->core;
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size = vb2_get_plane_payload(vb, 0);
dma_addr_... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
struct vb2_buffer *vb = &vbuf->vb2_buf;
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size = vb2_get_plane_payload(vb, 0);
dma_addr_t phy = vb2_dma_contig_plane_dma_addr(vb, 0);
u32 nu... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
struct vb2_buffer *vb = &vbuf->vb2_buf;
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size = vb2_get_plane_payload(vb, 0);
dma_addr_t phy = vb2_dma_contig_plane_dma_addr(vb, 0);
u32 nu... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct vb2_buffer *vb = &vbuf->vb2_buf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size =... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct vb2_buffer *vb = &vbuf->vb2_buf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size =... | static int esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) {
struct vb2_buffer *vb = &vbuf->vb2_buf;
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
u32 payload_size = vb2_get_plane_payload(vb, 0);
dma_addr_t phy = vb2_dma_contig_plane_dma_addr(vb, 0);
... |
CVE-2022-3112 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/staging/media/meson/vdec/vdec_helpers.c | amvdec_add_ts | void amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
struct amvdec_timestamp *new_ts;
unsigned long flags;
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
new_ts->ts = ts;
new_ts->tc = tc;
new_ts->offset = offset;
new_ts->flags = vbuf_... | int amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
struct amvdec_timestamp *new_ts;
unsigned long flags;
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
if (!new_ts) {
return -ENOMEM;
}
new_ts->ts = ts;
new_ts->tc = tc;
ne... | void amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
struct amvdec_timestamp *new_ts;
unsigned long flags;
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
new_ts->ts = ts;
new_ts->tc = tc;
new_ts->offset = offset;
new_ts->flags = vbuf_... | int amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
struct amvdec_timestamp *new_ts;
unsigned long flags;
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
if (!new_ts) {
return -ENOMEM;
}
new_ts->ts = ts;
new_ts->tc = tc;
ne... | void amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
new_ts->ts = ts;
list_add_tail(&new_ts->list, &sess->timestamps);
spin_unlock_irqrestore(&sess->ts_spinlock, flags);
}
| int amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
if (!new_ts) {
return -ENOMEM;
}
new_ts->ts = ts;
list_add_tail(&new_ts->list, &sess->timestamps);
spin_unlock_irqrestore(&sess->ts... | void amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
new_ts->ts = ts;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_add_tail(&new_ts->list, &ses... | int amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
if (!new_ts) {
return -ENOMEM;
}
new_ts->ts = ts;
/* PLACEHOLDER: DO NOT DELETE THIS ... | -void amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
+int amvdec_add_ts(struct amvdec_session *sess, u64 ts, struct v4l2_timecode tc, u32 offset, u32 vbuf_flags) {
new_ts = kzalloc(sizeof(*new_ts), GFP_KERNEL);
+ if (!new_ts) {
+ return -ENOMEM;
... |
CVE-2022-3113 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_vpu.c | mtk_vcodec_fw_vpu_init | struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
struct platform_device *fw_pdev;
struct mtk_vcodec_fw *fw;
enum rst_id rst_id;
switch (fw_use) {
case ENCODER:
rst_id = VPU_RST_ENC;
break;
case DECODER:
default:
... | struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
struct platform_device *fw_pdev;
struct mtk_vcodec_fw *fw;
enum rst_id rst_id;
switch (fw_use) {
case ENCODER:
rst_id = VPU_RST_ENC;
break;
case DECODER:
default:
... | struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
struct platform_device *fw_pdev;
struct mtk_vcodec_fw *fw;
enum rst_id rst_id;
switch (fw_use) {
case ENCODER:
rst_id = VPU_RST_ENC;
break;
case DECODER:
default:
... | struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
struct platform_device *fw_pdev;
struct mtk_vcodec_fw *fw;
enum rst_id rst_id;
switch (fw_use) {
case ENCODER:
rst_id = VPU_RST_ENC;
break;
case DECODER:
default:
... | struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
fw = devm_kzalloc(&dev->plat_dev->dev, sizeof(*fw), GFP_KERNEL);
fw->type = VPU;
return fw;
}
| struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
fw = devm_kzalloc(&dev->plat_dev->dev, sizeof(*fw), GFP_KERNEL);
if (!fw) {
return ERR_PTR(-ENOMEM);
}
fw->type = VPU;
return fw;
}
| struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fw = devm_kzalloc(&dev->plat_dev->dev, sizeof(*fw), GFP_KERNEL);
fw->type = VPU;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return fw;
}
| struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fw = devm_kzalloc(&dev->plat_dev->dev, sizeof(*fw), GFP_KERNEL);
if (!fw) {
return ERR_PTR(-ENOMEM);
}
fw->type = VPU;
/* PLACEHOLDER: D... | struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(struct mtk_vcodec_dev *dev, enum mtk_vcodec_fw_use fw_use) {
fw = devm_kzalloc(&dev->plat_dev->dev, sizeof(*fw), GFP_KERNEL);
+ if (!fw) {
+ return ERR_PTR(-ENOMEM);
+ }
fw->type = VPU;
return fw;
} |
CVE-2022-3115 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/arm/malidp_crtc.c | malidp_crtc_reset | static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
__drm_atomic_helper_crtc_reset(crtc, &state->base);
} | static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
if (state) {
__drm_atomic_helper_crtc_reset(crtc, &state->base);
} else {
__drm_ato... | static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
__drm_atomic_helper_crtc_reset(crtc, &state->base);
} | static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
if (state) {
__drm_atomic_helper_crtc_reset(crtc, &state->base);
} else {
__drm_ato... | static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
| static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
if (state) {
__drm_atomic_helper_crtc_reset(crtc, &state->base);
} else {
__drm_ato... | static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
__drm_atomic_helper_crtc_reset(crtc, &state->base);
}
| static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
if (state) {
__drm_atomic_helper_crtc_reset(crtc, &state->base);
} else {
__drm_ato... | static void malidp_crtc_reset(struct drm_crtc *crtc) {
struct malidp_crtc_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
if (crtc->state) {
malidp_crtc_destroy_state(crtc, crtc->state);
}
- __drm_atomic_helper_crtc_reset(crtc, &state->base);
+ if (state) {
+ __drm_atomic_helpe... |
CVE-2022-3169 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/nvme/host/nvme.h | nvme_reset_subsystem | static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
if (!ctrl->subsystem) {
return -ENOTTY;
}
return ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
} | static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
int ret;
if (!ctrl->subsystem) {
return -ENOTTY;
}
if (!nvme_wait_reset(ctrl)) {
return -EBUSY;
}
ret = ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
if (ret) {
return ret;
}
return nv... | static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
if (!ctrl->subsystem) {
return -ENOTTY;
}
return ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
} | static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
int ret;
if (!ctrl->subsystem) {
return -ENOTTY;
}
if (!nvme_wait_reset(ctrl)) {
return -EBUSY;
}
ret = ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
if (ret) {
return ret;
}
return nv... | static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
if (!ctrl->subsystem) {
return -ENOTTY;
}
return ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
}
| static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
int ret;
if (!ctrl->subsystem) {
return -ENOTTY;
}
if (!nvme_wait_reset(ctrl)) {
return -EBUSY;
}
ret = ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
if (ret) {
return ret;
}
return nv... | static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
if (!ctrl->subsystem) {
return -ENOTTY;
}
return ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
}
| static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
int ret;
if (!ctrl->subsystem) {
return -ENOTTY;
}
if (!nvme_wait_reset(ctrl)) {
return -EBUSY;
}
ret = ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
if (ret) {
return ret;
}
return nv... | static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) {
+ int ret;
if (!ctrl->subsystem) {
return -ENOTTY;
}
- return ctrl->ops->reg_write32(ctrl, NVME_REG_NSSR, 0x4E564D65);
+ if (!nvme_wait_reset(ctrl)) {
+ return -EBUSY;
+ }
+ ret = ctrl->ops->reg_write32(ctrl, NVME... |
CVE-2022-3202 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/jfs/inode.c | jfs_evict_inode | void jfs_evict_inode(struct inode *inode) {
struct jfs_inode_info *ji = JFS_IP(inode);
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
truncate_inode_pages_f... | void jfs_evict_inode(struct inode *inode) {
struct jfs_inode_info *ji = JFS_IP(inode);
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
struct inode *ipimap =... | void jfs_evict_inode(struct inode *inode) {
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
truncate_inode_pages_final(&inode->i_data);
if (test_cfla... | void jfs_evict_inode(struct inode *inode) {
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
struct inode *ipimap = JFS_SBI(inode->i_sb)->ipimap;
trun... | void jfs_evict_inode(struct inode *inode) {
struct jfs_inode_info *ji = JFS_IP(inode);
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
truncate_inode_pages_f... | void jfs_evict_inode(struct inode *inode) {
struct jfs_inode_info *ji = JFS_IP(inode);
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
struct inode *ipimap =... | void jfs_evict_inode(struct inode *inode) {
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
truncate_inode_pages_final(&inode->i_data);
if (test_cfla... | void jfs_evict_inode(struct inode *inode) {
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
struct inode *ipimap = JFS_SBI(inode->i_sb)->ipimap;
trun... | void jfs_evict_inode(struct inode *inode) {
struct jfs_inode_info *ji = JFS_IP(inode);
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
+ struct inode *i... |
CVE-2022-3239 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/em28xx/em28xx-cards.c | em28xx_usb_probe | static int em28xx_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_device *udev;
struct em28xx *dev = NULL;
int retval;
bool has_vendor_audio = false, has_video = false, has_dvb = false;
int i, nr, try_bulk;
const int ifnum = intf->altsetting[0].desc.bInterfaceN... | static int em28xx_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_device *udev;
struct em28xx *dev = NULL;
int retval;
bool has_vendor_audio = false, has_video = false, has_dvb = false;
int i, nr, try_bulk;
const int ifnum = intf->altsetting[0].desc.bInterfaceN... | static int em28xx_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) {
struct usb_device *udev;
struct em28xx *dev = NULL;
int retval;
bool has_vendor_audio = false, has_video = false, has_dvb = false;
int i, nr, try_bulk;
const int ifnum = interface->altsetting[0].desc.b... | static int em28xx_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) {
struct usb_device *udev;
struct em28xx *dev = NULL;
int retval;
bool has_vendor_audio = false, has_video = false, has_dvb = false;
int i, nr, try_bulk;
const int ifnum = interface->altsetting[0].desc.b... | static int em28xx_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) {
bool has_vendor_audio = false, has_video = false, has_dvb = false;
udev = usb_get_dev(interface_to_usbdev(intf));
do {
nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
if (nr >= EM28XX_MAXBOA... | static int em28xx_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) {
bool has_vendor_audio = false, has_video = false, has_dvb = false;
udev = usb_get_dev(interface_to_usbdev(intf));
do {
nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
if (nr >= EM28XX_MAXBOA... | static int em28xx_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool has_vendor_audio = false, has_video = false, has_dvb = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
udev = usb_get_dev(interface_to_usbdev(interface))... | static int em28xx_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool has_vendor_audio = false, has_video = false, has_dvb = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
udev = usb_get_dev(interface_to_usbdev(interface))... | static int em28xx_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) {
bool has_vendor_audio = false, has_video = false, has_dvb = false;
udev = usb_get_dev(interface_to_usbdev(intf));
do {
nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
if (nr >= EM28XX_... |
CVE-2022-3303 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/oss/pcm_oss.c | snd_pcm_oss_sync | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
int err = 0;
unsigned int saved_f_flags;
struct snd_pcm_substream *substream;
struct snd_pcm_runtime *runtime;
snd_pcm_format_t format;
unsigned long width;
size_t size;
substream = pcm_oss_file->streams[SNDRV_PCM_STREA... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
int err = 0;
unsigned int saved_f_flags;
struct snd_pcm_substream *substream;
struct snd_pcm_runtime *runtime;
snd_pcm_format_t format;
unsigned long width;
size_t size;
substream = pcm_oss_file->streams[SNDRV_PCM_STREA... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
int err = 0;
unsigned int saved_f_flags;
struct snd_pcm_substream *substream;
struct snd_pcm_runtime *runtime;
snd_pcm_format_t format;
unsigned long width;
size_t size;
substream = pcm_oss_file->streams[SNDRV_PCM_STREA... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
int err = 0;
unsigned int saved_f_flags;
struct snd_pcm_substream *substream;
struct snd_pcm_runtime *runtime;
snd_pcm_format_t format;
unsigned long width;
size_t size;
substream = pcm_oss_file->streams[SNDRV_PCM_STREA... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
if (substream != NULL) {
if (atomic_read(&substream->mmap_count)) {
goto __direct;
}
err = snd_pcm_oss_make_ready(substream);
if (err < 0... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
if (substream != NULL) {
if (atomic_read(&substream->mmap_count)) {
goto __direct;
}
atomic_inc(&runtime->oss.rw_ref);
if (mutex_lock_int... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
if (substream != NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (atomic_read(&substream->mmap_count)) {
... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
if (substream != NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (atomic_read(&substream->mmap_count)) {
... | static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) {
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
if (substream != NULL) {
if (atomic_read(&substream->mmap_count)) {
goto __direct;
}
- err = snd_pcm_oss_make_ready(substream);
- if ... |
CVE-2022-3344 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/svm/nested.c | svm_free_nested | void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
svm->nested.msrpm = NULL;
__free_page(virt_to_page(svm->nested.vmcb02.ptr));
svm->nested.vmcb02.ptr = NULL;
svm->nested.last_vmcb12_gpa = VALID_GPA;
svm-... | void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
if (WARN_ON_ONCE(svm->vmcb != svm->vmcb01.ptr)) {
svm_switch_vmcb(svm, &svm->vmcb01);
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
svm->nested.msrpm = NULL;
__free_page(virt_to_page(svm->neste... | void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
svm->nested.msrpm = NULL;
__free_page(virt_to_page(svm->nested.vmcb02.ptr));
svm->nested.vmcb02.ptr = NULL;
svm->nested.last_vmcb12_gpa = VALID_GPA;
svm-... | void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
if (WARN_ON_ONCE(svm->vmcb != svm->vmcb01.ptr)) {
svm_switch_vmcb(svm, &svm->vmcb01);
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
svm->nested.msrpm = NULL;
__free_page(virt_to_page(svm->neste... | void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
}
| void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
if (WARN_ON_ONCE(svm->vmcb != svm->vmcb01.ptr)) {
svm_switch_vmcb(svm, &svm->vmcb01);
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
}
| void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
if (WARN_ON_ONCE(svm->vmcb != svm->vmcb01.ptr)) {
svm_switch_vmcb(svm, &svm->vmcb01);
}
svm_vcpu_free_msrpm(svm->nested.msrpm);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void svm_free_nested(struct vcpu_svm *svm) {
if (!svm->nested.initialized) {
return;
}
+ if (WARN_ON_ONCE(svm->vmcb != svm->vmcb01.ptr)) {
+ svm_switch_vmcb(svm, &svm->vmcb01);
+ }
svm_vcpu_free_msrpm(svm->nested.msrpm);
} |
CVE-2022-33740 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netfront.c | xennet_alloc_one_rx_buffer | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
struct sk_buff *skb;
struct page *page;
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = alloc_page(GFP... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
struct sk_buff *skb;
struct page *page;
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = alloc_page(GFP... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
struct sk_buff *skb;
struct page *page;
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = page_pool_dev_... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
struct sk_buff *skb;
struct page *page;
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = page_pool_allo... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = alloc_page(GFP_ATOMIC | __GFP_NOWARN);
if (!page) {
... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = alloc_page(GFP_ATOMIC | __GFP_NOWARN | __GFP_ZERO);
if (!p... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = page_pool_de... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
page = page_pool_al... | static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) {
skb = __netdev_alloc_skb(queue->info->netdev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb)) {
return NULL;
}
- page = alloc_page(GFP_ATOMIC | __GFP_NOWARN);
+ page = alloc... |
CVE-2022-33741 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netfront.c | talk_to_netback | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
const char *message;
struct xenbus_transaction xbt;
int err;
unsigned int feature_split_evtchn;
unsigned int i = 0;
unsigned int max_queues = 0;
struct netfront_queue *queue = NULL;
unsigned int num_queue... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
const char *message;
struct xenbus_transaction xbt;
int err;
unsigned int feature_split_evtchn;
unsigned int i = 0;
unsigned int max_queues = 0;
struct netfront_queue *queue = NULL;
unsigned int num_queue... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
const char *message;
struct xenbus_transaction xbt;
int err;
unsigned int feature_split_evtchn;
unsigned int i = 0;
unsigned int max_queues = 0;
struct netfront_queue *queue = NULL;
unsigned int num_queue... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
const char *message;
struct xenbus_transaction xbt;
int err;
unsigned int feature_split_evtchn;
unsigned int i = 0;
unsigned int max_queues = 0;
struct netfront_queue *queue = NULL;
unsigned int num_queue... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
unsigned int num_queues = 1;
info->netdev->irq = 0;
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, "multi-queue-max-queues", "%u", &max_queues);
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, "feature-split-event... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
unsigned int num_queues = 1;
unsigned int trusted;
info->netdev->irq = 0;
err = xenbus_scanf(XBT_NIL, dev->nodename, "trusted", "%u", &trusted);
if (err < 0) {
trusted = 1;
}
info->bounce = !xennet_tr... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int num_queues = 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
info->netdev->irq = 0;
max_queues = xenbus_read_unsigned(info->xbdev->otherend, "multi-queue-ma... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int num_queues = 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
info->netdev->irq = 0;
info->bounce = !xennet_trusted || !xenbus_read_unsigned(dev->nodename, "... | static int talk_to_netback(struct xenbus_device *dev, struct netfront_info *info) {
unsigned int num_queues = 1;
+ unsigned int trusted;
info->netdev->irq = 0;
+ err = xenbus_scanf(XBT_NIL, dev->nodename, "trusted", "%u", &trusted);
+ if (err < 0) {
+ trusted = 1;
+ }
+ info->bounce = !... |
CVE-2022-33741 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netfront.c | xennet_connect | static int xennet_connect(struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
unsigned int num_queues = 0;
int err;
unsigned int feature_rx_copy;
unsigned int j = 0;
struct netfront_queue *queue = NULL;
err = xenbus_scanf(XBT_NIL, np->xbdev->otherend, "feature-rx-copy", "%... | static int xennet_connect(struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
unsigned int num_queues = 0;
int err;
unsigned int feature_rx_copy;
unsigned int j = 0;
struct netfront_queue *queue = NULL;
err = xenbus_scanf(XBT_NIL, np->xbdev->otherend, "feature-rx-copy", "%... | static int xennet_connect(struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
unsigned int num_queues = 0;
int err;
unsigned int j = 0;
struct netfront_queue *queue = NULL;
if (!xenbus_read_unsigned(np->xbdev->otherend, "feature-rx-copy", 0)) {
dev_info(&dev->dev, "bac... | static int xennet_connect(struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
unsigned int num_queues = 0;
int err;
unsigned int j = 0;
struct netfront_queue *queue = NULL;
if (!xenbus_read_unsigned(np->xbdev->otherend, "feature-rx-copy", 0)) {
dev_info(&dev->dev, "bac... | static int xennet_connect(struct net_device *dev) {
if (err) {
return err;
}
num_queues = dev->real_num_tx_queues;
}
| static int xennet_connect(struct net_device *dev) {
if (err) {
return err;
}
if (np->bounce) {
dev_info(&np->xbdev->dev, "bouncing transmitted data to zeroed pages\n");
}
num_queues = dev->real_num_tx_queues;
}
| static int xennet_connect(struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
return err;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
num_queues = dev->real_num_tx_queues;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int xennet_connect(struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
return err;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (np->bounce) {
dev_info(&np->xbdev->dev, "bouncing transmitted data to zeroed pages\n");
}
num_queues = ... | static int xennet_connect(struct net_device *dev) {
if (err) {
return err;
}
+ if (np->bounce) {
+ dev_info(&np->xbdev->dev, "bouncing transmitted data to zeroed pages\n");
+ }
num_queues = dev->real_num_tx_queues;
} |
CVE-2022-33741 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netfront.c | xennet_start_xmit | static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
struct netfront_stats *tx_stats = this_cpu_ptr(np->tx_stats);
struct xen_netif_tx_request *first_tx;
unsigned int i;
int notify;
int slots;
struct page *page;
unsigned... | static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
struct netfront_stats *tx_stats = this_cpu_ptr(np->tx_stats);
struct xen_netif_tx_request *first_tx;
unsigned int i;
int notify;
int slots;
struct page *page;
unsigned... | static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
struct netfront_stats *tx_stats = this_cpu_ptr(np->tx_stats);
struct xen_netif_tx_request *first_tx;
unsigned int i;
int notify;
int slots;
struct page *page;
... | static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
struct netfront_stats *tx_stats = this_cpu_ptr(np->tx_stats);
struct xen_netif_tx_request *first_tx;
unsigned int i;
int notify;
int slots;
struct page *page;
... | static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
queue_index = skb_get_queue_mapping(skb);
slots = xennet_count_skb_slots(skb);
if (unlikely(slots > MAX_XEN_SKB_FRAGS + 1)) {
if (skb_linearize(skb)) {
goto drop;
... | static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
queue_index = skb_get_queue_mapping(skb);
slots = xennet_count_skb_slots(skb);
if (unlikely(slots > MAX_XEN_SKB_FRAGS + 1)) {
if (skb_linearize(skb)) {
goto drop;
... | static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
queue_index = skb_get_queue_mapping(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
slots = xennet_count_skb_slots(skb);
... | static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
queue_index = skb_get_queue_mapping(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
slots = xennet_count_skb_slots(skb);
... | static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct netfront_info *np = netdev_priv(dev);
queue_index = skb_get_queue_mapping(skb);
slots = xennet_count_skb_slots(skb);
if (unlikely(slots > MAX_XEN_SKB_FRAGS + 1)) {
if (skb_linearize(skb)) {
goto... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | blkfront_gather_backend_features | static void blkfront_gather_backend_features(struct blkfront_info *info) {
int err;
int barrier, flush, discard, persistent;
unsigned int indirect_segments;
info->feature_flush = 0;
info->feature_fua = 0;
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, "feature-barrier", "%d", &barrier);
... | static void blkfront_gather_backend_features(struct blkfront_info *info) {
int err;
int barrier, flush, discard, persistent;
unsigned int indirect_segments;
info->feature_flush = 0;
info->feature_fua = 0;
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, "feature-barrier", "%d", &barrier);
... | static void blkfront_gather_backend_features(struct blkfront_info *info) {
unsigned int indirect_segments;
info->feature_flush = 0;
info->feature_fua = 0;
if (xenbus_read_unsigned(info->xbdev->otherend, "feature-barrier", 0)) {
info->feature_flush = 1;
info->feature_fua = 1;
}
if... | static void blkfront_gather_backend_features(struct blkfront_info *info) {
unsigned int indirect_segments;
info->feature_flush = 0;
info->feature_fua = 0;
if (xenbus_read_unsigned(info->xbdev->otherend, "feature-barrier", 0)) {
info->feature_flush = 1;
info->feature_fua = 1;
}
if... | static void blkfront_gather_backend_features(struct blkfront_info *info) {
if (err <= 0) {
info->feature_persistent = 0;
} else {
info->feature_persistent = persistent;
}
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, "feature-max-indirect-segments", "%u", &indirect_segments);
}
| static void blkfront_gather_backend_features(struct blkfront_info *info) {
if (err <= 0) {
info->feature_persistent = 0;
} else {
info->feature_persistent = persistent;
}
if (info->feature_persistent) {
info->bounce = true;
}
err = xenbus_scanf(XBT_NIL, info->xbdev->other... | static void blkfront_gather_backend_features(struct blkfront_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (info->feature_persistent) {
info->feature_persistent = !!xenbus_read_unsigned(info->xbdev->otherend, "feature-persistent", 0);
}
indirect_segments = xenbus_read_unsigned(i... | static void blkfront_gather_backend_features(struct blkfront_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (info->feature_persistent) {
info->feature_persistent = !!xenbus_read_unsigned(info->xbdev->otherend, "feature-persistent", 0);
}
if (info->feature_persistent) {
in... | static void blkfront_gather_backend_features(struct blkfront_info *info) {
if (err <= 0) {
info->feature_persistent = 0;
} else {
info->feature_persistent = persistent;
}
+ if (info->feature_persistent) {
+ info->bounce = true;
+ }
err = xenbus_scanf(XBT_NIL, info->xb... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | blkfront_setup_indirect | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
unsigned int psegs, grants;
int err, i;
struct blkfront_info *info = rinfo->dev_info;
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKIF_MAX_SEGMENTS_PER_REQUEST;
} else {
... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
unsigned int psegs, grants;
int err, i;
struct blkfront_info *info = rinfo->dev_info;
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKIF_MAX_SEGMENTS_PER_REQUEST;
} else {
... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
unsigned int psegs, grants, memflags;
int err, i;
struct blkfront_info *info = rinfo->dev_info;
memflags = memalloc_noio_save();
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKIF_MAX... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
unsigned int psegs, grants, memflags;
int err, i;
struct blkfront_info *info = rinfo->dev_info;
memflags = memalloc_noio_save();
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKIF_MAX... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKIF_MAX_SEGMENTS_PER_REQUEST;
} else {
grants = GRANTS_PER_PSEG;
}
} e... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKIF_MAX_SEGMENTS_PER_REQUEST;
} else {
grants = GRANTS_PER_PSEG;
}
} e... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKI... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKI... | static int blkfront_setup_indirect(struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
if (info->max_indirect_segments == 0) {
if (!HAS_EXTRA_REQ) {
grants = BLKIF_MAX_SEGMENTS_PER_REQUEST;
} else {
grants = GRANTS_PER_PSEG;
}... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | blkif_completion | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
int i = 0;
struct scatterlist *sg;
int num_sg, num_grant;
struct blkfront_info *info = rinfo->dev_info;
struct blk_shadow *s = &rinfo->shadow[*id];
struct copy_from_grant data = {
... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
int i = 0;
struct scatterlist *sg;
int num_sg, num_grant;
struct blkfront_info *info = rinfo->dev_info;
struct blk_shadow *s = &rinfo->shadow[*id];
struct copy_from_grant data = {
... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
int i = 0;
struct scatterlist *sg;
int num_sg, num_grant;
struct blkfront_info *info = rinfo->dev_info;
struct blk_shadow *s = &rinfo->shadow[*id];
struct copy_from_grant data = {
... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
int i = 0;
struct scatterlist *sg;
int num_sg, num_grant;
struct blkfront_info *info = rinfo->dev_info;
struct blk_shadow *s = &rinfo->shadow[*id];
struct copy_from_grant data = {
... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
struct blkfront_info *info = rinfo->dev_info;
num_sg = s->num_sg;
if (bret->operation == BLKIF_OP_READ && info->feature_persistent) {
for_each_sg(s->sg, sg, num_sg, i) {
}
}
... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
struct blkfront_info *info = rinfo->dev_info;
num_sg = s->num_sg;
if (bret->operation == BLKIF_OP_READ && info->bounce) {
for_each_sg(s->sg, sg, num_sg, i) {
}
}
for (i = 0... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
num_sg = s->num_sg;
if (bret->operation == BLKIF_O... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
num_sg = s->num_sg;
if (bret->operation == BLKIF_O... | static int blkif_completion(unsigned long *id, struct blkfront_ring_info *rinfo, struct blkif_response *bret) {
struct blkfront_info *info = rinfo->dev_info;
num_sg = s->num_sg;
- if (bret->operation == BLKIF_OP_READ && info->feature_persistent) {
+ if (bret->operation == BLKIF_OP_READ && info->bounce)... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | blkif_free_ring | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
struct grant *persistent_gnt, *n;
struct blkfront_info *info = rinfo->dev_info;
int i, j, segs;
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info->feature_persistent);
list_for_ea... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
struct grant *persistent_gnt, *n;
struct blkfront_info *info = rinfo->dev_info;
int i, j, segs;
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info->bounce);
list_for_each_entry_saf... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
struct grant *persistent_gnt, *n;
struct blkfront_info *info = rinfo->dev_info;
int i, j, segs;
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info->feature_persistent);
list_for_ea... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
struct grant *persistent_gnt, *n;
struct blkfront_info *info = rinfo->dev_info;
int i, j, segs;
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info->bounce);
list_for_each_entry_saf... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info->feature_persistent);
list_for_each_entry_safe(indirect_page, n, &rinfo->indirect_pages, lr... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info->bounce);
list_for_each_entry_safe(indirect_page, n, &rinfo->indirect_pages, lru) {
... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
BUG_ON(info... | static void blkif_free_ring(struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
if (!list_empty(&rinfo->indirect_pages)) {
struct page *indirect_page, *n;
- BUG_ON(info->feature_persistent);
+ BUG_ON(info->bounce);
list_for_each_entry_safe(indirec... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | blkif_queue_rw_req | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
struct blkif_request *ring_req, *extra_ring_req = NULL;
struct blkif_request *final_ring_req, *final_extra_ring_req = NULL;
unsigned long id, extra_id = NO_ASSOCIATED_ID;
... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
struct blkif_request *ring_req, *extra_ring_req = NULL;
struct blkif_request *final_ring_req, *final_extra_ring_req = NULL;
unsigned long id, extra_id = NO_ASSOCIATED_ID;
... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
struct blkif_request *ring_req, *extra_ring_req = NULL;
struct blkif_request *final_ring_req, *final_extra_ring_req = NULL;
unsigned long id, extra_id = NO_ASSOCIATED_ID;
... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
struct blkif_request *ring_req, *extra_ring_req = NULL;
struct blkif_request *final_ring_req, *final_extra_ring_req = NULL;
unsigned long id, extra_id = NO_ASSOCIATED_ID;
... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
bool require_extra_req = false;
struct setup_rw_req setup = {
.grant_idx = 0, .segments = NULL, .rinfo = rinfo, .need_copy = rq_data_dir(req) && info->feature_persiste... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
bool require_extra_req = false;
struct setup_rw_req setup = {
.grant_idx = 0, .segments = NULL, .rinfo = rinfo, .need_copy = rq_data_dir(req) && info->bounce,
};
... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool require_extra_req = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct setup_rw_req setup = {
.gran... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool require_extra_req = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct setup_rw_req setup = {
.gran... | static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *rinfo) {
struct blkfront_info *info = rinfo->dev_info;
bool require_extra_req = false;
struct setup_rw_req setup = {
- .grant_idx = 0, .segments = NULL, .rinfo = rinfo, .need_copy = rq_data_dir(req) && info->feature_per... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | fill_grant_buffer | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
struct blkfront_info *info = rinfo->dev_info;
struct page *granted_page;
struct grant *gnt_list_entry, *n;
int i = 0;
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_en... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
struct blkfront_info *info = rinfo->dev_info;
struct page *granted_page;
struct grant *gnt_list_entry, *n;
int i = 0;
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_en... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
struct blkfront_info *info = rinfo->dev_info;
struct page *granted_page;
struct grant *gnt_list_entry, *n;
int i = 0;
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_en... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
struct blkfront_info *info = rinfo->dev_info;
struct page *granted_page;
struct grant *gnt_list_entry, *n;
int i = 0;
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_en... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_entry) {
goto out_of_memory;
}
if (info->feature_persistent) {
granted_page = alloc_page(GFP_NOI... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_entry) {
goto out_of_memory;
}
if (info->bounce) {
granted_page = alloc_page(GFP_NOIO | __GFP_ZE... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_entry) {
goto out_of_memory;
}
if (info->feature_persisten... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_entry) {
goto out_of_memory;
}
if (info->bounce) {
... | static int fill_grant_buffer(struct blkfront_ring_info *rinfo, int num) {
while (i < num) {
gnt_list_entry = kzalloc(sizeof(struct grant), GFP_NOIO);
if (!gnt_list_entry) {
goto out_of_memory;
}
- if (info->feature_persistent) {
+ if (info->bounce) {
... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | get_grant | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_e... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_e... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_e... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_e... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (info->feature_persistent) {
grant_foreign_access(gnt_list_entry, info);
} else {
gnttab_grant_foreign_access_ref(gnt_list_entry->gref, in... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (info->bounce) {
grant_foreign_access(gnt_list_entry, info);
} else {
gnttab_grant_foreign_access_ref(gnt_list_entry->gref, info->xbdev->o... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (info->feature_persistent) {
grant_foreign_access(gnt_list_entry, info);
} else {
gnttab... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (info->bounce) {
grant_foreign_access(gnt_list_entry, info);
} else {
gnttab_grant_forei... | static struct grant *get_grant(grant_ref_t *gref_head, unsigned long gfn, struct blkfront_ring_info *rinfo) {
BUG_ON(gnt_list_entry->gref == -ENOSPC);
- if (info->feature_persistent) {
+ if (info->bounce) {
grant_foreign_access(gnt_list_entry, info);
} else {
gnttab_grant_foreign_acce... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | get_indirect_grant | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_entry->gref... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_entry->gref... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_entry->gref... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
if (gnt_list_entry->gref != GRANT_VALID_REF) {
return gnt_list_entry;
}
gnt_list_entry->gref... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (!info->feature_persistent) {
struct page *indirect_... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (!info->bounce) {
struct page *indirect_page;
... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (!info->fe... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BUG_ON(gnt_list_entry->gref == -ENOSPC);
if (!info->bo... | static struct grant *get_indirect_grant(grant_ref_t *gref_head, struct blkfront_ring_info *rinfo) {
struct grant *gnt_list_entry = get_free_grant(rinfo);
struct blkfront_info *info = rinfo->dev_info;
BUG_ON(gnt_list_entry->gref == -ENOSPC);
- if (!info->feature_persistent) {
+ if (!info->bounce) {... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | talk_to_blkback | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
const char *message = NULL;
struct xenbus_transaction xbt;
int err;
unsigned int i, max_page_order = 0;
unsigned int ring_page_order = 0;
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, "max-ring-page-order", ... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
const char *message = NULL;
struct xenbus_transaction xbt;
int err;
unsigned int i, max_page_order = 0;
unsigned int ring_page_order = 0;
unsigned int trusted;
err = xenbus_scanf(XBT_NIL, dev->nodename, "trus... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
const char *message = NULL;
struct xenbus_transaction xbt;
int err;
unsigned int i, max_page_order;
unsigned int ring_page_order;
struct blkfront_ring_info *rinfo;
if (!info) {
return -ENODEV;
}
... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
const char *message = NULL;
struct xenbus_transaction xbt;
int err;
unsigned int i, max_page_order;
unsigned int ring_page_order;
struct blkfront_ring_info *rinfo;
if (!info) {
return -ENODEV;
}
... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
unsigned int ring_page_order = 0;
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend, "max-ring-page-order", "%u", &max_page_order);
if (err != 1) {
} else {
}
for (i = 0; i < info->nr_rings; i++) {
err = ... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
unsigned int ring_page_order = 0;
unsigned int trusted;
err = xenbus_scanf(XBT_NIL, dev->nodename, "trusted", "%u", &trusted);
if (err < 0) {
trusted = 1;
}
info->bounce = !xen_blkif_trusted || !trusted;
... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int i, max_page_order;
unsigned int ring_page_order;
struct blkfront_ring_info *rinfo;
if (!info) {
return -ENODEV;
}
max_page_order = xenbus_rea... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int i, max_page_order;
unsigned int ring_page_order;
struct blkfront_ring_info *rinfo;
if (!info) {
return -ENODEV;
}
info->bounce = !xen_blkif_t... | static int talk_to_blkback(struct xenbus_device *dev, struct blkfront_info *info) {
unsigned int ring_page_order = 0;
+ unsigned int trusted;
+ err = xenbus_scanf(XBT_NIL, dev->nodename, "trusted", "%u", &trusted);
+ if (err < 0) {
+ trusted = 1;
+ }
+ info->bounce = !xen_blkif_trusted || !t... |
CVE-2022-33742 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkfront.c | xlvbd_flush | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disabled;",... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disab... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disabled;",... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disab... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disabled;",... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disab... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disabled;",... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
pr_info("blkfront: %s: %s %s %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disab... | static void xlvbd_flush(struct blkfront_info *info) {
blk_queue_write_cache(info->rq, info->feature_flush ? true : false, info->feature_fua ? true : false);
- pr_info("blkfront: %s: %s %s %s %s %s\n", info->gd->disk_name, flush_info(info), "persistent grants:", info->feature_persistent ? "enabled;" : "disabled... |
CVE-2022-33743 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netfront.c | xennet_get_responses | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
int max = XEN_NETIF_NR_SLOTS_M + (rx->status <= RX_COPY_THRESHOLD);
RG_IDX cons = queue->rx.rsp... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
int max = XEN_NETIF_NR_SLOTS_M + (rx->status <= RX_COPY_THRESHOLD);
RG_IDX cons = queue->rx.rsp... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
int max = XEN_NETIF_NR_SLOTS_M + (rx->status <= RX_COPY_THRESHOLD);
RG_IDX cons = queue->rx.rsp... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
int max = XEN_NETIF_NR_SLOTS_M + (rx->status <= RX_COPY_THRESHOLD);
RG_IDX cons = queue->rx.rsp... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
RG_IDX cons = queue->rx.rsp_cons;
struct sk_buff *skb = xennet_get_rx_skb(queue, cons);
str... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
RG_IDX cons = queue->rx.rsp_cons;
struct sk_buff *skb = xennet_get_rx_skb(queue, cons);
str... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
RG_IDX cons = queue->rx.rsp_cons;
struct sk_b... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
RG_IDX cons = queue->rx.rsp_cons;
struct sk_b... | static int xennet_get_responses(struct netfront_queue *queue, struct netfront_rx_info *rinfo, RG_IDX rp, struct sk_buff_head *list, bool *need_xdp_flush) {
struct xen_netif_rx_response *rx = &rinfo->rx, rx_local;
RG_IDX cons = queue->rx.rsp_cons;
struct sk_buff *skb = xennet_get_rx_skb(queue, cons);
... |
CVE-2022-33744 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/arm/xen/p2m.c | __pfn_to_mfn | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n = phys_to_mach.rb_node;
struct xen_p2m_entry *entry;
unsigned long irqflags;
read_lock_irqsave(&p2m_lock, irqflags);
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->pfn <= pfn && entry->p... | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n;
struct xen_p2m_entry *entry;
unsigned long irqflags;
read_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->pfn <= pfn && e... | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n = phys_to_mach.rb_node;
struct xen_p2m_entry *entry;
unsigned long irqflags;
read_lock_irqsave(&p2m_lock, irqflags);
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->pfn <= pfn && entry->p... | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n;
struct xen_p2m_entry *entry;
unsigned long irqflags;
read_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->pfn <= pfn && e... | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n = phys_to_mach.rb_node;
struct xen_p2m_entry *entry;
read_lock_irqsave(&p2m_lock, irqflags);
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->pfn <= pfn && entry->pfn + entry->nr_pages > pfn) ... | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n;
struct xen_p2m_entry *entry;
read_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->pfn <= pfn && entry->pfn + entry->nr_pages ... | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n = phys_to_mach.rb_node;
struct xen_p2m_entry *entry;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
read_lock_irqsave(&p2m_lock, irqflags);
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (entry->... | unsigned long __pfn_to_mfn(unsigned long pfn) {
struct rb_node *n;
struct xen_p2m_entry *entry;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
read_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
if (... | unsigned long __pfn_to_mfn(unsigned long pfn) {
- struct rb_node *n = phys_to_mach.rb_node;
+ struct rb_node *n;
struct xen_p2m_entry *entry;
read_lock_irqsave(&p2m_lock, irqflags);
+ n = phys_to_mach.rb_node;
while (n) {
entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys);
... |
CVE-2022-33744 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/arm/xen/p2m.c | __set_phys_to_machine_multi | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
int rc;
unsigned long irqflags;
struct xen_p2m_entry *p2m_entry;
struct rb_node *n = phys_to_mach.rb_node;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
while (n)... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
int rc;
unsigned long irqflags;
struct xen_p2m_entry *p2m_entry;
struct rb_node *n;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
int rc;
unsigned long irqflags;
struct xen_p2m_entry *p2m_entry;
struct rb_node *n = phys_to_mach.rb_node;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
while (n)... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
int rc;
unsigned long irqflags;
struct xen_p2m_entry *p2m_entry;
struct rb_node *n;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
struct xen_p2m_entry *p2m_entry;
struct rb_node *n = phys_to_mach.rb_node;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
while (n) {
p2m_entry = rb_entry(n, s... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
struct xen_p2m_entry *p2m_entry;
struct rb_node *n;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_node;
while (n) {
p2m_entry = rb... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct xen_p2m_entry *p2m_entry;
struct rb_node *n = phys_to_mach.rb_node;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct xen_p2m_entry *p2m_entry;
struct rb_node *n;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
n = phys_to_mach.rb_no... | bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages) {
struct xen_p2m_entry *p2m_entry;
- struct rb_node *n = phys_to_mach.rb_node;
+ struct rb_node *n;
if (mfn == VALID_P2M_ENTRY) {
write_lock_irqsave(&p2m_lock, irqflags);
+ n = phys_to_mach.rb... |
CVE-2022-33981 | 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 ret;
int size;
union inparam {
struct floppy_struct g;
struct format_descr f;
str... | 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 ret;
int size;
union inparam {
struct floppy_struct g;
struct format_descr f;
str... | 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;
if (cmd == CDROMEJECT || cmd == 0x6470) {
cmd = FDEJECT;
}
if (!((cmd & 0xff0... | 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 ret;
if (cmd == CDROMEJECT || cmd == 0x6470) {
cmd = FDEJECT;
}
if (!((cmd & 0xff00) == 0x020... | 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;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd == CDROMEJECT || cmd == 0x6470) {
... | 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 ret;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd == CDROMEJECT || cmd == 0x6470) {
/* PLACE... | 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;
if (cmd == CDROMEJECT || cmd == 0x6470) {
cmd = FDEJECT;
}
if (!((cm... |
CVE-2022-3424 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/misc/sgi-gru/grufault.c | gru_handle_user_call_os | int gru_handle_user_call_os(unsigned long cb) {
struct gru_tlb_fault_handle *tfh;
struct gru_thread_state *gts;
void *cbk;
int ucbnum, cbrnum, ret = -EVAL;
STAT(call_os);
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
... | int gru_handle_user_call_os(unsigned long cb) {
struct gru_tlb_fault_handle *tfh;
struct gru_thread_state *gts;
void *cbk;
int ucbnum, cbrnum, ret = -EVAL;
STAT(call_os);
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
... | int gru_handle_user_call_os(unsigned long cb) {
struct gru_tlb_fault_handle *tfh;
struct gru_thread_state *gts;
void *cbk;
int ucbnum, cbrnum, ret = -EVAL;
STAT(call_os);
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
... | int gru_handle_user_call_os(unsigned long cb) {
struct gru_tlb_fault_handle *tfh;
struct gru_thread_state *gts;
void *cbk;
int ucbnum, cbrnum, ret = -EVAL;
STAT(call_os);
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
... | int gru_handle_user_call_os(unsigned long cb) {
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
}
gts = gru_find_lock_gts(cb);
if (!gts) {
return -EVAL;
}
gru_dbg(grudev, "address 0x%lx, gid %d, gts 0x%p\n", cb, ... | int gru_handle_user_call_os(unsigned long cb) {
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
}
again:
gts = gru_find_lock_gts(cb);
if (!gts) {
return -EVAL;
}
gru_dbg(grudev, "address 0x%lx, gid %d, gts 0x%p\n... | int gru_handle_user_call_os(unsigned long cb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
}
gts = gru_find_lock_gts(cb);
if (!gts) {
return -EVAL;
}
gru_dbg... | int gru_handle_user_call_os(unsigned long cb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
}
again:
gts = gru_find_lock_gts(cb);
if (!gts) {
return -EVAL;
}
... | int gru_handle_user_call_os(unsigned long cb) {
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB) {
return -EVAL;
}
+again:
gts = gru_find_lock_gts(cb);
if (!gts) {
return -EVAL;
}
gru_dbg(grudev, "address 0x%lx, gid %d,... |
CVE-2022-3424 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/misc/sgi-gru/grufault.c | gru_set_context_option | int gru_set_context_option(unsigned long arg) {
struct gru_thread_state *gts;
struct gru_set_context_option_req req;
int ret = 0;
STAT(set_context_option);
if (copy_from_user(&req, (void *)arg, sizeof(req))) {
return -EFAULT;
}
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req... | int gru_set_context_option(unsigned long arg) {
struct gru_thread_state *gts;
struct gru_set_context_option_req req;
int ret = 0;
STAT(set_context_option);
if (copy_from_user(&req, (void *)arg, sizeof(req))) {
return -EFAULT;
}
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req... | int gru_set_context_option(unsigned long arg) {
struct gru_thread_state *gts;
struct gru_set_context_option_req req;
int ret = 0;
STAT(set_context_option);
if (copy_from_user(&req, (void *)arg, sizeof(req))) {
return -EFAULT;
}
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req... | int gru_set_context_option(unsigned long arg) {
struct gru_thread_state *gts;
struct gru_set_context_option_req req;
int ret = 0;
STAT(set_context_option);
if (copy_from_user(&req, (void *)arg, sizeof(req))) {
return -EFAULT;
}
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req... | int gru_set_context_option(unsigned long arg) {
int ret = 0;
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req.op, req.gseg, req.val1);
gts = gru_find_lock_gts(req.gseg);
if (!gts) {
gts = gru_alloc_locked_gts(req.gseg);
if (IS_ERR(gts)) {
return PTR_ERR(gts);
... | int gru_set_context_option(unsigned long arg) {
int ret = 0;
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req.op, req.gseg, req.val1);
gts = gru_find_lock_gts(req.gseg);
if (!gts) {
gts = gru_alloc_locked_gts(req.gseg);
if (IS_ERR(gts)) {
return PTR_ERR(gts);
... | int gru_set_context_option(unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req.op, req.gseg, req.val1);
gts = gru_find_lock_gts(req.gseg);
if (!gts) {
gts = ... | int gru_set_context_option(unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req.op, req.gseg, req.val1);
gts = gru_find_lock_gts(req.gseg);
if (!gts) {
gts = ... | int gru_set_context_option(unsigned long arg) {
int ret = 0;
gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req.op, req.gseg, req.val1);
gts = gru_find_lock_gts(req.gseg);
if (!gts) {
gts = gru_alloc_locked_gts(req.gseg);
if (IS_ERR(gts)) {
return PTR_ERR(gts);
... |
CVE-2022-3424 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/misc/sgi-gru/grumain.c | gru_check_context_placement | void gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
gru_unload_context(gts, 1);
}... | int gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
int ret = 0;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return ret;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
ret = -EVAL;
... | void gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
gru_unload_context(gts, 1);
}... | int gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
int ret = 0;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return ret;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
ret = -EVAL;
... | void gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
gru_unload_context(gts, 1);
}... | int gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
int ret = 0;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return ret;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
ret = -EVAL;
... | void gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
gru_unload_context(gts, 1);
}... | int gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
int ret = 0;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
return ret;
}
if (!gru_check_chiplet_assignment(gru, gts)) {
STAT(check_context_unload);
ret = -EVAL;
... | -void gru_check_context_placement(struct gru_thread_state *gts) {
+int gru_check_context_placement(struct gru_thread_state *gts) {
struct gru_state *gru;
+ int ret = 0;
gru = gts->ts_gru;
if (!gru || gts->ts_tgid_owner != current->tgid) {
- return;
+ return ret;
}
if (!gru_chec... |
CVE-2022-3424 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/misc/sgi-gru/grumain.c | gru_fault | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct gru_thread_state *gts;
unsigned long paddr, vaddr;
unsigned long expires;
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
STAT(nopfn);
gts = gr... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct gru_thread_state *gts;
unsigned long paddr, vaddr;
unsigned long expires;
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
STAT(nopfn);
gts = gr... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct gru_thread_state *gts;
unsigned long paddr, vaddr;
unsigned long expires;
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
STAT(nopfn);
gts = gr... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct gru_thread_state *gts;
unsigned long paddr, vaddr;
unsigned long expires;
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
STAT(nopfn);
gts = gr... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
gts = gru_find_thread_state(vma, TSID(vaddr, vma));
if (!gts) {
return VM_FAULT_SIGBUS;
}
again:
m... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
gts = gru_find_thread_state(vma, TSID(vaddr, vma));
if (!gts) {
return VM_FAULT_SIGBUS;
}
again:
m... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gts = gru_find_thr... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gts = gru_find_thr... | vm_fault_t gru_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
vaddr = vmf->address;
gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", vma, vaddr, GSEG_BASE(vaddr));
gts = gru_find_thread_state(vma, TSID(vaddr, vma));
if (!gts) {
return VM_FAULT_SIGBUS;
}
aga... |
CVE-2022-34494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/rpmsg/virtio_rpmsg_bus.c | rpmsg_virtio_add_ctrl_dev | static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
struct virtproc_info *vrp = vdev->priv;
struct virtio_rpmsg_channel *vch;
struct rpmsg_device *rpdev_ctrl;
int err = 0;
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
... | static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
struct virtproc_info *vrp = vdev->priv;
struct virtio_rpmsg_channel *vch;
struct rpmsg_device *rpdev_ctrl;
int err = 0;
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
... | static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
struct virtproc_info *vrp = vdev->priv;
struct virtio_rpmsg_channel *vch;
struct rpmsg_device *rpdev_ctrl;
int err = 0;
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
... | static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
struct virtproc_info *vrp = vdev->priv;
struct virtio_rpmsg_channel *vch;
struct rpmsg_device *rpdev_ctrl;
int err = 0;
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
... | static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
if (err) {
kfree(vch);
return ERR_PTR(err);
}
}
| static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
if (err) {
return ERR_PTR(err);
}
}
| static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
kfree(vch);
... | static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
return ERR_PT... | static struct rpmsg_device *rpmsg_virtio_add_ctrl_dev(struct virtio_device *vdev) {
vch = kzalloc(sizeof(*vch), GFP_KERNEL);
if (!vch) {
return ERR_PTR(-ENOMEM);
}
if (err) {
- kfree(vch);
return ERR_PTR(err);
}
} |
CVE-2022-34495 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/rpmsg/virtio_rpmsg_bus.c | rpmsg_probe | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
struct virtqueue *vqs[2];
struct virtproc_info *vrp;
struct virtio_rpmsg_channel *vch = NULL;
struct rpmsg_device *rpdev... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
struct virtqueue *vqs[2];
struct virtproc_info *vrp;
struct virtio_rpmsg_channel *vch = NULL;
struct rpmsg_device *rpdev... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
struct virtqueue *vqs[2];
struct virtproc_info *vrp;
struct virtio_rpmsg_channel *vch = NULL;
struct rpmsg_device *rpdev... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
struct virtqueue *vqs[2];
struct virtproc_info *vrp;
struct virtio_rpmsg_channel *vch = NULL;
struct rpmsg_device *rpdev... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
vrp = kzalloc(sizeof(*vrp), GFP_KERNEL);
if (!vrp) {
return -ENOMEM;
}
err = virtio_find_vqs(vdev, 2, vqs, vq_cb... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
vrp = kzalloc(sizeof(*vrp), GFP_KERNEL);
if (!vrp) {
return -ENOMEM;
}
err = virtio_find_vqs(vdev, 2, vqs, vq_cb... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vrp = kzalloc(sizeof(*vrp), GFP_KERNEL);
if (!vrp) {
return -ENOMEM;
... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vrp = kzalloc(sizeof(*vrp), GFP_KERNEL);
if (!vrp) {
return -ENOMEM;
... | static int rpmsg_probe(struct virtio_device *vdev) {
vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done };
static const char * const names[] = { "input", "output" };
vrp = kzalloc(sizeof(*vrp), GFP_KERNEL);
if (!vrp) {
return -ENOMEM;
}
err = virtio_find_vqs(vdev, 2, vq... |
CVE-2022-34918 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/nf_tables_api.c | nft_setelem_parse_data | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (desc->type != NFT_DATA_VERDICT &&... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
u32 dtype;
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (set->dtype == NFT_... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (desc->type != NFT_DATA_VERDICT &&... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
u32 dtype;
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (set->dtype == NFT_... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (desc->type != NFT_DATA_VERDICT &&... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
u32 dtype;
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (set->dtype == NFT_... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (desc->type != NFT_DATA_VERDICT &&... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
u32 dtype;
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
if (set->dtype == NFT_... | static int nft_setelem_parse_data(struct nft_ctx *ctx, struct nft_set *set, struct nft_data_desc *desc, struct nft_data *data, struct nlattr *attr) {
+ u32 dtype;
int err;
err = nft_data_init(ctx, data, NFT_DATA_VALUE_MAXLEN, desc, attr);
if (err < 0) {
return err;
}
- if (desc->type... |
CVE-2022-3521 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/kcm/kcmsock.c | kcm_release | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
struct kcm_sock *kcm;
struct kcm_mux *mux;
struct kcm_psock *psock;
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
lock_sock(sk);
__skb_qu... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
struct kcm_sock *kcm;
struct kcm_mux *mux;
struct kcm_psock *psock;
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
lock_sock(sk);
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
__skb_qu... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
struct kcm_sock *kcm;
struct kcm_mux *mux;
struct kcm_psock *psock;
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
lock_sock(sk);
__skb_qu... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
struct kcm_sock *kcm;
struct kcm_mux *mux;
struct kcm_psock *psock;
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
lock_sock(sk);
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
__skb_qu... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
lock_sock(sk);
__skb_queue_purge(&sk->sk_write_queue);
release_sock(sk);
lock_sock(sk);
rel... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
lock_sock(sk);
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
__skb_queue_purge(&sk->sk_write_queue);
release_sock(sk);
lock_sock(sk);
rel... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
lock_sock(sk);
__skb_queue_purge(&sk->sk_write_queue)... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
lock_sock(sk);
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
__skb_queue_purge(&sk->sk_write_queue)... | static int kcm_release(struct socket *sock) {
struct sock *sk = sock->sk;
if (!sk) {
return 0;
}
kcm = kcm_sk(sk);
mux = kcm->mux;
+ lock_sock(sk);
sock_orphan(sk);
kfree_skb(kcm->seq_skb);
- lock_sock(sk);
__skb_queue_purge(&sk->sk_write_queue);
release_sock... |
CVE-2022-3524 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/ipv6_sockglue.c | do_ipv6_setsockopt | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
bool needs_rtnl = setsockopt_needs_rtnl(optname);
if (sockptr_is_null(o... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
bool needs_rtnl = setsockopt_needs_rtnl(optname);
if (sockptr_is_null(o... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
bool needs_rtnl = setsockopt_needs_rtnl(optname);
if (!optval) {
va... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
bool needs_rtnl = setsockopt_needs_rtnl(optname);
if (!optval) {
va... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
lock_sock(sk);
switch (optname) {
case IPV6_ADDRFORM:
if (val == PF_ET) {
if (sk->sk_protocol == I... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
lock_sock(sk);
if (unlikely(sk->sk_family != AF_ET6)) {
goto unlock;
}
switch (optname) {
case IPV6_AD... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
lock_sock(sk);
switch (optname) {
case IPV6_ADDRFORM:
/* PLACEHOLDER... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
lock_sock(sk);
if (unlikely(sk->sk_family != AF_ET6)) {
goto unlock;... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
lock_sock(sk);
+ if (unlikely(sk->sk_family != AF_ET6)) {
+ goto unlock;
+ }
switch (optname) {
cas... |
CVE-2022-3526 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/macvlan.c | macvlan_handle_frame | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
struct macvlan_port *port;
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
const struct macvlan_dev *vlan;
const struct macvlan_dev *src;
struct net_device *dev;
unsigned int len = 0;
int ret;
... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
struct macvlan_port *port;
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
const struct macvlan_dev *vlan;
const struct macvlan_dev *src;
struct net_device *dev;
unsigned int len = 0;
int ret;
... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
struct macvlan_port *port;
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
const struct macvlan_dev *vlan;
const struct macvlan_dev *src;
struct net_device *dev;
unsigned int len = 0;
int ret;
... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
struct macvlan_port *port;
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
const struct macvlan_dev *vlan;
const struct macvlan_dev *src;
struct net_device *dev;
unsigned int len = 0;
int ret;
... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
port = macvlan_port_get_rcu(skb->dev);
if (is_multicast_ether_addr(eth->h_dest)) {
skb = ip_check_defrag(dev_net(skb->dev), skb, IP_DEFRAG_MACVLAN);
... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
port = macvlan_port_get_rcu(skb->dev);
if (is_multicast_ether_addr(eth->h_dest)) {
skb = ip_check_defrag(dev_net(skb->dev), skb, IP_DEFRAG_MACVLAN);
... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
port = macvlan_port_get_rcu(skb->dev);
if (is_multicast_ether... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
port = macvlan_port_get_rcu(skb->dev);
if (is_multicast_ether... | static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) {
struct sk_buff *skb = *pskb;
const struct ethhdr *eth = eth_hdr(skb);
port = macvlan_port_get_rcu(skb->dev);
if (is_multicast_ether_addr(eth->h_dest)) {
skb = ip_check_defrag(dev_net(skb->dev), skb, IP_DEFRAG_MACVLAN)... |
CVE-2022-3531 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | get_syms | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name, **syms = NULL;
struct hashmap *map;
char buf[256];
FILE *f;
int err = 0;
f = fopen("/sys/kernel/debug/tracing/available_filter_functions", "r");
if (!f) {
return -EVAL;
}
map = hash... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name = NULL, **syms = NULL;
struct hashmap *map;
char buf[256];
FILE *f;
int err = 0;
f = fopen("/sys/kernel/debug/tracing/available_filter_functions", "r");
if (!f) {
return -EVAL;
}
map... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name, **syms = NULL;
struct hashmap *map;
char buf[256];
FILE *f;
int err = 0;
f = fopen("/sys/kernel/debug/tracing/available_filter_functions", "r");
if (!f) {
return -EVAL;
}
map = hash... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name = NULL, **syms = NULL;
struct hashmap *map;
char buf[256];
FILE *f;
int err = 0;
f = fopen("/sys/kernel/debug/tracing/available_filter_functions", "r");
if (!f) {
return -EVAL;
}
map... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name, **syms = NULL;
struct hashmap *map;
int err = 0;
map = hashmap__new(symbol_hash, symbol_equal, NULL);
if (IS_ERR(map)) {
err = libbpf_get_error(map);
goto error;
}
while (fgets(buf,... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name = NULL, **syms = NULL;
struct hashmap *map;
int err = 0;
map = hashmap__new(symbol_hash, symbol_equal, NULL);
if (IS_ERR(map)) {
err = libbpf_get_error(map);
goto error;
}
while (fge... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name, **syms = NULL;
struct hashmap *map;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
map = hashmap__new(symbol_hash, symbol_equal, NULL);
if ... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
char *name = NULL, **syms = NULL;
struct hashmap *map;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
map = hashmap__new(symbol_hash, symbol_equal, NULL);
... | static int get_syms(char ***symsp, size_t *cntp) {
size_t cap = 0, cnt = 0, i;
- char *name, **syms = NULL;
+ char *name = NULL, **syms = NULL;
struct hashmap *map;
int err = 0;
map = hashmap__new(symbol_hash, symbol_equal, NULL);
if (IS_ERR(map)) {
err = libbpf_get_error(map);
... |
CVE-2022-3534 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | tools/lib/bpf/btf_dump.c | btf_dump__free | void btf_dump__free(struct btf_dump *d) {
int i;
if (IS_ERR_OR_NULL(d)) {
return;
}
free(d->type_states);
if (d->cached_names) {
for (i = 0; i <= d->last_id; i++) {
if (d->cached_names[i]) {
free((void *)d->cached_names[i]);
}
}
}
... | void btf_dump__free(struct btf_dump *d) {
int i;
if (IS_ERR_OR_NULL(d)) {
return;
}
free(d->type_states);
if (d->cached_names) {
for (i = 0; i <= d->last_id; i++) {
if (d->cached_names[i]) {
free((void *)d->cached_names[i]);
}
}
}
... | void btf_dump__free(struct btf_dump *d) {
int i;
if (IS_ERR_OR_NULL(d)) {
return;
}
free(d->type_states);
if (d->cached_names) {
for (i = 0; i <= d->last_id; i++) {
if (d->cached_names[i]) {
free((void *)d->cached_names[i]);
}
}
}
... | void btf_dump__free(struct btf_dump *d) {
int i;
if (IS_ERR_OR_NULL(d)) {
return;
}
free(d->type_states);
if (d->cached_names) {
for (i = 0; i <= d->last_id; i++) {
if (d->cached_names[i]) {
free((void *)d->cached_names[i]);
}
}
}
... | void btf_dump__free(struct btf_dump *d) {
if (IS_ERR_OR_NULL(d)) {
return;
}
free(d->decl_stack);
hashmap__free(d->type_names);
hashmap__free(d->ident_names);
free(d);
}
| void btf_dump__free(struct btf_dump *d) {
if (IS_ERR_OR_NULL(d)) {
return;
}
free(d->decl_stack);
btf_dump_free_names(d->type_names);
btf_dump_free_names(d->ident_names);
free(d);
}
| void btf_dump__free(struct btf_dump *d) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_ERR_OR_NULL(d)) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
free(d->decl_stack);
hashmap__free(d->type_names);
hashmap__free(d->ident_names);
free(d);
}
| void btf_dump__free(struct btf_dump *d) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_ERR_OR_NULL(d)) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
free(d->decl_stack);
btf_dump_free_names(d->type_names);
btf_dump_free_names(d->ident_names);
free(d);
} | void btf_dump__free(struct btf_dump *d) {
if (IS_ERR_OR_NULL(d)) {
return;
}
free(d->decl_stack);
- hashmap__free(d->type_names);
- hashmap__free(d->ident_names);
+ btf_dump_free_names(d->type_names);
+ btf_dump_free_names(d->ident_names);
free(d);
} |
CVE-2022-3534 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | tools/lib/bpf/btf_dump.c | btf_dump_name_dups | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
size_t dup_cnt = 0;
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cnt++;
hashmap__set(name_map, orig_name, (void *)dup_cnt, NULL, NULL);
return dup_cnt;
} | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
char *old_name, *new_name;
size_t dup_cnt = 0;
int err;
new_name = strdup(orig_name);
if (!new_name) {
return 1;
}
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cn... | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
size_t dup_cnt = 0;
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cnt++;
hashmap__set(name_map, orig_name, (void *)dup_cnt, NULL, NULL);
return dup_cnt;
} | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
char *old_name, *new_name;
size_t dup_cnt = 0;
int err;
new_name = strdup(orig_name);
if (!new_name) {
return 1;
}
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cn... | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
size_t dup_cnt = 0;
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cnt++;
hashmap__set(name_map, orig_name, (void *)dup_cnt, NULL, NULL);
return dup_cnt;
}
| static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
char *old_name, *new_name;
size_t dup_cnt = 0;
int err;
new_name = strdup(orig_name);
if (!new_name) {
return 1;
}
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cn... | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
size_t dup_cnt = 0;
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cnt++;
hashmap__set(name_map, orig_name, (void *)dup_cnt, NULL, NULL);
return dup_cnt;
}
| static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
char *old_name, *new_name;
size_t dup_cnt = 0;
int err;
new_name = strdup(orig_name);
if (!new_name) {
return 1;
}
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cn... | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, const char *orig_name) {
+ char *old_name, *new_name;
size_t dup_cnt = 0;
+ int err;
+ new_name = strdup(orig_name);
+ if (!new_name) {
+ return 1;
+ }
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
... |
CVE-2022-3535 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | mvpp2_dbgfs_init | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir, *mvpp2_root;
int ret, i;
mvpp2_root = debugfs_lookup(MVPP2_DRIVER_NAME, NULL);
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir;
int ret, i;
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2_root);
priv->dbgfs_dir = mvpp2_dir;
priv->dbgfs_entries = kzal... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir, *mvpp2_root;
int ret, i;
mvpp2_root = debugfs_lookup(MVPP2_DRIVER_NAME, NULL);
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir;
int ret, i;
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2_root);
priv->dbgfs_dir = mvpp2_dir;
priv->dbgfs_entries = kzal... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir, *mvpp2_root;
int ret, i;
mvpp2_root = debugfs_lookup(MVPP2_DRIVER_NAME, NULL);
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir;
int ret, i;
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2_root);
priv->dbgfs_dir = mvpp2_dir;
ret = mvpp2_dbgfs_prs_init... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir, *mvpp2_root;
int ret, i;
mvpp2_root = debugfs_lookup(MVPP2_DRIVER_NAME, NULL);
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
struct dentry *mvpp2_dir;
int ret, i;
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvpp2_dir = debugfs_create_dir(name, mvpp2_root);
priv->dbgfs_dir = mvpp2_dir;
/* PLACEHOLDER: DO NOT DEL... | void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name) {
- struct dentry *mvpp2_dir, *mvpp2_root;
+ struct dentry *mvpp2_dir;
int ret, i;
- mvpp2_root = debugfs_lookup(MVPP2_DRIVER_NAME, NULL);
if (!mvpp2_root) {
mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
}
mvp... |
CVE-2022-3542 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | bnx2x_tpa_stop | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
struct sw_rx_bd *rx_buf = &tpa_info->first_buf;
u8 pad = tpa_info->placement_offset;
u16 len = tpa_info->len_on_bd;
struct sk_buff *skb = NUL... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
struct sw_rx_bd *rx_buf = &tpa_info->first_buf;
u8 pad = tpa_info->placement_offset;
u16 len = tpa_info->len_on_bd;
struct sk_buff *skb = NUL... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
struct sw_rx_bd *rx_buf = &tpa_info->first_buf;
u8 pad = tpa_info->placement_offset;
u16 len = tpa_info->len_on_bd;
struct sk_buff *skb = NUL... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
struct sw_rx_bd *rx_buf = &tpa_info->first_buf;
u8 pad = tpa_info->placement_offset;
u16 len = tpa_info->len_on_bd;
struct sk_buff *skb = NUL... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
new_data = bnx2x_frag_alloc(fp, GFP_ATOMIC);
if (likely(skb)) {
if (pad + len > fp->rx_buf_size) {
bnx2x_panic();
ret... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
new_data = bnx2x_frag_alloc(fp, GFP_ATOMIC);
if (likely(skb)) {
if (pad + len > fp->rx_buf_size) {
bnx2x_panic();
bnx... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
new_data = bnx2x_frag_alloc(fp, GFP_ATOMIC);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
new_data = bnx2x_frag_alloc(fp, GFP_ATOMIC);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (... | static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) {
new_data = bnx2x_frag_alloc(fp, GFP_ATOMIC);
if (likely(skb)) {
if (pad + len > fp->rx_buf_size) {
bnx2x_panic();
+ ... |
CVE-2022-3543 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/unix/af_unix.c | unix_release_sock | static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
struct sock *skpair;
struct sk_buff *skb;
struct path path;
int state;
unix_remove_socket(sock_net(sk), sk);
unix_remove_bsd_socket(sk);
unix_state_lock(sk);
sock_orphan(sk);
sk->sk_s... | static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
struct sock *skpair;
struct sk_buff *skb;
struct path path;
int state;
unix_remove_socket(sock_net(sk), sk);
unix_remove_bsd_socket(sk);
unix_state_lock(sk);
sock_orphan(sk);
sk->sk_s... | static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
struct path path;
struct sock *skpair;
struct sk_buff *skb;
int state;
unix_remove_socket(sk);
unix_state_lock(sk);
sock_orphan(sk);
sk->sk_shutdown = SHUTDOWN_MASK;
path = u->path;
... | static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
struct path path;
struct sock *skpair;
struct sk_buff *skb;
int state;
unix_remove_socket(sk);
unix_state_lock(sk);
sock_orphan(sk);
sk->sk_shutdown = SHUTDOWN_MASK;
path = u->path;
... | static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
unix_state_unlock(sk);
wake_up_interruptible_all(&u->peer_wait);
}
| static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
unix_state_unlock(sk);
if (u->oob_skb) {
kfree_skb(u->oob_skb);
u->oob_skb = NULL;
}
wake_up_interruptible_all(&u->peer_wait);
}
| static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unix_state_unlock(sk);
wake_up_interruptible_all(&u->peer_wait);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unix_state_unlock(sk);
if (u->oob_skb) {
kfree_skb(u->oob_skb);
u->oob_skb = NULL;
}
wake_up_interruptible_all(&u->peer_wait);
/* PLA... | static void unix_release_sock(struct sock *sk, int embrion) {
struct unix_sock *u = unix_sk(sk);
unix_state_unlock(sk);
+ if (u->oob_skb) {
+ kfree_skb(u->oob_skb);
+ u->oob_skb = NULL;
+ }
wake_up_interruptible_all(&u->peer_wait);
} |
CVE-2022-3543 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/unix/af_unix.c | unix_sock_destructor | static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
if (u->oob_skb) {
kfree_skb(u->oob_skb);
u->oob_skb = NULL;
}
DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc));
DEBUG_NET_WARN_ON_ONCE(!sk_unhas... | static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc));
DEBUG_NET_WARN_ON_ONCE(!sk_unhashed(sk));
DEBUG_NET_WARN_ON_ONCE(sk->sk_socket);
if (!sock_flag(sk, SOCK_DEAD)... | static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
if (u->oob_skb) {
kfree_skb(u->oob_skb);
u->oob_skb = NULL;
}
WARN_ON(refcount_read(&sk->sk_wmem_alloc));
WARN_ON(!sk_unhashed(sk));
WARN_ON(sk->sk_s... | static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
WARN_ON(refcount_read(&sk->sk_wmem_alloc));
WARN_ON(!sk_unhashed(sk));
WARN_ON(sk->sk_socket);
if (!sock_flag(sk, SOCK_DEAD)) {
pr_info("Attempt to release alive... | static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
if (u->oob_skb) {
kfree_skb(u->oob_skb);
u->oob_skb = NULL;
}
DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc));
}
| static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc));
}
| static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
if (u->oob_skb) {
kfree_skb(u->oob_skb);
u->oob_skb = NULL;
}
WARN_ON(refcount_read(&sk->sk_wmem_alloc));
WARN_ON(!sk_unhashed(sk));
WARN_ON(sk->sk_s... | static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
WARN_ON(refcount_read(&sk->sk_wmem_alloc));
WARN_ON(!sk_unhashed(sk));
WARN_ON(sk->sk_socket);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static void unix_sock_destructor(struct sock *sk) {
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
- if (u->oob_skb) {
- kfree_skb(u->oob_skb);
- u->oob_skb = NULL;
- }
DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc));
} |
CVE-2022-3545 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | area_cache_get | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
struct nfp_cpp_area_cache *cache;
int err;
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
if (err... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
struct nfp_cpp_area_cache *cache;
int err;
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
if (err... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
struct nfp_cpp_area_cache *cache;
int err;
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
if (err... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
struct nfp_cpp_area_cache *cache;
int err;
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
if (err... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
addr += *offset;
list_for_each_entry(cache, &cpp->area... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
addr += *offset;
list_for_each_entry(cache, &cpp->area... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
/* PLACE... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
/* PLACE... | static struct nfp_cpp_area_cache * area_cache_get(struct nfp_cpp *cpp, u32 id, u64 addr, unsigned long *offset, size_t length) {
if (length == 0 || id == 0) {
return NULL;
}
err = nfp_target_cpp(id, addr, &id, &addr, cpp->imb_cat_table);
addr += *offset;
list_for_each_entry(cache, &cp... |
CVE-2022-3564 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_rx_state_recv | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
int err = 0;
bool skb_in_use = false;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_RECV_IFRAME:
switch (l2cap_cla... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
struct l2cap_ctrl local_control;
int err = 0;
bool skb_in_use = false;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_R... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
int err = 0;
bool skb_in_use = false;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_RECV_IFRAME:
switch (l2cap_cla... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
struct l2cap_ctrl local_control;
int err = 0;
bool skb_in_use = false;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_R... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
int err = 0;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_RECV_IFRAME:
switch (l2cap_classify_txseq(chan, control->tx... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
struct l2cap_ctrl local_control;
int err = 0;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_RECV_IFRAME:
switch (l... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
int err = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_RECV_IFRAME:
... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
struct l2cap_ctrl local_control;
int err = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) ... | static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) {
+ struct l2cap_ctrl local_control;
int err = 0;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event);
switch (event) {
case L2CAP_EV_RECV_IFRAME:
sw... |
CVE-2022-3564 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_stream_rx | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, control->txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(chan, control);
B... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
u16 txseq = control->txseq;
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(ch... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, control->txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(chan, control);
B... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
u16 txseq = control->txseq;
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(ch... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, control->txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(chan, control);
B... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
u16 txseq = control->txseq;
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(ch... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, control->txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(chan, control);
B... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
u16 txseq = control->txseq;
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
if (l2cap_classify_txseq(chan, txseq) == L2CAP_TXSEQ_EXPECTED) {
l2cap_pass_to_tx(ch... | static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb) {
+ u16 txseq = control->txseq;
BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb, chan->rx_state);
- if (l2cap_classify_txseq(chan, control->txseq) == L2CAP_TXSEQ_EXPECTED) {
+ if (l2cap... |
CVE-2022-3565 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/isdn/mISDN/l1oip_core.c | l1oip_socket_parse | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
u32 packet_id;
u8 channel;
u8 remotecodec;
u16 timebase;
int m, mlen;
int len_start = len;
struct dchannel *dch = hc->chan[hc->d_idx].dch;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBU... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
u32 packet_id;
u8 channel;
u8 remotecodec;
u16 timebase;
int m, mlen;
int len_start = len;
struct dchannel *dch = hc->chan[hc->d_idx].dch;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBU... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
u32 packet_id;
u8 channel;
u8 remotecodec;
u16 timebase;
int m, mlen;
int len_start = len;
struct dchannel *dch = hc->chan[hc->d_idx].dch;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBU... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
u32 packet_id;
u8 channel;
u8 remotecodec;
u16 timebase;
int m, mlen;
int len_start = len;
struct dchannel *dch = hc->chan[hc->d_idx].dch;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBU... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
if (len < 1 + 1 + 2) {
return;
}
if (((*buf) >> 6) != L1OIP_VERSION) {
return;
}
if (((*buf) & 0x20) && !hc->pri) {
return;
}
if (!((*buf) & 0x20) && hc->pri) {
retur... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
if (len < 1 + 1 + 2) {
return;
}
if (((*buf) >> 6) != L1OIP_VERSION) {
return;
}
if (((*buf) & 0x20) && !hc->pri) {
return;
}
if (!((*buf) & 0x20) && hc->pri) {
retur... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (len < 1 + 1 + 2) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
if (((*buf) >> 6) != L1OIP_VERSION) {
/* PLACEHOLDER: DO NOT DELETE T... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (len < 1 + 1 + 2) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
if (((*buf) >> 6) != L1OIP_VERSION) {
/* PLACEHOLDER: DO NOT DELETE T... | static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) {
if (len < 1 + 1 + 2) {
return;
}
if (((*buf) >> 6) != L1OIP_VERSION) {
return;
}
if (((*buf) & 0x20) && !hc->pri) {
return;
}
if (!((*buf) & 0x20) && hc->pri) {
... |
CVE-2022-3565 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/isdn/mISDN/l1oip_core.c | l1oip_socket_send | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
u8 *p;
u8 frame[MAX_DFRAME_LEN_L1 + 32];
struct socket *socket = NULL;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBUG "%s: sending data to socket (len = %d)\n", __func__, l... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
u8 *p;
u8 frame[MAX_DFRAME_LEN_L1 + 32];
struct socket *socket = NULL;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBUG "%s: sending data to socket (len = %d)\n", __func__, l... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
u8 *p;
u8 frame[MAX_DFRAME_LEN_L1 + 32];
struct socket *socket = NULL;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBUG "%s: sending data to socket (len = %d)\n", __func__, l... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
u8 *p;
u8 frame[MAX_DFRAME_LEN_L1 + 32];
struct socket *socket = NULL;
if (debug & DEBUG_L1OIP_MSG) {
printk(KERN_DEBUG "%s: sending data to socket (len = %d)\n", __func__, l... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
p = frame;
if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ)) {
mod_timer(&hc->keep_tl, jiffies + L1OIP_KEEPALIVE * HZ);
} else {
hc->keep_tl.expires = jiffies + L1O... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
p = frame;
if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ) && !hc->shutdown) {
mod_timer(&hc->keep_tl, jiffies + L1OIP_KEEPALIVE * HZ);
} else {
hc->keep_tl.expire... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
p = frame;
if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ)) {
mod_timer(&hc->keep_tl, jiffies + L1OIP_KEEPALIVE * HZ);
} ... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
p = frame;
if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ) && !hc->shutdown) {
mod_timer(&hc->keep_tl, jiffies + L1OIP_KEEPAL... | static int l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, u16 timebase, u8 *buf, int len) {
p = frame;
- if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ)) {
+ if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ) && !hc->shutdown) {
mod_timer(&hc->keep_tl, jiffi... |
CVE-2022-3565 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/isdn/mISDN/l1oip_core.c | release_card | static void release_card(struct l1oip *hc) {
int ch;
if (timer_pending(&hc->keep_tl)) {
del_timer(&hc->keep_tl);
}
if (timer_pending(&hc->timeout_tl)) {
del_timer(&hc->timeout_tl);
}
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
... | static void release_card(struct l1oip *hc) {
int ch;
hc->shutdown = true;
del_timer_sync(&hc->keep_tl);
del_timer_sync(&hc->timeout_tl);
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
if (hc->registered && hc->chan[hc->d_idx].dch) {
mISDN... | static void release_card(struct l1oip *hc) {
int ch;
if (timer_pending(&hc->keep_tl)) {
del_timer(&hc->keep_tl);
}
if (timer_pending(&hc->timeout_tl)) {
del_timer(&hc->timeout_tl);
}
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
... | static void release_card(struct l1oip *hc) {
int ch;
hc->shutdown = true;
del_timer_sync(&hc->keep_tl);
del_timer_sync(&hc->timeout_tl);
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
if (hc->registered && hc->chan[hc->d_idx].dch) {
mISDN... | static void release_card(struct l1oip *hc) {
int ch;
if (timer_pending(&hc->keep_tl)) {
del_timer(&hc->keep_tl);
}
if (timer_pending(&hc->timeout_tl)) {
del_timer(&hc->timeout_tl);
}
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
... | static void release_card(struct l1oip *hc) {
int ch;
hc->shutdown = true;
del_timer_sync(&hc->keep_tl);
del_timer_sync(&hc->timeout_tl);
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
list_del(&hc->list);
kfree(hc);
}
| static void release_card(struct l1oip *hc) {
int ch;
if (timer_pending(&hc->keep_tl)) {
del_timer(&hc->keep_tl);
}
if (timer_pending(&hc->timeout_tl)) {
del_timer(&hc->timeout_tl);
}
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
... | static void release_card(struct l1oip *hc) {
int ch;
hc->shutdown = true;
del_timer_sync(&hc->keep_tl);
del_timer_sync(&hc->timeout_tl);
cancel_work_sync(&hc->workq);
if (hc->socket_thread) {
l1oip_socket_close(hc);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_del(&hc... | static void release_card(struct l1oip *hc) {
int ch;
- if (timer_pending(&hc->keep_tl)) {
- del_timer(&hc->keep_tl);
- }
- if (timer_pending(&hc->timeout_tl)) {
- del_timer(&hc->timeout_tl);
- }
+ hc->shutdown = true;
+ del_timer_sync(&hc->keep_tl);
+ del_timer_sync(&hc->timeout... |
CVE-2022-3577 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-bigbenff.c | bigben_probe | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
error = hid_parse(hid);
error = hid_hw_start(hid, HID_CONNECT_DEFAULT & ~HID_CON... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
error = hid_parse(hid);
error = hid_hw_start(hid, HID_CONNECT_DEFAULT & ~HID_CON... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
/* PLACEHOLDER: DO NOT DELETE THIS... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
/* PLACEHOLDER: DO NOT DELETE THIS... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
error = hid_parse(hid);
error = hid_hw_start(hid, HID_CONNECT_DEFAULT & ... |
CVE-2022-3586 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/sch_sfb.c | increment_qlen | static void increment_qlen(const struct sk_buff *skb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = sfb_hash(skb, 0);
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = sfb_hash(skb, 1);
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
} | static void increment_qlen(const struct sfb_skb_cb *cb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = cb->hashes[0];
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = cb->hashes[1];
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
} | static void increment_qlen(const struct sk_buff *skb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = sfb_hash(skb, 0);
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = sfb_hash(skb, 1);
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
} | static void increment_qlen(const struct sfb_skb_cb *cb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = cb->hashes[0];
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = cb->hashes[1];
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
} | static void increment_qlen(const struct sk_buff *skb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = sfb_hash(skb, 0);
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = sfb_hash(skb, 1);
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
}
| static void increment_qlen(const struct sfb_skb_cb *cb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = cb->hashes[0];
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = cb->hashes[1];
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
}
| static void increment_qlen(const struct sk_buff *skb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = sfb_hash(skb, 0);
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = sfb_hash(skb, 1);
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
}
| static void increment_qlen(const struct sfb_skb_cb *cb, struct sfb_sched_data *q) {
u32 sfbhash;
sfbhash = cb->hashes[0];
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
sfbhash = cb->hashes[1];
if (sfbhash) {
increment_one_qlen(sfbhash, 1, q);
}
} | -static void increment_qlen(const struct sk_buff *skb, struct sfb_sched_data *q) {
+static void increment_qlen(const struct sfb_skb_cb *cb, struct sfb_sched_data *q) {
u32 sfbhash;
- sfbhash = sfb_hash(skb, 0);
+ sfbhash = cb->hashes[0];
if (sfbhash) {
increment_one_qlen(sfbhash, 0, q);
}
... |
CVE-2022-3586 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/sch_sfb.c | sfb_enqueue | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
int i;
u32 p_min = ~0;
u32 minqlen = ~0;
u32 r, sfbhash;
u32 slot = q->slot;
int ret = NET_XMIT... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
struct sfb_skb_cb cb;
int i;
u32 p_min = ~0;
u32 minqlen = ~0;
u32 r, sfbhash;
u32 slot = q->sl... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
int i;
u32 p_min = ~0;
u32 minqlen = ~0;
u32 r, sfbhash;
u32 slot = q->slot;
int ret = NET_XMIT... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
struct sfb_skb_cb cb;
int i;
u32 p_min = ~0;
u32 minqlen = ~0;
u32 r, sfbhash;
u32 slot = q->sl... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
int i;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
if (q->rehash_interval > 0) {
if (unlikely(t... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
struct sfb_skb_cb cb;
int i;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
if (q->rehash_interval > 0... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
int i;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
/*... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
struct sfb_skb_cb cb;
int i;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = NET_XMIT_SUCCESS |... | static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
struct tcf_proto *fl;
+ struct sfb_skb_cb cb;
int i;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
if (q->rehash_inte... |
CVE-2022-3594 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/usb/r8152.c | intr_callback | static void intr_callback(struct urb *urb) {
struct r8152 *tp;
__le16 *d;
int status = urb->status;
int res;
tp = urb->context;
if (!tp) {
return;
}
if (!test_bit(WORK_ENABLE, &tp->flags)) {
return;
}
if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
return;
... | static void intr_callback(struct urb *urb) {
struct r8152 *tp;
__le16 *d;
int status = urb->status;
int res;
tp = urb->context;
if (!tp) {
return;
}
if (!test_bit(WORK_ENABLE, &tp->flags)) {
return;
}
if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
return;
... | static void intr_callback(struct urb *urb) {
struct r8152 *tp;
__le16 *d;
int status = urb->status;
int res;
tp = urb->context;
if (!tp) {
return;
}
if (!test_bit(WORK_ENABLE, &tp->flags)) {
return;
}
if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
return;
... | static void intr_callback(struct urb *urb) {
struct r8152 *tp;
__le16 *d;
int status = urb->status;
int res;
tp = urb->context;
if (!tp) {
return;
}
if (!test_bit(WORK_ENABLE, &tp->flags)) {
return;
}
if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
return;
... | static void intr_callback(struct urb *urb) {
switch (status) {
case -EOVERFLOW:
netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
goto resubmit;
}
resubmit:
res = usb_submit_urb(urb, GFP_ATOMIC);
}
| static void intr_callback(struct urb *urb) {
switch (status) {
case -EOVERFLOW:
if (net_ratelimit()) {
netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
}
goto resubmit;
}
resubmit:
res = usb_submit_urb(urb, GFP_ATOMIC);
}
| static void intr_callback(struct urb *urb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (status) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case -EOVERFLOW:
netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
goto resubmit;
/* PLACEHOLDER: DO NOT DELETE THIS ... | static void intr_callback(struct urb *urb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (status) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case -EOVERFLOW:
if (net_ratelimit()) {
netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
}
goto resu... | static void intr_callback(struct urb *urb) {
switch (status) {
case -EOVERFLOW:
- netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
+ if (net_ratelimit()) {
+ netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
+ }
goto resubmit;
}
resubmit... |
CVE-2022-36123 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/head64.c | clear_bss | static void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
} | static void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
memset(__brk_base, 0, (unsigned long) __brk_limit - (unsigned long) __brk_base);
} | void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
} | void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
memset(__brk_base, 0, (unsigned long) __brk_limit - (unsigned long) __brk_base);
} | static void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
}
| static void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
memset(__brk_base, 0, (unsigned long) __brk_limit - (unsigned long) __brk_base);
}
| void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
}
| void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
memset(__brk_base, 0, (unsigned long) __brk_limit - (unsigned long) __brk_base);
} | static void clear_bss(void) {
memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start);
+ memset(__brk_base, 0, (unsigned long) __brk_limit - (unsigned long) __brk_base);
} |
CVE-2022-3619 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_recv_acldata | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
int len;
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
if (!conn) {
goto drop;
... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
int len;
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
if (!conn) {
goto drop;
... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
int len;
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
if (!conn) {
goto drop;
... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
int len;
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
if (!conn) {
goto drop;
... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
if (!conn) {
goto drop;
}
BT_D... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
if (!conn) {
goto drop;
}
BT_D... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
... | void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) {
struct l2cap_conn *conn = hcon->l2cap_data;
if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) {
goto drop;
}
if (!conn) {
conn = l2cap_conn_add(hcon);
}
if (!conn) {
goto drop;
... |
CVE-2022-3621 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/nilfs2/inode.c | nilfs_read_inode_common | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
int err;
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_cpu(raw_inode->i_gid));
set_nlink... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
int err;
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_cpu(raw_inode->i_gid));
set_nlink... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
int err;
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_cpu(raw_inode->i_gid));
set_nlink... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
int err;
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_cpu(raw_inode->i_gid));
set_nlink... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_cpu(raw_inode->i_gid));
set_nlink(inode, le16_... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_cpu(raw_inode->i_gid));
set_nlink(inode, le16_... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_... | int nilfs_read_inode_common(struct inode *inode, struct nilfs_inode *raw_inode) {
struct nilfs_inode_info *ii = NILFS_I(inode);
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
i_uid_write(inode, le32_to_cpu(raw_inode->i_uid));
i_gid_write(inode, le32_to_cpu(raw_inode->i_gid));
set_nlink(inode,... |
CVE-2022-3623 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/gup.c | follow_page_pte | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
int ret;
if (WARN_ON_ONCE((flags & (FOLL_P | FOLL_GET)) ==... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
int ret;
if (WARN_ON_ONCE((flags & (FOLL_P | FOLL_GET)) ==... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_pa... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
if (is_vm_hugetlb_page(vma)) {
page = follow_huge_pmd_... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
if (WARN_ON_ONCE((flags & (FOLL_P | FOLL_GET)) == (FOLL_P | FOLL_GET))) {
return ERR_PTR(-EVAL);
}
retry:
if (unlikely(pmd_bad(*pmd))) {
return... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
if (WARN_ON_ONCE((flags & (FOLL_P | FOLL_GET)) == (FOLL_P | FOLL_GET))) {
return ERR_PTR(-EVAL);
}
if (is_vm_hugetlb_page(vma)) {
page = follow... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
/* PLACEHOLDER: DO NOT ... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (is_vm_hugetlb_page(vma)) {
page = follow_huge_pmd_pte(vma, address, flags);
if (page) {
... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags, struct dev_pagemap **pgmap) {
if (WARN_ON_ONCE((flags & (FOLL_P | FOLL_GET)) == (FOLL_P | FOLL_GET))) {
return ERR_PTR(-EVAL);
+ }
+ if (is_vm_hugetlb_page(vma)) {
+ page = ... |
CVE-2022-3623 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/gup.c | follow_pmd_mask | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
pmd_t *pmd, pmdval;
spinlock_t *ptl;
struct page *page;
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONC... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
pmd_t *pmd, pmdval;
spinlock_t *ptl;
struct page *page;
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONC... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
pmd_t *pmd, pmdval;
spinlock_t *ptl;
struct page *page;
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONC... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
pmd_t *pmd, pmdval;
spinlock_t *ptl;
struct page *page;
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONC... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONCE(*pmd);
if (pmd_none(pmdval)) {
return no_page_table(vm... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONCE(*pmd);
if (pmd_none(pmdval)) {
return no_page_table(vm... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONCE(*pmd);
if (p... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONCE(*pmd);
if (p... | static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx) {
struct mm_struct *mm = vma->vm_mm;
pmd = pmd_offset(pudp, address);
pmdval = READ_ONCE(*pmd);
if (pmd_none(pmdval)) {
return no_page_ta... |
CVE-2022-3625 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/devlink.c | devlink_param_get | static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
} | static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
} | static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
} | static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
} | static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
}
| static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
}
| static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
}
| static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->get || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
} | static int devlink_param_get(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
- if (!param->get) {
+ if (!param->get || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->get(devlink, param->id, ctx);
} |
CVE-2022-3625 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/devlink.c | devlink_param_set | static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
} | static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
} | static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
} | static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
} | static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
}
| static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
}
| static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
}
| static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
if (!param->set || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
} | static int devlink_param_set(struct devlink *devlink, const struct devlink_param *param, struct devlink_param_gset_ctx *ctx) {
- if (!param->set) {
+ if (!param->set || devlink->reload_failed) {
return -EOPNOTSUPP;
}
return param->set(devlink, param->id, ctx);
} |
CVE-2022-3628 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | brcmf_fweh_event_worker | static void brcmf_fweh_event_worker(struct work_struct *work) {
struct brcmf_pub *drvr;
struct brcmf_if *ifp;
struct brcmf_fweh_info *fweh;
struct brcmf_fweh_queue_item *event;
int err = 0;
struct brcmf_event_msg_be *emsg_be;
struct brcmf_event_msg emsg;
fweh = container_of(work, struct ... | static void brcmf_fweh_event_worker(struct work_struct *work) {
struct brcmf_pub *drvr;
struct brcmf_if *ifp;
struct brcmf_fweh_info *fweh;
struct brcmf_fweh_queue_item *event;
int err = 0;
struct brcmf_event_msg_be *emsg_be;
struct brcmf_event_msg emsg;
fweh = container_of(work, struct ... | static void brcmf_fweh_event_worker(struct work_struct *work) {
struct brcmf_pub *drvr;
struct brcmf_if *ifp;
struct brcmf_fweh_info *fweh;
struct brcmf_fweh_queue_item *event;
int err = 0;
struct brcmf_event_msg_be *emsg_be;
struct brcmf_event_msg emsg;
fweh = container_of(work, struct ... | static void brcmf_fweh_event_worker(struct work_struct *work) {
struct brcmf_pub *drvr;
struct brcmf_if *ifp;
struct brcmf_fweh_info *fweh;
struct brcmf_fweh_queue_item *event;
int err = 0;
struct brcmf_event_msg_be *emsg_be;
struct brcmf_event_msg emsg;
fweh = container_of(work, struct ... | static void brcmf_fweh_event_worker(struct work_struct *work) {
while ((event = brcmf_fweh_dequeue_event(fweh))) {
brcmf_dbg(EVENT, "event %s (%u) ifidx %u bsscfg %u addr %pM\n", brcmf_fweh_event_name(event->code), event->code, event->emsg.ifidx, event->emsg.bsscfgidx, event->emsg.addr);
emsg_be = &... | static void brcmf_fweh_event_worker(struct work_struct *work) {
while ((event = brcmf_fweh_dequeue_event(fweh))) {
brcmf_dbg(EVENT, "event %s (%u) ifidx %u bsscfg %u addr %pM\n", brcmf_fweh_event_name(event->code), event->code, event->emsg.ifidx, event->emsg.bsscfgidx, event->emsg.addr);
if (event->... | static void brcmf_fweh_event_worker(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((event = brcmf_fweh_dequeue_event(fweh))) {
brcmf_dbg(EVENT, "event %s (%u) ifidx %u bsscfg %u addr %pM\n", brcmf_fweh_event_name(event->code), event->code, event->emsg.ifidx, event->emsg... | static void brcmf_fweh_event_worker(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((event = brcmf_fweh_dequeue_event(fweh))) {
brcmf_dbg(EVENT, "event %s (%u) ifidx %u bsscfg %u addr %pM\n", brcmf_fweh_event_name(event->code), event->code, event->emsg.ifidx, event->emsg... | static void brcmf_fweh_event_worker(struct work_struct *work) {
while ((event = brcmf_fweh_dequeue_event(fweh))) {
brcmf_dbg(EVENT, "event %s (%u) ifidx %u bsscfg %u addr %pM\n", brcmf_fweh_event_name(event->code), event->code, event->emsg.ifidx, event->emsg.bsscfgidx, event->emsg.addr);
+ if (eve... |
CVE-2022-36280 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | vmw_kms_cursor_snoop | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
struct ttm_bo_kmap_obj map;
unsigned long kmap_offset;
unsigned long kmap_num;
SVGA3dCopyBox *box;
unsigned box_count;
void *virtual;
bool dummy;
str... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
struct ttm_bo_kmap_obj map;
unsigned long kmap_offset;
unsigned long kmap_num;
SVGA3dCopyBox *box;
unsigned box_count;
void *virtual;
bool dummy;
str... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
struct ttm_bo_kmap_obj map;
unsigned long kmap_offset;
unsigned long kmap_num;
SVGA3dCopyBox *box;
unsigned box_count;
void *virtual;
bool dummy;
str... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
struct ttm_bo_kmap_obj map;
unsigned long kmap_offset;
unsigned long kmap_num;
SVGA3dCopyBox *box;
unsigned box_count;
void *virtual;
bool dummy;
str... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
if (cmd->header.size < 64) {
return;
}
box = (SVGA3dCopyBox *)&cmd[1];
box_count = (cmd->header.size - sizeof(SVGA3dCmdSurfaceDMA)) / sizeof(SVGA3dCopyBox);
... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
if (cmd->header.size < 64) {
return;
}
box = (SVGA3dCopyBox *)&cmd[1];
box_count = (cmd->header.size - sizeof(SVGA3dCmdSurfaceDMA)) / sizeof(SVGA3dCopyBox);
... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd->header.size < 64) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
box = (SVGA3dCopyBox *... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd->header.size < 64) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
box = (SVGA3dCopyBox *... | void vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) {
if (cmd->header.size < 64) {
return;
}
box = (SVGA3dCopyBox *)&cmd[1];
box_count = (cmd->header.size - sizeof(SVGA3dCmdSurfaceDMA)) / sizeof(SVGA3dCopy... |
CVE-2022-3633 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/can/j1939/transport.c | j1939_session_destroy | static void j1939_session_destroy(struct j1939_session *session) {
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ACK);
}
netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, session);
WARN_ON_ONCE(!list_emp... | static void j1939_session_destroy(struct j1939_session *session) {
struct sk_buff *skb;
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ACK);
}
netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, session);
... | static void j1939_session_destroy(struct j1939_session *session) {
if (session->transmission) {
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ACK);
}
} else if (session->err) {
... | static void j1939_session_destroy(struct j1939_session *session) {
struct sk_buff *skb;
if (session->transmission) {
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ACK);
}
} else i... | static void j1939_session_destroy(struct j1939_session *session) {
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ACK);
}
netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, session);
WARN_ON_ONCE(!list_emp... | static void j1939_session_destroy(struct j1939_session *session) {
struct sk_buff *skb;
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ACK);
}
netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, session);
... | static void j1939_session_destroy(struct j1939_session *session) {
if (session->transmission) {
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ACK);
}
} else if (session->err) {
... | static void j1939_session_destroy(struct j1939_session *session) {
struct sk_buff *skb;
if (session->transmission) {
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_ACK);
}
} else i... | static void j1939_session_destroy(struct j1939_session *session) {
+ struct sk_buff *skb;
if (session->err) {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ABORT);
} else {
j1939_sk_errqueue(session, J1939_ERRQUEUE_ACK);
}
netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, ses... |
CVE-2022-36402 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | vmw_cmd_dx_set_shader | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX : SVGA3D_SHADERTYPE_DX10_MAX;
struct vmw_resource *re... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
struct vmw_resource *res = NULL;
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context);
struct vmw_ctx_bindinfo_... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX : SVGA3D_SHADERTYPE_DX10_MAX;
struct vmw_resource *re... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
struct vmw_resource *res = NULL;
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context);
struct vmw_ctx_bindinfo_... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX : SVGA3D_SHADERTYPE_DX10_MAX;
struct vmw_resource *re... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
struct vmw_resource *res = NULL;
if (!ctx_node) {
return -EVAL;
}
cmd = container_of(header, typeof(*cmd), header);
... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX : SVGA3D_SHADERTYPE_DX10_MAX;
struct vmw_resource *re... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
struct vmw_resource *res = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!ctx_node) {
return -EVAL;
}
cm... | static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShader);
- SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX : SVGA3D_SHADERTYPE_DX10_MAX;
struct vmw_resource... |
CVE-2022-36402 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | vmw_cmd_dx_set_shader_res | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
u32 num_sr_view = (cmd->header.size - sizeof(cmd->body)) / sizeof(SVGA3dShaderRe... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
u32 num_sr_view = (cmd->header.size - sizeof(cmd->body)) / sizeof(SVGA3dShaderRe... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
u32 num_sr_view = (cmd->header.size - sizeof(cmd->body)) / sizeof(SVGA3dShaderRe... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_MAX... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
u32 num_sr_view = (cmd->header.size - sizeof(cmd->body)) / sizeof(SVGA3dShaderRe... | static int vmw_cmd_dx_set_shader_res(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetShaderResources) = container_of(header, typeof(*cmd), header);
- SVGA3dShaderType max_allowed = has_sm5_context(dev_priv) ? SVGA3D_SHADERTYPE_... |
CVE-2022-36402 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | vmw_cmd_dx_set_single_constant_buffer | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
SVGA3dShaderType max_shader_num = has_sm5_context(dev_priv) ? SVGA3D_NUM_SHADERTYPE : SVGA3D_NUM_SHADERTYPE_... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
struct vmw_resource *res = NULL;
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context)... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
SVGA3dShaderType max_shader_num = has_sm5_context(dev_priv) ? SVGA3D_NUM_SHADERTYPE : SVGA3D_NUM_SHADERTYPE_... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
struct vmw_resource *res = NULL;
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context)... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
SVGA3dShaderType max_shader_num = has_sm5_context(dev_priv) ? SVGA3D_NUM_SHADERTYPE : SVGA3D_NUM_SHADERTYPE_... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
struct vmw_resource *res = NULL;
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context)... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
SVGA3dShaderType max_shader_num = has_sm5_context(dev_priv) ? SVGA3D_NUM_SHADERTYPE : SVGA3D_NUM_SHADERTYPE_... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
struct vmw_resource *res = NULL;
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context)... | static int vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXSetSingleConstantBuffer);
- SVGA3dShaderType max_shader_num = has_sm5_context(dev_priv) ? SVGA3D_NUM_SHADERTYPE : SVGA3D_NUM_SHADERTY... |
CVE-2022-36402 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | vmw_cmd_set_shader | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdSetShader);
struct vmw_ctx_bindinfo_shader binding;
struct vmw_resource *ctx, *res = NULL;
struct vmw_ctx_validation_info *ctx_info;
int ret;
... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdSetShader);
struct vmw_ctx_bindinfo_shader binding;
struct vmw_resource *ctx, *res = NULL;
struct vmw_ctx_validation_info *ctx_info;
int ret;
... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdSetShader);
struct vmw_ctx_bindinfo_shader binding;
struct vmw_resource *ctx, *res = NULL;
struct vmw_ctx_validation_info *ctx_info;
int ret;
... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdSetShader);
struct vmw_ctx_bindinfo_shader binding;
struct vmw_resource *ctx, *res = NULL;
struct vmw_ctx_validation_info *ctx_info;
int ret;
... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
struct vmw_resource *ctx, *res = NULL;
cmd = container_of(header, typeof(*cmd), header);
if (cmd->body.type >= SVGA3D_SHADERTYPE_PREDX_MAX) {
VMW_DEBUG_USER("Illegal shader type ... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
struct vmw_resource *ctx, *res = NULL;
cmd = container_of(header, typeof(*cmd), header);
if (!vmw_shadertype_is_valid(VMW_SM_LEGACY, cmd->body.type)) {
VMW_DEBUG_USER("Illegal sh... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct vmw_resource *ctx, *res = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cmd = container_of(header, typeof(*cmd), header);
... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct vmw_resource *ctx, *res = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cmd = container_of(header, typeof(*cmd), header);
... | static int vmw_cmd_set_shader(struct vmw_private *dev_priv, struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) {
struct vmw_resource *ctx, *res = NULL;
cmd = container_of(header, typeof(*cmd), header);
- if (cmd->body.type >= SVGA3D_SHADERTYPE_PREDX_MAX) {
+ if (!vmw_shadertype_is_valid(VMW_SM... |
CVE-2022-3643 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/netback.c | xenvif_get_requests | static struct gnttab_map_grant_ref *xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *txp, struct gnttab_map_grant_ref *gop, unsigned int frag_overflow,
struct sk_buff *nskb) {
struct skb_shared_info *shinfo = skb_shinfo(skb);
skb_frag_t *frags = shinfo->f... | static void xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *first, struct xen_netif_tx_request *txfrags, unsigned *copy_ops, unsigned *map_ops,
unsigned int frag_overflow, struct sk_buff *nskb, unsigned int extra_count, unsigned int data_... | static struct gnttab_map_grant_ref *xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *txp, struct gnttab_map_grant_ref *gop, unsigned int frag_overflow,
struct sk_buff *nskb) {
struct skb_shared_info *shinfo = skb_shinfo(skb);
skb_frag_t *frags = shinfo->f... | static void xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *first, struct xen_netif_tx_request *txfrags, unsigned *copy_ops, unsigned *map_ops,
unsigned int frag_overflow, struct sk_buff *nskb, unsigned int extra_count, unsigned int data_... | static struct gnttab_map_grant_ref *xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *txp, struct gnttab_map_grant_ref *gop, unsigned int frag_overflow,
struct sk_buff *nskb) {
struct skb_shared_info *shinfo = skb_shinfo(skb);
skb_frag_t *frags = shinfo->f... | static void xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *first, struct xen_netif_tx_request *txfrags, unsigned *copy_ops, unsigned *map_ops,
unsigned int frag_overflow, struct sk_buff *nskb, unsigned int extra_count, unsigned int data_... | static struct gnttab_map_grant_ref *xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *txp, struct gnttab_map_grant_ref *gop, unsigned int frag_overflow,
struct sk_buff *nskb) {
struct skb_shared_info *shinfo = skb_shinfo(skb);
skb_frag_t *frags = shinfo->f... | static void xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *first, struct xen_netif_tx_request *txfrags, unsigned *copy_ops, unsigned *map_ops,
unsigned int frag_overflow, struct sk_buff *nskb, unsigned int extra_count, unsigned int data_... | -static struct gnttab_map_grant_ref *xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, struct xen_netif_tx_request *txp, struct gnttab_map_grant_ref *gop, unsigned int frag_overflow,
- struct sk_buff *nskb) {
+static void xenvif_get_requests(struct xenvif_queue *queue, struct sk_buff *skb, str... |
CVE-2022-3643 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/netback.c | xenvif_tx_action | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_copy(q... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops = 0, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_co... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_copy(q... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops = 0, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_co... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_copy(q... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops = 0, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_co... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_copy(q... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
unsigned nr_mops = 0, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {
return 0;
}
gnttab_batch_co... | int xenvif_tx_action(struct xenvif_queue *queue, int budget) {
- unsigned nr_mops, nr_cops = 0;
+ unsigned nr_mops = 0, nr_cops = 0;
int work_done, ret;
if (unlikely(!tx_work_todo(queue))) {
return 0;
}
xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
if (nr_cops == 0) {... |
CVE-2022-3643 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/netback.c | xenvif_tx_build_gops | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct gnttab_map_grant_ref *gop = queue->tx_map_ops;
struct sk_buff *skb, *nskb;
int ret;
unsigned int frag_overflow;
while (skb_queue_len(&queue->tx_queue) < budget) {
struct x... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct sk_buff *skb, *nskb;
int ret;
unsigned int frag_overflow;
while (skb_queue_len(&queue->tx_queue) < budget) {
struct xen_netif_tx_request txreq;
struct xen_netif_tx_req... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct gnttab_map_grant_ref *gop = queue->tx_map_ops;
struct sk_buff *skb, *nskb;
int ret;
unsigned int frag_overflow;
while (skb_queue_len(&queue->tx_queue) < budget) {
struct x... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct sk_buff *skb, *nskb;
int ret;
unsigned int frag_overflow;
while (skb_queue_len(&queue->tx_queue) < budget) {
struct xen_netif_tx_request txreq;
struct xen_netif_tx_req... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct gnttab_map_grant_ref *gop = queue->tx_map_ops;
struct sk_buff *skb, *nskb;
while (skb_queue_len(&queue->tx_queue) < budget) {
struct xen_netif_tx_request txreq;
struct xen... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct sk_buff *skb, *nskb;
while (skb_queue_len(&queue->tx_queue) < budget) {
struct xen_netif_tx_request txreq;
struct xen_netif_tx_request txfrags[XEN_NETBK_LEGACY_SLOTS_MAX];
... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct gnttab_map_grant_ref *gop = queue->tx_map_ops;
struct sk_buff *skb, *nskb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (skb_queue_len(&queue->tx_queue) < budget) {
str... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
struct sk_buff *skb, *nskb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (skb_queue_len(&queue->tx_queue) < budget) {
struct xen_netif_tx_request txreq;
struct xen_netif_t... | static void xenvif_tx_build_gops(struct xenvif_queue *queue, int budget, unsigned *copy_ops, unsigned *map_ops) {
- struct gnttab_map_grant_ref *gop = queue->tx_map_ops;
struct sk_buff *skb, *nskb;
while (skb_queue_len(&queue->tx_queue) < budget) {
struct xen_netif_tx_request txreq;
stru... |
CVE-2022-3643 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/netback.c | xenvif_tx_check_gop | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
struct skb_shared_info *first_shi... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
struct skb_shared_info *first_shi... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
struct skb_shared_info *first_shi... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
u16 pending_idx;
struct skb_shared_info *shinfo = skb_shinfo(skb);
struct skb_shared_info *first_shi... | static int xenvif_tx_check_gop(struct xenvif_queue *queue, struct sk_buff *skb, struct gnttab_map_grant_ref **gopp_map, struct gnttab_copy **gopp_copy) {
struct gnttab_map_grant_ref *gop_map = *gopp_map;
- u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx;
+ u16 pending_idx;
struct skb_shared_info *shin... |
CVE-2022-3643 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/netback.c | xenvif_tx_submit | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
struct sk_buff *skb;
int work_done = 0;
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_request... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
struct sk_buff *skb;
int work_done = 0;
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_request... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
struct sk_buff *skb;
int work_done = 0;
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_request... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
struct sk_buff *skb;
int work_done = 0;
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_request... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_request *txp;
u16 pending_idx;
unsigned... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_request *txp;
u16 pending_idx;
pending_... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_reque... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_reque... | static int xenvif_tx_submit(struct xenvif_queue *queue) {
struct gnttab_map_grant_ref *gop_map = queue->tx_map_ops;
struct gnttab_copy *gop_copy = queue->tx_copy_ops;
while ((skb = __skb_dequeue(&queue->tx_queue)) != NULL) {
struct xen_netif_tx_request *txp;
u16 pending_idx;
- u... |
CVE-2022-3646 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/nilfs2/segment.c | nilfs_attach_log_writer | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
int err;
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writer) {
return -ENOMEM;
}
... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
int err;
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writer) {
return -ENOMEM;
}
... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
int err;
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writer) {
return -ENOMEM;
}
... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
int err;
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writer) {
return -ENOMEM;
}
... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writer) {
return -ENOMEM;
}
inode_atta... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writer) {
return -ENOMEM;
}
inode_atta... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writ... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writ... | int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root) {
struct the_nilfs *nilfs = sb->s_fs_info;
if (nilfs->ns_writer) {
nilfs_detach_log_writer(sb);
}
nilfs->ns_writer = nilfs_segctor_new(sb, root);
if (!nilfs->ns_writer) {
return -ENOMEM;
}
... |
CVE-2022-3649 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/nilfs2/inode.c | nilfs_new_inode | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
struct the_nilfs *nilfs = sb->s_fs_info;
struct inode *inode;
struct nilfs_inode_info *ii;
struct nilfs_root *root;
int err = -ENOMEM;
ino_t ino;
inode = new_inode(sb);
if (unlikely(!... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
struct the_nilfs *nilfs = sb->s_fs_info;
struct inode *inode;
struct nilfs_inode_info *ii;
struct nilfs_root *root;
struct buffer_head *bh;
int err = -ENOMEM;
ino_t ino;
inode = new_i... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
struct the_nilfs *nilfs = sb->s_fs_info;
struct inode *inode;
struct nilfs_inode_info *ii;
struct nilfs_root *root;
int err = -ENOMEM;
ino_t ino;
inode = new_inode(sb);
if (unlikely(!... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
struct the_nilfs *nilfs = sb->s_fs_info;
struct inode *inode;
struct nilfs_inode_info *ii;
struct nilfs_root *root;
struct buffer_head *bh;
int err = -ENOMEM;
ino_t ino;
inode = new_i... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
struct nilfs_root *root;
int err = -ENOMEM;
inode = new_inode(sb);
if (unlikely(!inode)) {
goto failed;
}
root = NILFS_I(dir)->i_root;
ii = NILFS_I(inode);
ii->i_root = root;
... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
struct nilfs_root *root;
struct buffer_head *bh;
int err = -ENOMEM;
inode = new_inode(sb);
if (unlikely(!inode)) {
goto failed;
}
root = NILFS_I(dir)->i_root;
ii = NILFS_I(ino... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct nilfs_root *root;
int err = -ENOMEM;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode = new_inode(sb);
if (unlikely(!inode)) {
... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct nilfs_root *root;
struct buffer_head *bh;
int err = -ENOMEM;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode = new_inode(sb);
if (... | struct inode *nilfs_new_inode(struct inode *dir, umode_t mode) {
struct super_block *sb = dir->i_sb;
struct nilfs_root *root;
+ struct buffer_head *bh;
int err = -ENOMEM;
inode = new_inode(sb);
if (unlikely(!inode)) {
goto failed;
}
root = NILFS_I(dir)->i_root;
ii = ... |
CVE-2022-36879 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/xfrm/xfrm_policy.c | xfrm_expand_policies | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
int i;
if (*num_pols == 0 || !pols[0]) {
*num_pols = 0;
*num_xfrms = 0;
return 0;
}
if (IS_ERR(pols[0])) {
return PTR_ERR(pols[0]);
}
*n... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
int i;
if (*num_pols == 0 || !pols[0]) {
*num_pols = 0;
*num_xfrms = 0;
return 0;
}
if (IS_ERR(pols[0])) {
*num_pols = 0;
return PTR_ERR... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
int i;
if (*num_pols == 0 || !pols[0]) {
*num_pols = 0;
*num_xfrms = 0;
return 0;
}
if (IS_ERR(pols[0])) {
return PTR_ERR(pols[0]);
}
*n... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
int i;
if (*num_pols == 0 || !pols[0]) {
*num_pols = 0;
*num_xfrms = 0;
return 0;
}
if (IS_ERR(pols[0])) {
*num_pols = 0;
return PTR_ERR... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
if (IS_ERR(pols[0])) {
return PTR_ERR(pols[0]);
}
if (pols[0] && pols[0]->action == XFRM_POLICY_ALLOW && pols[0]->type != XFRM_POLICY_TYPE_MA) {
if (pols[1]) {
... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
if (IS_ERR(pols[0])) {
*num_pols = 0;
return PTR_ERR(pols[0]);
}
if (pols[0] && pols[0]->action == XFRM_POLICY_ALLOW && pols[0]->type != XFRM_POLICY_TYPE_MA) {
... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_ERR(pols[0])) {
return PTR_ERR(pols[0]);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (pols[0]->action ==... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_ERR(pols[0])) {
*num_pols = 0;
return PTR_ERR(pols[0]);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) {
if (IS_ERR(pols[0])) {
+ *num_pols = 0;
return PTR_ERR(pols[0]);
}
if (pols[0] && pols[0]->action == XFRM_POLICY_ALLOW && pols[0]->type != XFRM_POLICY_TYPE_MA) ... |
CVE-2022-36946 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/nfnetlink_queue.c | nfqnl_mangle | static int nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff) {
struct sk_buff *nskb;
if (diff < 0) {
if (pskb_trim(e->skb, data_len)) {
return -ENOMEM;
}
} else if (diff > 0) {
if (data_len > 0xFFFF) {
return -EVAL;
}
i... | static int nfqnl_mangle(void *data, unsigned int data_len, struct nf_queue_entry *e, int diff) {
struct sk_buff *nskb;
if (diff < 0) {
unsigned int min_len = skb_transport_offset(e->skb);
if (data_len < min_len) {
return -EVAL;
}
if (pskb_trim(e->skb, data_len)) {
... | static int nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff) {
struct sk_buff *nskb;
if (diff < 0) {
if (pskb_trim(e->skb, data_len)) {
return -ENOMEM;
}
} else if (diff > 0) {
if (data_len > 0xFFFF) {
return -EVAL;
}
i... | static int nfqnl_mangle(void *data, unsigned int data_len, struct nf_queue_entry *e, int diff) {
struct sk_buff *nskb;
if (diff < 0) {
unsigned int min_len = skb_transport_offset(e->skb);
if (data_len < min_len) {
return -EVAL;
}
if (pskb_trim(e->skb, data_len)) {
... | static int nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff) {
if (diff < 0) {
if (pskb_trim(e->skb, data_len)) {
return -ENOMEM;
}
} else if (diff > 0) {
}
if (skb_ensure_writable(e->skb, data_len)) {
return -ENOMEM;
}
skb_copy_to_lin... | static int nfqnl_mangle(void *data, unsigned int data_len, struct nf_queue_entry *e, int diff) {
if (diff < 0) {
unsigned int min_len = skb_transport_offset(e->skb);
if (data_len < min_len) {
return -EVAL;
}
if (pskb_trim(e->skb, data_len)) {
return -ENOMEM;
... | static int nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (diff < 0) {
if (pskb_trim(e->skb, data_len)) {
return -ENOMEM;
}
} else if (diff > 0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int nfqnl_mangle(void *data, unsigned int data_len, struct nf_queue_entry *e, int diff) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (diff < 0) {
unsigned int min_len = skb_transport_offset(e->skb);
if (data_len < min_len) {
return -EVAL;
}
if (pskb_trim(... | -static int nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff) {
+static int nfqnl_mangle(void *data, unsigned int data_len, struct nf_queue_entry *e, int diff) {
if (diff < 0) {
+ unsigned int min_len = skb_transport_offset(e->skb);
+ if (data_len < min_len) {
+ re... |
CVE-2022-3707 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/i915/gvt/gtt.c | split_2MB_gtt_entry | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
const struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
struct intel_vgpu_ppgtt_spt *sub_spt;
struct intel_gvt_gtt_entry sub_se;
unsigned long start_... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
const struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
struct intel_vgpu_ppgtt_spt *sub_spt;
struct intel_gvt_gtt_entry sub_se;
unsigned long start_... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
struct intel_vgpu_ppgtt_spt *sub_spt;
struct intel_gvt_gtt_entry sub_se;
unsigned long start_gfn;
... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
struct intel_vgpu_ppgtt_spt *sub_spt;
struct intel_gvt_gtt_entry sub_se;
unsigned long start_gfn;
... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
const struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
start_gfn = ops->get_pfn(se);
sub_spt = ppgtt_alloc_spt(vgpu, GTT_TYPE_PPGTT_PTE_PT);
if (IS_... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
const struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
start_gfn = ops->get_pfn(se);
sub_spt = ppgtt_alloc_spt(vgpu, GTT_TYPE_PPGTT_PTE_PT);
if (IS_... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
start_gfn = ops->get_pfn(se);
sub_spt = ppgtt_alloc_s... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
start_gfn = ops->get_pfn(se);
sub_spt = ppgtt_alloc_s... | static int split_2MB_gtt_entry(struct intel_vgpu *vgpu, struct intel_vgpu_ppgtt_spt *spt, unsigned long index, struct intel_gvt_gtt_entry *se) {
const struct intel_gvt_gtt_pte_ops *ops = vgpu->gvt->gtt.pte_ops;
start_gfn = ops->get_pfn(se);
sub_spt = ppgtt_alloc_spt(vgpu, GTT_TYPE_PPGTT_PTE_PT);
if... |
CVE-2022-39189 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/svm.c | svm_handle_exit_irqoff | static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
} | static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
if (to_svm(vcpu)->vmcb->control.exit_code == SVM_EXIT_TR) {
vcpu->arch.at_instruction_boundary = true;
}
} | static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
} | static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
if (to_svm(vcpu)->vmcb->control.exit_code == SVM_EXIT_TR) {
vcpu->arch.at_instruction_boundary = true;
}
} | static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
}
| static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
if (to_svm(vcpu)->vmcb->control.exit_code == SVM_EXIT_TR) {
vcpu->arch.at_instruction_boundary = true;
}
}
| static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
}
| static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
if (to_svm(vcpu)->vmcb->control.exit_code == SVM_EXIT_TR) {
vcpu->arch.at_instruction_boundary = true;
}
} | static void svm_handle_exit_irqoff(struct kvm_vcpu *vcpu) {
+ if (to_svm(vcpu)->vmcb->control.exit_code == SVM_EXIT_TR) {
+ vcpu->arch.at_instruction_boundary = true;
+ }
} |
CVE-2022-39189 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/vmx/vmx.c | handle_external_interrupt_irqoff | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
u32 intr_info = vmx_get_intr_info(vcpu);
unsigned int vector = intr_info & TR_FO_VECTOR_MASK;
gate_desc *desc = (gate_desc *)host_idt_base + vector;
if (KVM_BUG(!is_external_intr(intr_info), vcpu->kvm, "KVM: unexpected VM-Exit interru... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
u32 intr_info = vmx_get_intr_info(vcpu);
unsigned int vector = intr_info & TR_FO_VECTOR_MASK;
gate_desc *desc = (gate_desc *)host_idt_base + vector;
if (KVM_BUG(!is_external_intr(intr_info), vcpu->kvm, "KVM: unexpected VM-Exit interru... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
unsigned int vector;
unsigned long entry;
unsigned long tmp;
gate_desc *desc;
u32 intr_info;
intr_info = vmcs_read32(VM_EXIT_TR_FO);
if (WARN_ONCE(!is_external_intr(intr_info), "KVM: unexpected VM-Exit interrupt info: 0x%x... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
unsigned int vector;
unsigned long entry;
unsigned long tmp;
gate_desc *desc;
u32 intr_info;
intr_info = vmcs_read32(VM_EXIT_TR_FO);
if (WARN_ONCE(!is_external_intr(intr_info), "KVM: unexpected VM-Exit interrupt info: 0x%x... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
u32 intr_info = vmx_get_intr_info(vcpu);
unsigned int vector = intr_info & TR_FO_VECTOR_MASK;
gate_desc *desc = (gate_desc *)host_idt_base + vector;
if (KVM_BUG(!is_external_intr(intr_info), vcpu->kvm, "KVM: unexpected VM-Exit interru... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
u32 intr_info = vmx_get_intr_info(vcpu);
unsigned int vector = intr_info & TR_FO_VECTOR_MASK;
gate_desc *desc = (gate_desc *)host_idt_base + vector;
if (KVM_BUG(!is_external_intr(intr_info), vcpu->kvm, "KVM: unexpected VM-Exit interru... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
unsigned int vector;
unsigned long entry;
unsigned long tmp;
gate_desc *desc;
u32 intr_info;
intr_info = vmcs_read32(VM_EXIT_TR_FO);
if (WARN_ONCE(!is_external_intr(intr_info), "KVM: unexpected VM-Exit interrupt info: 0x%x... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
unsigned int vector;
unsigned long entry;
unsigned long tmp;
gate_desc *desc;
u32 intr_info;
intr_info = vmcs_read32(VM_EXIT_TR_FO);
if (WARN_ONCE(!is_external_intr(intr_info), "KVM: unexpected VM-Exit interrupt info: 0x%x... | static void handle_external_interrupt_irqoff(struct kvm_vcpu *vcpu) {
u32 intr_info = vmx_get_intr_info(vcpu);
unsigned int vector = intr_info & TR_FO_VECTOR_MASK;
gate_desc *desc = (gate_desc *)host_idt_base + vector;
if (KVM_BUG(!is_external_intr(intr_info), vcpu->kvm, "KVM: unexpected VM-Exit in... |
CVE-2022-39189 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/x86.c | kvm_steal_time_set_preempted | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
struct gfn_to_hva_cache *ghc = &vcpu->arch.st.cache;
struct kvm_steal_time *st;
struct kvm_memslots *slots;
static const u8 preempted = KVM_VCPU_PREEMPTED;
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
if... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
struct gfn_to_hva_cache *ghc = &vcpu->arch.st.cache;
struct kvm_steal_time *st;
struct kvm_memslots *slots;
static const u8 preempted = KVM_VCPU_PREEMPTED;
if (!vcpu->arch.at_instruction_boundary) {
vcpu->stat.preemption_other... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
struct kvm_host_map map;
struct kvm_steal_time *st;
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
if (vcpu->arch.st.preempted) {
return;
}
if (kvm_map_gfn(vcpu, vcpu->arch.st.msr_val >> PAGE_SHIFT... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
struct kvm_host_map map;
struct kvm_steal_time *st;
if (!vcpu->arch.at_instruction_boundary) {
vcpu->stat.preemption_other++;
return;
}
vcpu->stat.preemption_reported++;
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLE... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
static const u8 preempted = KVM_VCPU_PREEMPTED;
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
}
| static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
static const u8 preempted = KVM_VCPU_PREEMPTED;
if (!vcpu->arch.at_instruction_boundary) {
vcpu->stat.preemption_other++;
return;
}
vcpu->stat.preemption_reported++;
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!vcpu->arch.at_instruction_boundary) {
vcpu->stat.preemption_other++;
return;
}
vcpu->stat.preemption_reported++;
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
static const u8 preempted = KVM_VCPU_PREEMPTED;
+ if (!vcpu->arch.at_instruction_boundary) {
+ vcpu->stat.preemption_other++;
+ return;
+ }
+ vcpu->stat.preemption_reported++;
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLE... |
CVE-2022-39189 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/x86.c | vcpu_run | static int vcpu_run(struct kvm_vcpu *vcpu) {
int r;
struct kvm *kvm = vcpu->kvm;
vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
if (kvm_vcpu_running(vcpu)) {
r = vcpu_enter_guest(vcpu);
} else {
r = vcpu_block(kvm, vc... | static int vcpu_run(struct kvm_vcpu *vcpu) {
int r;
struct kvm *kvm = vcpu->kvm;
vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
vcpu->arch.at_instruction_boundary = false;
if (kvm_vcpu_running(vcpu)) {
r = vcpu_enter_guest(vcpu);... | static int vcpu_run(struct kvm_vcpu *vcpu) {
int r;
struct kvm *kvm = vcpu->kvm;
vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
if (kvm_vcpu_running(vcpu)) {
r = vcpu_enter_guest(vcpu);
} else {
r = vcpu_block(kvm, vc... | static int vcpu_run(struct kvm_vcpu *vcpu) {
int r;
struct kvm *kvm = vcpu->kvm;
vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
vcpu->arch.at_instruction_boundary = false;
if (kvm_vcpu_running(vcpu)) {
r = vcpu_enter_guest(vcpu);... | static int vcpu_run(struct kvm_vcpu *vcpu) {
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
if (kvm_vcpu_running(vcpu)) {
} else {
}
if (__xfer_to_guest_mode_work_pending()) {
vcpu->srcu_idx = srcu_read_lock(&kvm->srcu);
}
}
}
| static int vcpu_run(struct kvm_vcpu *vcpu) {
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
vcpu->arch.at_instruction_boundary = false;
if (kvm_vcpu_running(vcpu)) {
} else {
}
if (__xfer_to_guest_mode_work_pending()) {
vcpu->srcu_idx = srcu_read_lock(&kvm->srcu... | static int vcpu_run(struct kvm_vcpu *vcpu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
if (kvm_vcpu_running(vcpu)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* ... | static int vcpu_run(struct kvm_vcpu *vcpu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
vcpu->arch.at_instruction_boundary = false;
if (kvm_vcpu_running(vcpu)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOL... | static int vcpu_run(struct kvm_vcpu *vcpu) {
vcpu->arch.l1tf_flush_l1d = true;
for (;;) {
+ vcpu->arch.at_instruction_boundary = false;
if (kvm_vcpu_running(vcpu)) {
} else {
}
if (__xfer_to_guest_mode_work_pending()) {
vcpu->srcu_idx = srcu_read_lock(&... |
CVE-2022-39190 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/nf_tables_api.c | nft_verdict_init | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
struct nlattr *tb[NFTA_VERDICT_MAX + 1];
struct nft_chain *chain;
int err;
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
struct nlattr *tb[NFTA_VERDICT_MAX + 1];
struct nft_chain *chain;
int err;
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
struct nlattr *tb[NFTA_VERDICT_MAX + 1];
struct nft_chain *chain;
int err;
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
struct nlattr *tb[NFTA_VERDICT_MAX + 1];
struct nft_chain *chain;
int err;
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT_MAX, nla, nft_verdict_policy, NULL);
switch (data->verdict.code) {
case NFT_GO... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT_MAX, nla, nft_verdict_policy, NULL);
switch (data->verdict.code) {
case NFT_GO... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT_MAX, nla, nft_verdict_policy, NULL);... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT_MAX, nla, nft_verdict_policy, NULL);... | static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) {
u8 genmask = nft_genmask_next(ctx->net);
err = nla_parse_nested_deprecated(tb, NFTA_VERDICT_MAX, nla, nft_verdict_policy, NULL);
switch (data->verdict.code) {
case N... |
CVE-2022-39842 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/video/fbdev/pxa3xx-gcu.c | pxa3xx_gcu_write | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
int ret;
unsigned long flags;
struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
int words = count / 4;
priv->shared->num_writes++;
priv->shared->num_word... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
int ret;
unsigned long flags;
struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
size_t words = count / 4;
priv->shared->num_writes++;
priv->shared->num_w... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
int ret;
unsigned long flags;
struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
int words = count / 4;
priv->shared->num_writes++;
priv->shared->num_word... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
int ret;
unsigned long flags;
struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
size_t words = count / 4;
priv->shared->num_writes++;
priv->shared->num_w... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
int words = count / 4;
priv->shared->num_writes++;
priv->shared->num_words += words;
if (words >= PXA3XX_GCU_BATCH_WORDS) {
return -E2BI... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
size_t words = count / 4;
priv->shared->num_writes++;
priv->shared->num_words += words;
if (words >= PXA3XX_GCU_BATCH_WORDS) {
return -E... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
int words = count / 4;
priv->shared->num_writes++;
priv->shared->num_words += words;
if (words... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
size_t words = count / 4;
priv->shared->num_writes++;
priv->shared->num_words += words;
if (wo... | static ssize_t pxa3xx_gcu_write(struct file *file, const char *buff, size_t count, loff_t *offp) {
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
- int words = count / 4;
+ size_t words = count / 4;
priv->shared->num_writes++;
priv->shared->num_words += words;
if (words >= PXA3XX_GC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.