Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 5.4-2.3.x-imx up to v5.4.113 #312

Merged
merged 20 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
cc678e2
interconnect: core: fix error return code of icc_link_destroy()
XidianGeneral Mar 8, 2021
2012f9f
KVM: arm64: Hide system instruction access to Trace registers
Mar 23, 2021
e1ff1c6
KVM: arm64: Disable guest access to trace filter controls
Mar 23, 2021
3c89c72
drm/imx: imx-ldb: fix out of bounds array access warning
arndb Mar 24, 2021
db162d8
gfs2: report "already frozen/thawed" errors
AstralBob Mar 25, 2021
5b8f896
drm/tegra: dc: Don't set PLL clock to 0Hz
digetx Mar 2, 2021
f5b60f2
block: only update parent bi_status when bio fail
Mar 31, 2021
cde8907
radix tree test suite: Register the main thread with the RCU library
Mar 31, 2021
b9299c2
idr test suite: Take RCU read lock in idr_find_test_1
Apr 1, 2021
90b71ae
idr test suite: Create anchor before launching throbber
Apr 1, 2021
2d71bff
riscv,entry: fix misaligned base for excp_vect_table
sashimi-yzh Mar 17, 2021
8119a2b
block: don't ignore REQ_NOWAIT for direct IO
isilence Nov 20, 2020
cc59b87
netfilter: x_tables: fix compat match/target pad out-of-bound write
Apr 7, 2021
799f02f
driver core: Fix locking bug in deferred_probe_timeout_work_func()
Apr 2, 2021
2715a4c
perf tools: Use %define api.pure full instead of %pure-parser
Jan 12, 2020
d462247
perf tools: Use %zd for size_t printf formats on 32-bit
ickle Aug 20, 2020
4ea6097
perf map: Tighten snprintf() string precision to pass gcc check on so…
acmel Mar 5, 2021
94371b6
xen/events: fix setting irq affinity
jgross1 Apr 12, 2021
ab3bed8
Linux 5.4.113
gregkh Apr 16, 2021
98ba447
Merge tag 'v5.4.113' into 5.4-2.3.x-imx
zandrey Apr 16, 2021
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 112
SUBLEVEL = 113
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down
1 change: 1 addition & 0 deletions arch/arm64/include/asm/kvm_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
#define CPTR_EL2_DEFAULT CPTR_EL2_RES1

