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.10.x+fslc up to v5.10.31 #309

Merged
merged 26 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9b57ecb
interconnect: core: fix error return code of icc_link_destroy()
XidianGeneral Mar 8, 2021
57fb08f
gfs2: Flag a withdraw if init_threads() fails
andyprice Mar 15, 2021
fa0c0dc
KVM: arm64: Hide system instruction access to Trace registers
Mar 23, 2021
5b50468
KVM: arm64: Disable guest access to trace filter controls
Mar 23, 2021
870c8df
drm/imx: imx-ldb: fix out of bounds array access warning
arndb Mar 24, 2021
6c6d583
gfs2: report "already frozen/thawed" errors
AstralBob Mar 25, 2021
1dcb3eb
ftrace: Check if pages were allocated before calling free_pages()
rostedt Mar 30, 2021
e4a0956
tools/kvm_stat: Add restart delay
Mar 25, 2021
39af2f4
drm/tegra: dc: Don't set PLL clock to 0Hz
digetx Mar 2, 2021
9576dd8
gpu: host1x: Use different lock classes for each client
cyndis Mar 29, 2021
d99e22c
XArray: Fix splitting to non-zero orders
Nov 19, 2020
1d2310d
block: only update parent bi_status when bio fail
Mar 31, 2021
edd822b
radix tree test suite: Register the main thread with the RCU library
Mar 31, 2021
9a7552d
idr test suite: Take RCU read lock in idr_find_test_1
Apr 1, 2021
b1f6c6f
idr test suite: Create anchor before launching throbber
Apr 1, 2021
5d46000
null_blk: fix command timeout completion handling
damien-lemoal Mar 31, 2021
6fbdce3
io_uring: don't mark S_ISBLK async work as unbounded
axboe Apr 1, 2021
efa7b6e
riscv,entry: fix misaligned base for excp_vect_table
sashimi-yzh Mar 17, 2021
5402a67
block: don't ignore REQ_NOWAIT for direct IO
isilence Nov 20, 2020
1f3b900
netfilter: x_tables: fix compat match/target pad out-of-bound write
Apr 7, 2021
cd8ce27
perf map: Tighten snprintf() string precision to pass gcc check on so…
acmel Mar 5, 2021
2a60ab2
net: sfp: relax bitrate-derived mode check
Dec 9, 2020
9d9facd
net: sfp: cope with SFPs that set both LOS normal and LOS inverted
Jan 10, 2021
ceee49c
xen/events: fix setting irq affinity
jgross1 Apr 12, 2021
65f1995
Linux 5.10.31
gregkh Apr 16, 2021
9ecaa09
Merge tag 'v5.10.31' into 5.10.x+fslc
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 = 10
SUBLEVEL = 30
SUBLEVEL = 31
EXTRAVERSION =
NAME = Dare mighty things

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 @@ -277,6 +277,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 @@ -382,7 +382,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 @@ -447,6 +447,7 @@ ENDPROC(__switch_to)
#endif

.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 @@ -313,7 +313,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
1 change: 1 addition & 0 deletions drivers/block/null_blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ struct nullb_cmd {
blk_status_t error;
struct nullb_queue *nq;
struct hrtimer timer;
bool fake_timeout;
};

struct nullb_queue {
Expand Down
26 changes: 21 additions & 5 deletions drivers/block/null_blk_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,10 +1367,13 @@ static blk_status_t null_handle_cmd(struct nullb_cmd *cmd, sector_t sector,
}

if (dev->zoned)
cmd->error = null_process_zoned_cmd(cmd, op,
sector, nr_sectors);
sts = null_process_zoned_cmd(cmd, op, sector, nr_sectors);
else
cmd->error = null_process_cmd(cmd, op, sector, nr_sectors);
sts = null_process_cmd(cmd, op, sector, nr_sectors);

/* Do not overwrite errors (e.g. timeout errors) */
if (cmd->error == BLK_STS_OK)
cmd->error = sts;

out:
nullb_complete_cmd(cmd);
Expand Down Expand Up @@ -1449,8 +1452,20 @@ static bool should_requeue_request(struct request *rq)

static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res)
{
struct nullb_cmd *cmd = blk_mq_rq_to_pdu(rq);

pr_info("rq %p timed out\n", rq);
blk_mq_complete_request(rq);

/*
* If the device is marked as blocking (i.e. memory backed or zoned
* device), the submission path may be blocked waiting for resources
* and cause real timeouts. For these real timeouts, the submission
* path will complete the request using blk_mq_complete_request().
* Only fake timeouts need to execute blk_mq_complete_request() here.
*/
cmd->error = BLK_STS_TIMEOUT;
if (cmd->fake_timeout)
blk_mq_complete_request(rq);
return BLK_EH_DONE;
}

