Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions arch/x86/um/ldt.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ static long write_ldt_entry(struct mm_id *mm_idp, int func,
{
long res;
void *stub_addr;

BUILD_BUG_ON(sizeof(*desc) % sizeof(long));

res = syscall_stub_data(mm_idp, (unsigned long *)desc,
(sizeof(*desc) + sizeof(long) - 1) &
~(sizeof(long) - 1),
sizeof(*desc) / sizeof(long),
addr, &stub_addr);
if (!res) {
unsigned long args[] = { func,
Expand Down
2 changes: 1 addition & 1 deletion drivers/nvme/host/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ static void nvme_tcp_io_work(struct work_struct *w)
else if (unlikely(result < 0))
return;

if (!pending)
if (!pending || !queue->rd_enabled)
return;

} while (!time_after(jiffies, deadline)); /* quota is exhausted */
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/mpt3sas/mpt3sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -3669,6 +3669,7 @@ static struct fw_event_work *dequeue_next_fw_event(struct MPT3SAS_ADAPTER *ioc)
fw_event = list_first_entry(&ioc->fw_event_list,
struct fw_event_work, list);
list_del_init(&fw_event->list);
fw_event_work_put(fw_event);
}
spin_unlock_irqrestore(&ioc->fw_event_lock, flags);

Expand Down Expand Up @@ -3750,7 +3751,6 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc)
if (cancel_work_sync(&fw_event->work))
fw_event_work_put(fw_event);

fw_event_work_put(fw_event);
}
ioc->fw_events_cleanup = 0;
}
Expand Down
5 changes: 4 additions & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -5924,7 +5924,8 @@ static char *create_unique_id(struct kmem_cache *s)
char *name = kmalloc(ID_STR_LENGTH, GFP_KERNEL);
char *p = name;

BUG_ON(!name);
if (!name)
return ERR_PTR(-ENOMEM);

*p++ = ':';
/*
Expand Down Expand Up @@ -5982,6 +5983,8 @@ static int sysfs_slab_add(struct kmem_cache *s)
* for the symlinks.
*/
name = create_unique_id(s);
if (IS_ERR(name))
return PTR_ERR(name);
}

s->kobj.kset = kset;
Expand Down
5 changes: 5 additions & 0 deletions net/ipv6/seg6.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ static int seg6_genl_sethmac(struct sk_buff *skb, struct genl_info *info)
goto out_unlock;
}

if (slen > nla_len(info->attrs[SEG6_ATTR_SECRET])) {
err = -EINVAL;
goto out_unlock;
}

if (hinfo) {
err = seg6_hmac_info_del(net, hmackeyid);
if (err)
Expand Down
4 changes: 3 additions & 1 deletion net/netfilter/nf_tables_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -3555,6 +3555,7 @@ static struct nft_set *nft_set_lookup_byhandle(const struct nft_table *table,
}

static struct nft_set *nft_set_lookup_byid(const struct net *net,
const struct nft_table *table,
const struct nlattr *nla, u8 genmask)
{
struct nft_trans *trans;
Expand All @@ -3565,6 +3566,7 @@ static struct nft_set *nft_set_lookup_byid(const struct net *net,
struct nft_set *set = nft_trans_set(trans);

if (id == nft_trans_set_id(trans) &&
set->table == table &&
nft_active_genmask(set, genmask))
return set;
}
Expand All @@ -3585,7 +3587,7 @@ struct nft_set *nft_set_lookup_global(const struct net *net,
if (!nla_set_id)
return set;

set = nft_set_lookup_byid(net, nla_set_id, genmask);
set = nft_set_lookup_byid(net, table, nla_set_id, genmask);
}
return set;
}
Expand Down
18 changes: 14 additions & 4 deletions net/sctp/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,12 +885,17 @@ int sctp_auth_set_key(struct sctp_endpoint *ep,
}

list_del_init(&shkey->key_list);
sctp_auth_shkey_release(shkey);
list_add(&cur_key->key_list, sh_keys);

if (asoc && asoc->active_key_id == auth_key->sca_keynumber)
sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL);
if (asoc && asoc->active_key_id == auth_key->sca_keynumber &&
sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL)) {
list_del_init(&cur_key->key_list);
sctp_auth_shkey_release(cur_key);
list_add(&shkey->key_list, sh_keys);
return -ENOMEM;
}

sctp_auth_shkey_release(shkey);
return 0;
}

Expand Down Expand Up @@ -924,8 +929,13 @@ int sctp_auth_set_active_key(struct sctp_endpoint *ep,
return -EINVAL;

if (asoc) {
__u16 active_key_id = asoc->active_key_id;

asoc->active_key_id = key_id;
sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL);
if (sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL)) {
asoc->active_key_id = active_key_id;
return -ENOMEM;
}
} else
ep->active_key_id = key_id;

Expand Down
2 changes: 1 addition & 1 deletion sound/usb/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
* Dallas DS4201 workaround: It presents 5 altsettings, but the last
* one misses syncpipe, and does not produce any sound.
*/
if (chip->usb_id == USB_ID(0x04fa, 0x4201))
if (chip->usb_id == USB_ID(0x04fa, 0x4201) && num >= 4)
num = 4;

for (i = 0; i < num; i++) {
Expand Down
Loading