/* Hyp Debug Configuration Register bits */
#define MDCR_EL2_TTRF (1 << 19)
#define MDCR_EL2_TPMS (1 << 14)
#define MDCR_EL2_E2PB_MASK (UL(0x3))
#define MDCR_EL2_E2PB_SHIFT (UL(12))
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/kernel/cpufeature.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ static const struct arm64_ftr_bits ftr_id_aa64dfr0[] = {
* of support.
*/
S_ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_EXACT, ID_AA64DFR0_PMUVER_SHIFT, 4, 0),
ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_EXACT, ID_AA64DFR0_TRACEVER_SHIFT, 4, 0),
ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_EXACT, ID_AA64DFR0_DEBUGVER_SHIFT, 4, 0x6),
ARM64_FTR_END,
};
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/kvm/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu)
* - Debug ROM Address (MDCR_EL2_TDRA)
* - OS related registers (MDCR_EL2_TDOSA)
* - Statistical profiler (MDCR_EL2_TPMS/MDCR_EL2_E2PB)
* - Self-hosted Trace Filter controls (MDCR_EL2_TTRF)
*
* Additionally, KVM only traps guest accesses to the debug registers if
* the guest is not actively using them (see the KVM_ARM64_DEBUG_DIRTY
Expand All @@ -112,6 +113,7 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
vcpu->arch.mdcr_el2 = __this_cpu_read(mdcr_el2) & MDCR_EL2_HPMN_MASK;
vcpu->arch.mdcr_el2 |= (MDCR_EL2_TPM |
MDCR_EL2_TPMS |
MDCR_EL2_TTRF |
MDCR_EL2_TPMCR |
MDCR_EL2_TDRA |
MDCR_EL2_TDOSA);
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ ENTRY(__switch_to)
ENDPROC(__switch_to)

.section ".rodata"
.align LGREG
/* Exception vector table */
ENTRY(excp_vect_table)
RISCV_PTR do_trap_insn_misaligned
Expand Down
2 changes: 1 addition & 1 deletion block/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static struct bio *__bio_chain_endio(struct bio *bio)
{
struct bio *parent = bio->bi_private;

if (!parent->bi_status)
if (bio->bi_status && !parent->bi_status)
parent->bi_status = bio->bi_status;
bio_put(bio);
return parent;
Expand Down
8 changes: 5 additions & 3 deletions drivers/base/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,16 @@ int driver_deferred_probe_check_state_continue(struct device *dev)

static void deferred_probe_timeout_work_func(struct work_struct *work)
{
struct device_private *private, *p;
struct device_private *p;

deferred_probe_timeout = 0;
driver_deferred_probe_trigger();
flush_work(&deferred_probe_work);

list_for_each_entry_safe(private, p, &deferred_probe_pending_list, deferred_probe)
dev_info(private->device, "deferred probe pending");
mutex_lock(&deferred_probe_mutex);
list_for_each_entry(p, &deferred_probe_pending_list, deferred_probe)
dev_info(p->device, "deferred probe pending\n");
mutex_unlock(&deferred_probe_mutex);
}
static DECLARE_DELAYED_WORK(deferred_probe_timeout_work, deferred_probe_timeout_work_func);

Expand Down
10 changes: 10 additions & 0 deletions drivers/gpu/drm/imx/imx-ldb.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder)
struct ldb *ldb = &imx_ldb->base;
int mux = drm_of_encoder_active_port_id(ldb_ch->child, encoder);

if (mux < 0 || mux >= ARRAY_SIZE(imx_ldb->clk_sel)) {
dev_warn(ldb->dev, "%s: invalid mux %d\n", __func__, mux);
return;
}

if (ldb->dual) {
clk_set_parent(imx_ldb->clk_sel[mux], imx_ldb->clk[0]);
clk_set_parent(imx_ldb->clk_sel[mux], imx_ldb->clk[1]);
Expand Down Expand Up @@ -206,6 +211,11 @@ imx_ldb_encoder_atomic_mode_set(struct drm_encoder *encoder,
unsigned long di_clk = mode->clock * 1000;
int mux = drm_of_encoder_active_port_id(ldb_ch->child, encoder);

if (mux < 0 || mux >= ARRAY_SIZE(imx_ldb->clk_sel)) {
dev_warn(ldb->dev, "%s: invalid mux %d\n", __func__, mux);
return;
}

if (mode->clock > 170000) {
dev_warn(ldb->dev,
"%s: mode exceeds 170 MHz pixel clock\n", __func__);
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/tegra/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,11 @@ static void tegra_dc_commit_state(struct tegra_dc *dc,
dev_err(dc->dev,
"failed to set clock rate to %lu Hz\n",
state->pclk);

err = clk_set_rate(dc->clk, state->pclk);
if (err < 0)
dev_err(dc->dev, "failed to set clock %pC to %lu Hz: %d\n",
dc->clk, state->pclk, err);
}

DRM_DEBUG_KMS("rate: %lu, div: %u\n", clk_get_rate(dc->clk),
Expand All @@ -1677,11 +1682,6 @@ static void tegra_dc_commit_state(struct tegra_dc *dc,
value = SHIFT_CLK_DIVIDER(state->div) | PIXEL_CLK_DIVIDER_PCD1;
tegra_dc_writel(dc, value, DC_DISP_DISP_CLOCK_CONTROL);
}

err = clk_set_rate(dc->clk, state->pclk);
if (err < 0)
dev_err(dc->dev, "failed to set clock %pC to %lu Hz: %d\n",
dc->clk, state->pclk, err);
}

static void tegra_dc_stop(struct tegra_dc *dc)
Expand Down
2 changes: 2 additions & 0 deletions drivers/interconnect/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
GFP_KERNEL);
if (new)
src->links = new;
else
ret = -ENOMEM;

out:
mutex_unlock(&icc_lock);
Expand Down
4 changes: 2 additions & 2 deletions drivers/xen/events/events_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,7 @@ static void lateeoi_ack_dynirq(struct irq_data *data)

if (VALID_EVTCHN(evtchn)) {
do_mask(info, EVT_MASK_REASON_EOI_PENDING);
event_handler_exit(info);
ack_dynirq(data);
}
}

Expand All @@ -1794,7 +1794,7 @@ static void lateeoi_mask_ack_dynirq(struct irq_data *data)

if (VALID_EVTCHN(evtchn)) {
do_mask(info, EVT_MASK_REASON_EXPLICIT);
event_handler_exit(info);
ack_dynirq(data);
}
}

Expand Down
4 changes: 4 additions & 0 deletions fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter,
bio.bi_opf = dio_bio_write_op(iocb);
task_io_account_write(ret);
}
if (iocb->ki_flags & IOCB_NOWAIT)
bio.bi_opf |= REQ_NOWAIT;
if (iocb->ki_flags & IOCB_HIPRI)
bio_set_polled(&bio, iocb);