Expand All @@ -1471,6 +1486,7 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,
cmd->rq = bd->rq;
cmd->error = BLK_STS_OK;
cmd->nq = nq;
cmd->fake_timeout = should_timeout_request(bd->rq);

blk_mq_start_request(bd->rq);

Expand All @@ -1487,7 +1503,7 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,
return BLK_STS_OK;
}
}
if (should_timeout_request(bd->rq))
if (cmd->fake_timeout)
return BLK_STS_OK;

return null_handle_cmd(cmd, sector, nr_sectors, req_op(bd->rq));
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 @@ -190,6 +190,11 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder)
int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder);

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

drm_panel_prepare(imx_ldb_ch->panel);

if (dual) {
Expand Down Expand Up @@ -248,6 +253,11 @@ imx_ldb_encoder_atomic_mode_set(struct drm_encoder *encoder,
int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder);
u32 bus_format = imx_ldb_ch->bus_format;

if (mux < 0 || mux >= ARRAY_SIZE(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 @@ -1688,6 +1688,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 @@ -1698,11 +1703,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
10 changes: 6 additions & 4 deletions drivers/gpu/host1x/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,9 @@ void host1x_driver_unregister(struct host1x_driver *driver)
EXPORT_SYMBOL(host1x_driver_unregister);

/**
* host1x_client_register() - register a host1x client
* __host1x_client_register() - register a host1x client
* @client: host1x client
* @key: lock class key for the client-specific mutex
*
* Registers a host1x client with each host1x controller instance. Note that
* each client will only match their parent host1x controller and will only be
Expand All @@ -714,13 +715,14 @@ EXPORT_SYMBOL(host1x_driver_unregister);
* device and call host1x_device_init(), which will in turn call each client's
* &host1x_client_ops.init implementation.
*/
int host1x_client_register(struct host1x_client *client)
int __host1x_client_register(struct host1x_client *client,
struct lock_class_key *key)
{
struct host1x *host1x;
int err;

INIT_LIST_HEAD(&client->list);
mutex_init(&client->lock);
__mutex_init(&client->lock, "host1x client lock", key);
client->usecount = 0;

mutex_lock(&devices_lock);
Expand All @@ -741,7 +743,7 @@ int host1x_client_register(struct host1x_client *client)

return 0;
}
EXPORT_SYMBOL(host1x_client_register);
EXPORT_SYMBOL(__host1x_client_register);

/**
* host1x_client_unregister() - unregister a host1x client
Expand Down
2 changes: 2 additions & 0 deletions drivers/interconnect/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,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
11 changes: 5 additions & 6 deletions drivers/net/phy/sfp-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,13 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
}

/* If we haven't discovered any modes that this module supports, try
* the encoding and bitrate to determine supported modes. Some BiDi
* modules (eg, 1310nm/1550nm) are not 1000BASE-BX compliant due to
* the differing wavelengths, so do not set any transceiver bits.
* the bitrate to determine supported modes. Some BiDi modules (eg,
* 1310nm/1550nm) are not 1000BASE-BX compliant due to the differing
* wavelengths, so do not set any transceiver bits.
*/
if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS)) {
/* If the encoding and bit rate allows 1000baseX */
if (id->base.encoding == SFF8024_ENCODING_8B10B && br_nom &&
br_min <= 1300 && br_max >= 1200)
/* If the bit rate allows 1000baseX */
if (br_nom && br_min <= 1300 && br_max >= 1200)
phylink_set(modes, 1000baseX_Full);
}

Expand Down
36 changes: 22 additions & 14 deletions drivers/net/phy/sfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1501,15 +1501,19 @@ static void sfp_sm_link_down(struct sfp *sfp)

static void sfp_sm_link_check_los(struct sfp *sfp)
{
unsigned int los = sfp->state & SFP_F_LOS;
const __be16 los_inverted = cpu_to_be16(SFP_OPTIONS_LOS_INVERTED);
const __be16 los_normal = cpu_to_be16(SFP_OPTIONS_LOS_NORMAL);
__be16 los_options = sfp->id.ext.options & (los_inverted | los_normal);
bool los = false;

/* If neither SFP_OPTIONS_LOS_INVERTED nor SFP_OPTIONS_LOS_NORMAL
* are set, we assume that no LOS signal is available.
* are set, we assume that no LOS signal is available. If both are
* set, we assume LOS is not implemented (and is meaningless.)
*/
if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED))
los ^= SFP_F_LOS;
else if (!(sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL)))
los = 0;
if (los_options == los_inverted)
los = !(sfp->state & SFP_F_LOS);
else if (los_options == los_normal)
los = !!(sfp->state & SFP_F_LOS);

