Skip to content

Commit

Permalink
Merge tag 'v5.10.55' into 5.10
Browse files Browse the repository at this point in the history
This is the 5.10.55 stable release
  • Loading branch information
xanmod committed Jul 31, 2021
2 parents edbcebf + 11fe69a commit acc3bdb
Show file tree
Hide file tree
Showing 27 changed files with 216 additions and 69 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 10
SUBLEVEL = 54
SUBLEVEL = 55
EXTRAVERSION =
NAME = Dare mighty things

Expand Down
5 changes: 2 additions & 3 deletions arch/arm/boot/dts/versatile-ab.dts
Expand Up @@ -195,16 +195,15 @@
#size-cells = <1>;
ranges;

vic: intc@10140000 {
vic: interrupt-controller@10140000 {
compatible = "arm,versatile-vic";
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x10140000 0x1000>;
clear-mask = <0xffffffff>;
valid-mask = <0xffffffff>;
};

sic: intc@10003000 {
sic: interrupt-controller@10003000 {
compatible = "arm,versatile-sic";
interrupt-controller;
#interrupt-cells = <1>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/versatile-pb.dts
Expand Up @@ -7,7 +7,7 @@

amba {
/* The Versatile PB is using more SIC IRQ lines than the AB */
sic: intc@10003000 {
sic: interrupt-controller@10003000 {
clear-mask = <0xffffffff>;
/*
* Valid interrupt lines mask according to
Expand Down
13 changes: 9 additions & 4 deletions arch/x86/kvm/x86.c
Expand Up @@ -541,8 +541,6 @@ static void kvm_multiple_exception(struct kvm_vcpu *vcpu,

if (!vcpu->arch.exception.pending && !vcpu->arch.exception.injected) {
queue:
if (has_error && !is_protmode(vcpu))
has_error = false;
if (reinject) {
/*
* On vmentry, vcpu->arch.exception.pending is only
Expand Down Expand Up @@ -8265,6 +8263,13 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu)
kvm_x86_ops.update_cr8_intercept(vcpu, tpr, max_irr);
}

static void kvm_inject_exception(struct kvm_vcpu *vcpu)
{
if (vcpu->arch.exception.error_code && !is_protmode(vcpu))
vcpu->arch.exception.error_code = false;
kvm_x86_ops.queue_exception(vcpu);
}

static void inject_pending_event(struct kvm_vcpu *vcpu, bool *req_immediate_exit)
{
int r;
Expand All @@ -8273,7 +8278,7 @@ static void inject_pending_event(struct kvm_vcpu *vcpu, bool *req_immediate_exit
/* try to reinject previous events if any */

if (vcpu->arch.exception.injected) {
kvm_x86_ops.queue_exception(vcpu);
kvm_inject_exception(vcpu);
can_inject = false;
}
/*
Expand Down Expand Up @@ -8336,7 +8341,7 @@ static void inject_pending_event(struct kvm_vcpu *vcpu, bool *req_immediate_exit
}
}

kvm_x86_ops.queue_exception(vcpu);
kvm_inject_exception(vcpu);
can_inject = false;
}

Expand Down
12 changes: 7 additions & 5 deletions drivers/firmware/arm_scmi/driver.c
Expand Up @@ -43,7 +43,6 @@ enum scmi_error_codes {
SCMI_ERR_GENERIC = -8, /* Generic Error */
SCMI_ERR_HARDWARE = -9, /* Hardware Error */
SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
SCMI_ERR_MAX
};

/* List of all SCMI devices active in system */
Expand Down Expand Up @@ -118,8 +117,10 @@ static const int scmi_linux_errmap[] = {

static inline int scmi_to_linux_errno(int errno)
{
if (errno < SCMI_SUCCESS && errno > SCMI_ERR_MAX)
return scmi_linux_errmap[-errno];
int err_idx = -errno;

if (err_idx >= SCMI_SUCCESS && err_idx < ARRAY_SIZE(scmi_linux_errmap))
return scmi_linux_errmap[err_idx];
return -EIO;
}

Expand Down Expand Up @@ -614,8 +615,9 @@ static int __scmi_xfer_info_init(struct scmi_info *sinfo,
const struct scmi_desc *desc = sinfo->desc;

/* Pre-allocated messages, no more than what hdr.seq can support */
if (WARN_ON(desc->max_msg >= MSG_TOKEN_MAX)) {
dev_err(dev, "Maximum message of %d exceeds supported %ld\n",
if (WARN_ON(!desc->max_msg || desc->max_msg > MSG_TOKEN_MAX)) {
dev_err(dev,
"Invalid maximum messages %d, not in range [1 - %lu]\n",
desc->max_msg, MSG_TOKEN_MAX);
return -EINVAL;
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/ttm/ttm_range_manager.c
Expand Up @@ -147,6 +147,9 @@ int ttm_range_man_fini(struct ttm_bo_device *bdev,
struct drm_mm *mm = &rman->mm;
int ret;

if (!man)
return 0;

ttm_resource_manager_set_used(man, false);

ret = ttm_resource_manager_force_list_clean(bdev, man);
Expand Down
4 changes: 2 additions & 2 deletions fs/cifs/smb2ops.c
Expand Up @@ -497,8 +497,8 @@ parse_server_interfaces(struct network_interface_info_ioctl_rsp *buf,
p = buf;
while (bytes_left >= sizeof(*p)) {
info->speed = le64_to_cpu(p->LinkSpeed);
info->rdma_capable = le32_to_cpu(p->Capability & RDMA_CAPABLE);
info->rss_capable = le32_to_cpu(p->Capability & RSS_CAPABLE);
info->rdma_capable = le32_to_cpu(p->Capability & RDMA_CAPABLE) ? 1 : 0;
info->rss_capable = le32_to_cpu(p->Capability & RSS_CAPABLE) ? 1 : 0;

cifs_dbg(FYI, "%s: adding iface %zu\n", __func__, *iface_count);
cifs_dbg(FYI, "%s: speed %zu bps\n", __func__, info->speed);
Expand Down
14 changes: 13 additions & 1 deletion fs/hfs/bfind.c
Expand Up @@ -25,7 +25,19 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
fd->key = ptr + tree->max_key_len + 2;
hfs_dbg(BNODE_REFS, "find_init: %d (%p)\n",
tree->cnid, __builtin_return_address(0));
mutex_lock(&tree->tree_lock);
switch (tree->cnid) {
case HFS_CAT_CNID:
mutex_lock_nested(&tree->tree_lock, CATALOG_BTREE_MUTEX);
break;
case HFS_EXT_CNID:
mutex_lock_nested(&tree->tree_lock, EXTENTS_BTREE_MUTEX);
break;
case HFS_ATTR_CNID:
mutex_lock_nested(&tree->tree_lock, ATTR_BTREE_MUTEX);
break;
default:
return -EINVAL;
}
return 0;
}

Expand Down
25 changes: 20 additions & 5 deletions fs/hfs/bnode.c
Expand Up @@ -15,16 +15,31 @@

#include "btree.h"

void hfs_bnode_read(struct hfs_bnode *node, void *buf,
int off, int len)
void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len)
{
struct page *page;
int pagenum;
int bytes_read;
int bytes_to_read;
void *vaddr;

off += node->page_offset;
page = node->page[0];
pagenum = off >> PAGE_SHIFT;
off &= ~PAGE_MASK; /* compute page offset for the first page */

memcpy(buf, kmap(page) + off, len);
kunmap(page);
for (bytes_read = 0; bytes_read < len; bytes_read += bytes_to_read) {
if (pagenum >= node->tree->pages_per_bnode)
break;
page = node->page[pagenum];
bytes_to_read = min_t(int, len - bytes_read, PAGE_SIZE - off);

vaddr = kmap_atomic(page);
memcpy(buf + bytes_read, vaddr + off, bytes_to_read);
kunmap_atomic(vaddr);

pagenum++;
off = 0; /* page offset only applies to the first page */
}
}

u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off)
Expand Down
7 changes: 7 additions & 0 deletions fs/hfs/btree.h
Expand Up @@ -13,6 +13,13 @@ typedef int (*btree_keycmp)(const btree_key *, const btree_key *);

#define NODE_HASH_SIZE 256

/* B-tree mutex nested subclasses */
enum hfs_btree_mutex_classes {
CATALOG_BTREE_MUTEX,
EXTENTS_BTREE_MUTEX,
ATTR_BTREE_MUTEX,
};

/* A HFS BTree held in memory */
struct hfs_btree {
struct super_block *sb;
Expand Down
10 changes: 5 additions & 5 deletions fs/hfs/super.c
Expand Up @@ -420,14 +420,12 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
if (!res) {
if (fd.entrylength > sizeof(rec) || fd.entrylength < 0) {
res = -EIO;
goto bail;
goto bail_hfs_find;
}
hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, fd.entrylength);
}
if (res) {
hfs_find_exit(&fd);
goto bail_no_root;
}
if (res)
goto bail_hfs_find;
res = -EINVAL;
root_inode = hfs_iget(sb, &fd.search_key->cat, &rec);
hfs_find_exit(&fd);
Expand All @@ -443,6 +441,8 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
/* everything's okay */
return 0;

bail_hfs_find:
hfs_find_exit(&fd);
bail_no_root:
pr_err("get root inode failed\n");
bail:
Expand Down
1 change: 0 additions & 1 deletion fs/internal.h
Expand Up @@ -64,7 +64,6 @@ extern void __init chrdev_init(void);
*/
extern const struct fs_context_operations legacy_fs_context_ops;
extern int parse_monolithic_mount_data(struct fs_context *, void *);
extern void fc_drop_locked(struct fs_context *);
extern void vfs_clean_context(struct fs_context *fc);
extern int finish_clean_context(struct fs_context *fc);

Expand Down
1 change: 0 additions & 1 deletion fs/io_uring.c
Expand Up @@ -6266,7 +6266,6 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
if (prev) {
io_async_find_and_cancel(ctx, req, prev->user_data, -ETIME);
io_put_req_deferred(prev, 1);
io_put_req_deferred(req, 1);
} else {
io_cqring_add_event(req, -ETIME, 0);
io_put_req_deferred(req, 1);
Expand Down
25 changes: 9 additions & 16 deletions fs/iomap/seek.c
Expand Up @@ -140,23 +140,20 @@ loff_t
iomap_seek_hole(struct inode *inode, loff_t offset, const struct iomap_ops *ops)
{
loff_t size = i_size_read(inode);
loff_t length = size - offset;
loff_t ret;

/* Nothing to be found before or beyond the end of the file. */
if (offset < 0 || offset >= size)
return -ENXIO;

while (length > 0) {
ret = iomap_apply(inode, offset, length, IOMAP_REPORT, ops,
&offset, iomap_seek_hole_actor);
while (offset < size) {
ret = iomap_apply(inode, offset, size - offset, IOMAP_REPORT,
ops, &offset, iomap_seek_hole_actor);
if (ret < 0)
return ret;
if (ret == 0)
break;

offset += ret;
length -= ret;
}

return offset;
Expand Down Expand Up @@ -186,27 +183,23 @@ loff_t
iomap_seek_data(struct inode *inode, loff_t offset, const struct iomap_ops *ops)
{
loff_t size = i_size_read(inode);
loff_t length = size - offset;
loff_t ret;

/* Nothing to be found before or beyond the end of the file. */
if (offset < 0 || offset >= size)
return -ENXIO;

while (length > 0) {
ret = iomap_apply(inode, offset, length, IOMAP_REPORT, ops,
&offset, iomap_seek_data_actor);
while (offset < size) {
ret = iomap_apply(inode, offset, size - offset, IOMAP_REPORT,
ops, &offset, iomap_seek_data_actor);
if (ret < 0)
return ret;
if (ret == 0)
break;

return offset;
offset += ret;
length -= ret;
}

if (length <= 0)
return -ENXIO;
return offset;
/* We've reached the end of the file without finding data */
return -ENXIO;
}
EXPORT_SYMBOL_GPL(iomap_seek_data);
1 change: 1 addition & 0 deletions include/linux/fs_context.h
Expand Up @@ -139,6 +139,7 @@ extern int vfs_parse_fs_string(struct fs_context *fc, const char *key,
extern int generic_parse_monolithic(struct fs_context *fc, void *data);
extern int vfs_get_tree(struct fs_context *fc);
extern void put_fs_context(struct fs_context *fc);
extern void fc_drop_locked(struct fs_context *fc);

/*
* sget() wrappers to be called from the ->get_tree() op.
Expand Down
2 changes: 1 addition & 1 deletion include/net/busy_poll.h
Expand Up @@ -36,7 +36,7 @@ static inline bool net_busy_loop_on(void)

static inline bool sk_can_busy_loop(const struct sock *sk)
{
return sk->sk_ll_usec && !signal_pending(current);
return READ_ONCE(sk->sk_ll_usec) && !signal_pending(current);
}

bool sk_busy_loop_end(void *p, unsigned long start_time);
Expand Down
4 changes: 1 addition & 3 deletions include/net/sctp/constants.h
Expand Up @@ -340,16 +340,14 @@ enum {
#define SCTP_SCOPE_POLICY_MAX SCTP_SCOPE_POLICY_LINK

/* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>,
* SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24,
* 192.88.99.0/24.
* SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 192.88.99.0/24.
* Also, RFC 8.4, non-unicast addresses are not considered valid SCTP
* addresses.
*/
#define IS_IPV4_UNUSABLE_ADDRESS(a) \
((htonl(INADDR_BROADCAST) == a) || \
ipv4_is_multicast(a) || \
ipv4_is_zeronet(a) || \
ipv4_is_test_198(a) || \
ipv4_is_anycast_6to4(a))

/* Flags used for the bind address copy functions. */
Expand Down
4 changes: 1 addition & 3 deletions kernel/cgroup/cgroup-v1.c
Expand Up @@ -1225,9 +1225,7 @@ int cgroup1_get_tree(struct fs_context *fc)
ret = cgroup_do_get_tree(fc);

if (!ret && percpu_ref_is_dying(&ctx->root->cgrp.self.refcnt)) {
struct super_block *sb = fc->root->d_sb;
dput(fc->root);
deactivate_locked_super(sb);
fc_drop_locked(fc);
ret = 1;
}

Expand Down
6 changes: 2 additions & 4 deletions kernel/rcu/tasks.h
Expand Up @@ -879,10 +879,9 @@ static bool trc_inspect_reader(struct task_struct *t, void *arg)
in_qs = likely(!t->trc_reader_nesting);
}

// Mark as checked. Because this is called from the grace-period
// kthread, also remove the task from the holdout list.
// Mark as checked so that the grace-period kthread will
// remove it from the holdout list.
t->trc_reader_checked = true;
trc_del_holdout(t);

if (in_qs)
return true; // Already in quiescent state, done!!!
Expand All @@ -909,7 +908,6 @@ static void trc_wait_for_one_reader(struct task_struct *t,
// The current task had better be in a quiescent state.
if (t == current) {
t->trc_reader_checked = true;
trc_del_holdout(t);
WARN_ON_ONCE(t->trc_reader_nesting);
return;
}
Expand Down

0 comments on commit acc3bdb

Please sign in to comment.