Expand Down Expand Up @@ -399,6 +401,8 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
bio->bi_opf = dio_bio_write_op(iocb);
task_io_account_write(bio->bi_iter.bi_size);
}
if (iocb->ki_flags & IOCB_NOWAIT)
bio->bi_opf |= REQ_NOWAIT;

dio->size += bio->bi_iter.bi_size;
pos += bio->bi_iter.bi_size;
Expand Down
10 changes: 6 additions & 4 deletions fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,11 +757,13 @@ void gfs2_freeze_func(struct work_struct *work)
static int gfs2_freeze(struct super_block *sb)
{
struct gfs2_sbd *sdp = sb->s_fs_info;
int error = 0;
int error;

mutex_lock(&sdp->sd_freeze_mutex);
if (atomic_read(&sdp->sd_freeze_state) != SFS_UNFROZEN)
if (atomic_read(&sdp->sd_freeze_state) != SFS_UNFROZEN) {
error = -EBUSY;
goto out;
}

if (test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) {
error = -EINVAL;
Expand Down Expand Up @@ -798,10 +800,10 @@ static int gfs2_unfreeze(struct super_block *sb)
struct gfs2_sbd *sdp = sb->s_fs_info;

mutex_lock(&sdp->sd_freeze_mutex);
if (atomic_read(&sdp->sd_freeze_state) != SFS_FROZEN ||
if (atomic_read(&sdp->sd_freeze_state) != SFS_FROZEN ||
!gfs2_holder_initialized(&sdp->sd_freeze_gh)) {
mutex_unlock(&sdp->sd_freeze_mutex);
return 0;
return -EINVAL;
}

gfs2_glock_dq_uninit(&sdp->sd_freeze_gh);
Expand Down
2 changes: 2 additions & 0 deletions net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,8 @@ static int translate_compat_table(struct net *net,
if (!newinfo)
goto out_unlock;

memset(newinfo->entries, 0, size);

newinfo->number = compatr->num_entries;
for (i = 0; i < NF_ARP_NUMHOOKS; i++) {
newinfo->hook_entry[i] = compatr->hook_entry[i];
Expand Down
2 changes: 2 additions & 0 deletions net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,8 @@ translate_compat_table(struct net *net,
if (!newinfo)
goto out_unlock;

memset(newinfo->entries, 0, size);

newinfo->number = compatr->num_entries;
for (i = 0; i < NF_INET_NUMHOOKS; i++) {
newinfo->hook_entry[i] = compatr->hook_entry[i];
Expand Down
2 changes: 2 additions & 0 deletions net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,8 @@ translate_compat_table(struct net *net,
if (!newinfo)
goto out_unlock;

memset(newinfo->entries, 0, size);

newinfo->number = compatr->num_entries;
for (i = 0; i < NF_INET_NUMHOOKS; i++) {
newinfo->hook_entry[i] = compatr->hook_entry[i];
Expand Down
10 changes: 2 additions & 8 deletions net/netfilter/x_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ void xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
{
const struct xt_match *match = m->u.kernel.match;
struct compat_xt_entry_match *cm = (struct compat_xt_entry_match *)m;
int pad, off = xt_compat_match_offset(match);
int off = xt_compat_match_offset(match);
u_int16_t msize = cm->u.user.match_size;
char name[sizeof(m->u.user.name)];

Expand All @@ -743,9 +743,6 @@ void xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
match->compat_from_user(m->data, cm->data);
else
memcpy(m->data, cm->data, msize - sizeof(*cm));
pad = XT_ALIGN(match->matchsize) - match->matchsize;
if (pad > 0)
memset(m->data + match->matchsize, 0, pad);

msize += off;
m->u.user.match_size = msize;
Expand Down Expand Up @@ -1116,7 +1113,7 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
{
const struct xt_target *target = t->u.kernel.target;
struct compat_xt_entry_target *ct = (struct compat_xt_entry_target *)t;
int pad, off = xt_compat_target_offset(target);
int off = xt_compat_target_offset(target);
u_int16_t tsize = ct->u.user.target_size;
char name[sizeof(t->u.user.name)];

Expand All @@ -1126,9 +1123,6 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
target->compat_from_user(t->data, ct->data);
else
memcpy(t->data, ct->data, tsize - sizeof(*ct));
pad = XT_ALIGN(target->targetsize) - target->targetsize;
if (pad > 0)
memset(t->data + target->targetsize, 0, pad);

tsize += off;
t->u.user.target_size = tsize;
Expand Down
3 changes: 2 additions & 1 deletion tools/perf/util/expr.y
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#define MAXIDLEN 256
%}

%pure-parser
%define api.pure full

%parse-param { double *final_val }
%parse-param { struct parse_ctx *ctx }
%parse-param { const char **pp }
Expand Down
7 changes: 3 additions & 4 deletions tools/perf/util/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ static inline bool replace_android_lib(const char *filename, char *newfilename)
if (!strncmp(filename, "/system/lib/", 12)) {
char *ndk, *app;
const char *arch;
size_t ndk_length;
size_t app_length;
int ndk_length, app_length;

ndk = getenv("NDK_ROOT");
app = getenv("APP_PLATFORM");
Expand Down Expand Up @@ -122,8 +121,8 @@ static inline bool replace_android_lib(const char *filename, char *newfilename)
if (new_length > PATH_MAX)
return false;
snprintf(newfilename, new_length,
"%s/platforms/%s/arch-%s/usr/lib/%s",
ndk, app, arch, libname);
"%.*s/platforms/%.*s/arch-%s/usr/lib/%s",
ndk_length, ndk, app_length, app, arch, libname);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/parse-events.y
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%pure-parser
%define api.pure full
%parse-param {void *_parse_state}
%parse-param {void *scanner}
%lex-param {void* scanner}
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
session->decomp_last = decomp;
}

pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
pr_debug("decomp (B): %zd to %zd\n", src_size, decomp_size);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/zstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
while (input.pos < input.size) {
ret = ZSTD_decompressStream(data->dstream, &output, &input);
if (ZSTD_isError(ret)) {
pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n",
pr_err("failed to decompress (B): %zd -> %zd, dst_size %zd : %s\n",
src_size, output.size, dst_size, ZSTD_getErrorName(ret));
break;
}
Expand Down
10 changes: 8 additions & 2 deletions tools/testing/radix-tree/idr-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,20 @@ void idr_find_test_1(int anchor_id, int throbber_id)
pthread_t throbber;
time_t start = time(NULL);

pthread_create(&throbber, NULL, idr_throbber, &throbber_id);

BUG_ON(idr_alloc(&find_idr, xa_mk_value(anchor_id), anchor_id,
anchor_id + 1, GFP_KERNEL) != anchor_id);

pthread_create(&throbber, NULL, idr_throbber, &throbber_id);

rcu_read_lock();
do {
int id = 0;
void *entry = idr_get_next(&find_idr, &id);
rcu_read_unlock();
BUG_ON(entry != xa_mk_value(id));
rcu_read_lock();
} while (time(NULL) < start + 11);
rcu_read_unlock();

pthread_join(throbber, NULL);

Expand Down Expand Up @@ -577,12 +581,14 @@ void ida_tests(void)

int __weak main(void)
{
rcu_register_thread();
radix_tree_init();
idr_checks();
ida_tests();
radix_tree_cpu_dead(1);
rcu_barrier();
if (nr_allocated)
printf("nr_allocated = %d\n", nr_allocated);
rcu_unregister_thread();
return 0;
}
2 changes: 2 additions & 0 deletions tools/testing/radix-tree/multiorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ void multiorder_checks(void)

int __weak main(void)
{
rcu_register_thread();
radix_tree_init();
multiorder_checks();
rcu_unregister_thread();
return 0;
}
2 changes: 2 additions & 0 deletions tools/testing/radix-tree/xarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ void xarray_tests(void)

int __weak main(void)
{
rcu_register_thread();
radix_tree_init();
xarray_tests();
radix_tree_cpu_dead(1);
rcu_barrier();
if (nr_allocated)
printf("nr_allocated = %d\n", nr_allocated);
rcu_unregister_thread();
return 0;
}