if (los)
sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0);
Expand All @@ -1519,18 +1523,22 @@ static void sfp_sm_link_check_los(struct sfp *sfp)

static bool sfp_los_event_active(struct sfp *sfp, unsigned int event)
{
return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
event == SFP_E_LOS_LOW) ||
(sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
event == SFP_E_LOS_HIGH);
const __be16 los_inverted = cpu_to_be16(SFP_OPTIONS_LOS_INVERTED);
const __be16 los_normal = cpu_to_be16(SFP_OPTIONS_LOS_NORMAL);
__be16 los_options = sfp->id.ext.options & (los_inverted | los_normal);

return (los_options == los_inverted && event == SFP_E_LOS_LOW) ||
(los_options == los_normal && event == SFP_E_LOS_HIGH);
}

static bool sfp_los_event_inactive(struct sfp *sfp, unsigned int event)
{
return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
event == SFP_E_LOS_HIGH) ||
(sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
event == SFP_E_LOS_LOW);
const __be16 los_inverted = cpu_to_be16(SFP_OPTIONS_LOS_INVERTED);
const __be16 los_normal = cpu_to_be16(SFP_OPTIONS_LOS_NORMAL);
__be16 los_options = sfp->id.ext.options & (los_inverted | los_normal);

return (los_options == los_inverted && event == SFP_E_LOS_HIGH) ||
(los_options == los_normal && event == SFP_E_LOS_LOW);
}

static void sfp_sm_fault(struct sfp *sfp, unsigned int next_state, bool warn)
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 @@ -1809,7 +1809,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 @@ -1820,7 +1820,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 @@ -280,6 +280,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 @@ -433,6 +435,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
14 changes: 9 additions & 5 deletions fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp)
int error;

error = init_threads(sdp);
if (error)
if (error) {
gfs2_withdraw_delayed(sdp);
return error;
}

j_gl->gl_ops->go_inval(j_gl, DIO_METADATA);
if (gfs2_withdrawn(sdp)) {
Expand Down Expand Up @@ -767,11 +769,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;
}

for (;;) {
if (gfs2_withdrawn(sdp)) {
Expand Down Expand Up @@ -812,10 +816,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_freeze_unlock(&sdp->sd_freeze_gh);
Expand Down
2 changes: 1 addition & 1 deletion fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ static void io_prep_async_work(struct io_kiocb *req)
if (req->flags & REQ_F_ISREG) {
if (def->hash_reg_file || (ctx->flags & IORING_SETUP_IOPOLL))
io_wq_hash_work(&req->work, file_inode(req->file));
} else {
} else if (!req->file || !S_ISBLK(file_inode(req->file)->i_mode)) {
if (def->unbound_nonreg_file)
req->work.flags |= IO_WQ_WORK_UNBOUND;
}
Expand Down
9 changes: 8 additions & 1 deletion include/linux/host1x.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,14 @@ static inline struct host1x_device *to_host1x_device(struct device *dev)
int host1x_device_init(struct host1x_device *device);
int host1x_device_exit(struct host1x_device *device);

int host1x_client_register(struct host1x_client *client);
int __host1x_client_register(struct host1x_client *client,
struct lock_class_key *key);
#define host1x_client_register(class) \
({ \
static struct lock_class_key __key; \
__host1x_client_register(class, &__key); \
})

int host1x_client_unregister(struct host1x_client *client);

int host1x_client_suspend(struct host1x_client *client);
Expand Down
Loading