From: Greg Kroah-Hartman Date: Thu, 15 Nov 2018 00:13:38 +0000 (-0800) Subject: 4.18-stable patches X-Git-Tag: v4.19.3~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0da9b471bb887916cbe58ce982609eb960ec47f4;p=thirdparty%2Fkernel%2Fstable-queue.git 4.18-stable patches added patches: ovl-check-whiteout-in-ovl_create_over_whiteout.patch ovl-fix-error-handling-in-ovl_verify_set_fh.patch scsi-qla2xxx-fix-incorrect-port-speed-being-set-for-fc-adapters.patch scsi-qla2xxx-fix-nvme-session-hang-on-unload.patch scsi-qla2xxx-fix-process-response-queue-for-isp26xx-and-above.patch scsi-qla2xxx-fix-re-using-loopid-when-handle-is-in-use.patch scsi-qla2xxx-reject-bsg-request-if-chip-is-down.patch scsi-qla2xxx-remove-stale-debug-trace-message-from-tcm_qla2xxx.patch scsi-qla2xxx-shutdown-chip-if-reset-fail.patch serial-sh-sci-fix-could-not-remove-dev_attr_rx_fifo_timeout.patch --- diff --git a/queue-4.18/ovl-check-whiteout-in-ovl_create_over_whiteout.patch b/queue-4.18/ovl-check-whiteout-in-ovl_create_over_whiteout.patch new file mode 100644 index 00000000000..c9b3520f66d --- /dev/null +++ b/queue-4.18/ovl-check-whiteout-in-ovl_create_over_whiteout.patch @@ -0,0 +1,49 @@ +From 5e1275808630ea3b2c97c776f40e475017535f72 Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi +Date: Wed, 31 Oct 2018 12:15:23 +0100 +Subject: ovl: check whiteout in ovl_create_over_whiteout() + +From: Miklos Szeredi + +commit 5e1275808630ea3b2c97c776f40e475017535f72 upstream. + +Kaixuxia repors that it's possible to crash overlayfs by removing the +whiteout on the upper layer before creating a directory over it. This is a +reproducer: + + mkdir lower upper work merge + touch lower/file + mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merge + rm merge/file + ls -al merge/file + rm upper/file + ls -al merge/ + mkdir merge/file + +Before commencing with a vfs_rename(..., RENAME_EXCHANGE) verify that the +lookup of "upper" is positive and is a whiteout, and return ESTALE +otherwise. + +Reported by: kaixuxia +Signed-off-by: Miklos Szeredi +Fixes: e9be9d5e76e3 ("overlay filesystem") +Cc: # v3.18 +Signed-off-by: Greg Kroah-Hartman + +--- + fs/overlayfs/dir.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/fs/overlayfs/dir.c ++++ b/fs/overlayfs/dir.c +@@ -461,6 +461,10 @@ static int ovl_create_over_whiteout(stru + if (IS_ERR(upper)) + goto out_unlock; + ++ err = -ESTALE; ++ if (d_is_negative(upper) || !IS_WHITEOUT(d_inode(upper))) ++ goto out_dput; ++ + newdentry = ovl_create_temp(workdir, cattr); + err = PTR_ERR(newdentry); + if (IS_ERR(newdentry)) diff --git a/queue-4.18/ovl-fix-error-handling-in-ovl_verify_set_fh.patch b/queue-4.18/ovl-fix-error-handling-in-ovl_verify_set_fh.patch new file mode 100644 index 00000000000..fe16c6a0731 --- /dev/null +++ b/queue-4.18/ovl-fix-error-handling-in-ovl_verify_set_fh.patch @@ -0,0 +1,36 @@ +From babf4770be0adc69e6d2de150f4040f175e24beb Mon Sep 17 00:00:00 2001 +From: Amir Goldstein +Date: Wed, 10 Oct 2018 19:10:06 +0300 +Subject: ovl: fix error handling in ovl_verify_set_fh() + +From: Amir Goldstein + +commit babf4770be0adc69e6d2de150f4040f175e24beb upstream. + +We hit a BUG on kfree of an ERR_PTR()... + +Reported-by: syzbot+ff03fe05c717b82502d0@syzkaller.appspotmail.com +Fixes: 8b88a2e64036 ("ovl: verify upper root dir matches lower root dir") +Cc: # v4.13 +Signed-off-by: Amir Goldstein +Signed-off-by: Miklos Szeredi +Signed-off-by: Greg Kroah-Hartman + +--- + fs/overlayfs/namei.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/fs/overlayfs/namei.c ++++ b/fs/overlayfs/namei.c +@@ -441,8 +441,10 @@ int ovl_verify_set_fh(struct dentry *den + + fh = ovl_encode_real_fh(real, is_upper); + err = PTR_ERR(fh); +- if (IS_ERR(fh)) ++ if (IS_ERR(fh)) { ++ fh = NULL; + goto fail; ++ } + + err = ovl_verify_fh(dentry, name, fh); + if (set && err == -ENODATA) diff --git a/queue-4.18/scsi-qla2xxx-fix-incorrect-port-speed-being-set-for-fc-adapters.patch b/queue-4.18/scsi-qla2xxx-fix-incorrect-port-speed-being-set-for-fc-adapters.patch new file mode 100644 index 00000000000..0671fdc5807 --- /dev/null +++ b/queue-4.18/scsi-qla2xxx-fix-incorrect-port-speed-being-set-for-fc-adapters.patch @@ -0,0 +1,34 @@ +From 4c1458df9635c7e3ced155f594d2e7dfd7254e21 Mon Sep 17 00:00:00 2001 +From: Himanshu Madhani +Date: Fri, 31 Aug 2018 11:24:27 -0700 +Subject: scsi: qla2xxx: Fix incorrect port speed being set for FC adapters + +From: Himanshu Madhani + +commit 4c1458df9635c7e3ced155f594d2e7dfd7254e21 upstream. + +Fixes: 6246b8a1d26c7c ("[SCSI] qla2xxx: Enhancements to support ISP83xx.") +Fixes: 1bb395485160d2 ("qla2xxx: Correct iiDMA-update calling conventions.") +Cc: +Signed-off-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_mbx.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_mbx.c ++++ b/drivers/scsi/qla2xxx/qla_mbx.c +@@ -3716,10 +3716,7 @@ qla2x00_set_idma_speed(scsi_qla_host_t * + mcp->mb[0] = MBC_PORT_PARAMS; + mcp->mb[1] = loop_id; + mcp->mb[2] = BIT_0; +- if (IS_CNA_CAPABLE(vha->hw)) +- mcp->mb[3] = port_speed & (BIT_5|BIT_4|BIT_3|BIT_2|BIT_1|BIT_0); +- else +- mcp->mb[3] = port_speed & (BIT_2|BIT_1|BIT_0); ++ mcp->mb[3] = port_speed & (BIT_5|BIT_4|BIT_3|BIT_2|BIT_1|BIT_0); + mcp->mb[9] = vha->vp_idx; + mcp->out_mb = MBX_9|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_3|MBX_1|MBX_0; diff --git a/queue-4.18/scsi-qla2xxx-fix-nvme-session-hang-on-unload.patch b/queue-4.18/scsi-qla2xxx-fix-nvme-session-hang-on-unload.patch new file mode 100644 index 00000000000..b418f5da6d9 --- /dev/null +++ b/queue-4.18/scsi-qla2xxx-fix-nvme-session-hang-on-unload.patch @@ -0,0 +1,34 @@ +From f7d61c995df74d6bb57bbff6a2b7b1874c4a2baa Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Wed, 26 Sep 2018 22:05:11 -0700 +Subject: scsi: qla2xxx: Fix NVMe session hang on unload + +From: Quinn Tran + +commit f7d61c995df74d6bb57bbff6a2b7b1874c4a2baa upstream. + +Send aborts only when chip is active. + +Fixes: 623ee824e579 ("scsi: qla2xxx: Fix FC-NVMe IO abort during driver reset") +Cc: # 4.14 +Signed-off-by: Quinn Tran +Reviewed-by: Ewan D. Milne +Signed-off-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_nvme.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/qla2xxx/qla_nvme.c ++++ b/drivers/scsi/qla2xxx/qla_nvme.c +@@ -604,7 +604,7 @@ void qla_nvme_abort(struct qla_hw_data * + { + int rval; + +- if (!test_bit(ABORT_ISP_ACTIVE, &sp->vha->dpc_flags)) { ++ if (ha->flags.fw_started) { + rval = ha->isp_ops->abort_command(sp); + if (!rval && !qla_nvme_wait_on_command(sp)) + ql_log(ql_log_warn, NULL, 0x2112, diff --git a/queue-4.18/scsi-qla2xxx-fix-process-response-queue-for-isp26xx-and-above.patch b/queue-4.18/scsi-qla2xxx-fix-process-response-queue-for-isp26xx-and-above.patch new file mode 100644 index 00000000000..8eef4f60a67 --- /dev/null +++ b/queue-4.18/scsi-qla2xxx-fix-process-response-queue-for-isp26xx-and-above.patch @@ -0,0 +1,83 @@ +From b86ac8fd4b2f6ec2f9ca9194c56eac12d620096f Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Fri, 31 Aug 2018 11:24:26 -0700 +Subject: scsi: qla2xxx: Fix process response queue for ISP26XX and above + +From: Quinn Tran + +commit b86ac8fd4b2f6ec2f9ca9194c56eac12d620096f upstream. + +This patch improves performance for 16G and above adapter by removing +additional call to process_response_queue(). + +[mkp: typo] + +Cc: +Signed-off-by: Quinn Tran +Signed-off-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_init.c | 2 -- + drivers/scsi/qla2xxx/qla_iocb.c | 17 ----------------- + 2 files changed, 19 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -6972,7 +6972,6 @@ qla24xx_nvram_config(scsi_qla_host_t *vh + } + icb->firmware_options_2 &= cpu_to_le32( + ~(BIT_3 | BIT_2 | BIT_1 | BIT_0)); +- vha->flags.process_response_queue = 0; + if (ha->zio_mode != QLA_ZIO_DISABLED) { + ha->zio_mode = QLA_ZIO_MODE_6; + +@@ -6983,7 +6982,6 @@ qla24xx_nvram_config(scsi_qla_host_t *vh + icb->firmware_options_2 |= cpu_to_le32( + (uint32_t)ha->zio_mode); + icb->interrupt_delay_timer = cpu_to_le16(ha->zio_timer); +- vha->flags.process_response_queue = 1; + } + + if (rval) { +--- a/drivers/scsi/qla2xxx/qla_iocb.c ++++ b/drivers/scsi/qla2xxx/qla_iocb.c +@@ -1526,12 +1526,6 @@ qla24xx_start_scsi(srb_t *sp) + + /* Set chip new ring index. */ + WRT_REG_DWORD(req->req_q_in, req->ring_index); +- RD_REG_DWORD_RELAXED(&ha->iobase->isp24.hccr); +- +- /* Manage unprocessed RIO/ZIO commands in response queue. */ +- if (vha->flags.process_response_queue && +- rsp->ring_ptr->signature != RESPONSE_PROCESSED) +- qla24xx_process_response_queue(vha, rsp); + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + return QLA_SUCCESS; +@@ -1725,12 +1719,6 @@ qla24xx_dif_start_scsi(srb_t *sp) + + /* Set chip new ring index. */ + WRT_REG_DWORD(req->req_q_in, req->ring_index); +- RD_REG_DWORD_RELAXED(&ha->iobase->isp24.hccr); +- +- /* Manage unprocessed RIO/ZIO commands in response queue. */ +- if (vha->flags.process_response_queue && +- rsp->ring_ptr->signature != RESPONSE_PROCESSED) +- qla24xx_process_response_queue(vha, rsp); + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + +@@ -1880,11 +1868,6 @@ qla2xxx_start_scsi_mq(srb_t *sp) + /* Set chip new ring index. */ + WRT_REG_DWORD(req->req_q_in, req->ring_index); + +- /* Manage unprocessed RIO/ZIO commands in response queue. */ +- if (vha->flags.process_response_queue && +- rsp->ring_ptr->signature != RESPONSE_PROCESSED) +- qla24xx_process_response_queue(vha, rsp); +- + spin_unlock_irqrestore(&qpair->qp_lock, flags); + return QLA_SUCCESS; + diff --git a/queue-4.18/scsi-qla2xxx-fix-re-using-loopid-when-handle-is-in-use.patch b/queue-4.18/scsi-qla2xxx-fix-re-using-loopid-when-handle-is-in-use.patch new file mode 100644 index 00000000000..7a8a0a86015 --- /dev/null +++ b/queue-4.18/scsi-qla2xxx-fix-re-using-loopid-when-handle-is-in-use.patch @@ -0,0 +1,72 @@ +From 5c6400536481d9ef44ef94e7bf2c7b8e81534db7 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Wed, 26 Sep 2018 22:05:14 -0700 +Subject: scsi: qla2xxx: Fix re-using LoopID when handle is in use + +From: Quinn Tran + +commit 5c6400536481d9ef44ef94e7bf2c7b8e81534db7 upstream. + +This patch fixes issue where driver clears NPort ID map instead of marking +handle in use. Once driver clears NPort ID from the database, it can reuse +the same NPort ID resulting in a PLOGI failure. + +[mkp: fixed Himanshu's SoB] + +Fixes: a084fd68e1d2 ("scsi: qla2xxx: Fix re-login for Nport Handle in use") +Cc: +Signed-of-by: Quinn Tran +Reviewed-by: Ewan D. Milne +Signed-off-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_init.c | 18 ++++-------------- + drivers/scsi/qla2xxx/qla_target.c | 3 ++- + 2 files changed, 6 insertions(+), 15 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -1742,25 +1742,15 @@ qla24xx_handle_plogi_done_event(struct s + cid.b.rsvd_1 = 0; + + ql_dbg(ql_dbg_disc, vha, 0x20ec, +- "%s %d %8phC LoopID 0x%x in use post gnl\n", ++ "%s %d %8phC lid %#x in use with pid %06x post gnl\n", + __func__, __LINE__, ea->fcport->port_name, +- ea->fcport->loop_id); ++ ea->fcport->loop_id, cid.b24); + +- if (IS_SW_RESV_ADDR(cid)) { +- set_bit(ea->fcport->loop_id, vha->hw->loop_id_map); +- ea->fcport->loop_id = FC_NO_LOOP_ID; +- } else { +- qla2x00_clear_loop_id(ea->fcport); +- } ++ set_bit(ea->fcport->loop_id, vha->hw->loop_id_map); ++ ea->fcport->loop_id = FC_NO_LOOP_ID; + qla24xx_post_gnl_work(vha, ea->fcport); + break; + case MBS_PORT_ID_USED: +- ql_dbg(ql_dbg_disc, vha, 0x20ed, +- "%s %d %8phC NPortId %02x%02x%02x inuse post gidpn\n", +- __func__, __LINE__, ea->fcport->port_name, +- ea->fcport->d_id.b.domain, ea->fcport->d_id.b.area, +- ea->fcport->d_id.b.al_pa); +- + lid = ea->iop[1] & 0xffff; + qlt_find_sess_invalidate_other(vha, + wwn_to_u64(ea->fcport->port_name), +--- a/drivers/scsi/qla2xxx/qla_target.c ++++ b/drivers/scsi/qla2xxx/qla_target.c +@@ -1257,7 +1257,8 @@ void qlt_schedule_sess_for_deletion(stru + qla24xx_chk_fcp_state(sess); + + ql_dbg(ql_dbg_tgt, sess->vha, 0xe001, +- "Scheduling sess %p for deletion\n", sess); ++ "Scheduling sess %p for deletion %8phC\n", ++ sess, sess->port_name); + + INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn); + WARN_ON(!queue_work(sess->vha->hw->wq, &sess->del_work)); diff --git a/queue-4.18/scsi-qla2xxx-reject-bsg-request-if-chip-is-down.patch b/queue-4.18/scsi-qla2xxx-reject-bsg-request-if-chip-is-down.patch new file mode 100644 index 00000000000..15f98660e86 --- /dev/null +++ b/queue-4.18/scsi-qla2xxx-reject-bsg-request-if-chip-is-down.patch @@ -0,0 +1,33 @@ +From 56d942de59ebfa2e970a6cd33299d1984710b6c0 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Tue, 11 Sep 2018 10:18:22 -0700 +Subject: scsi: qla2xxx: Reject bsg request if chip is down. + +From: Quinn Tran + +commit 56d942de59ebfa2e970a6cd33299d1984710b6c0 upstream. + +Reject bsg request if chip is down. This prevent erroneous timeout. + +Fixes: d051a5aa1c23 ("[SCSI] qla2xxx: Add an "is reset active" helper.") +Cc: stable@vger.kernel.org # 4.10 +Signed-off-by: Quinn Tran +Signed-off-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_bsg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/qla2xxx/qla_bsg.c ++++ b/drivers/scsi/qla2xxx/qla_bsg.c +@@ -2487,7 +2487,7 @@ qla24xx_bsg_request(struct bsg_job *bsg_ + vha = shost_priv(host); + } + +- if (qla2x00_reset_active(vha)) { ++ if (qla2x00_chip_is_down(vha)) { + ql_dbg(ql_dbg_user, vha, 0x709f, + "BSG: ISP abort active/needed -- cmd=%d.\n", + bsg_request->msgcode); diff --git a/queue-4.18/scsi-qla2xxx-remove-stale-debug-trace-message-from-tcm_qla2xxx.patch b/queue-4.18/scsi-qla2xxx-remove-stale-debug-trace-message-from-tcm_qla2xxx.patch new file mode 100644 index 00000000000..81c87595f44 --- /dev/null +++ b/queue-4.18/scsi-qla2xxx-remove-stale-debug-trace-message-from-tcm_qla2xxx.patch @@ -0,0 +1,35 @@ +From 7c388f91ec1a59b0ed815b07b90536e2d57e1e1f Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Tue, 11 Sep 2018 10:18:24 -0700 +Subject: scsi: qla2xxx: Remove stale debug trace message from tcm_qla2xxx + +From: Quinn Tran + +commit 7c388f91ec1a59b0ed815b07b90536e2d57e1e1f upstream. + +Remove stale debug trace. + +Fixes: 1eb42f965ced ("qla2xxx: Make trace flags more readable") +Cc: stable@vger.kernel.org #4.10 +Signed-off-by: Quinn Tran +Signed-off-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c ++++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c +@@ -718,10 +718,6 @@ static int tcm_qla2xxx_queue_status(stru + cmd->sg_cnt = 0; + cmd->offset = 0; + cmd->dma_data_direction = target_reverse_dma_direction(se_cmd); +- if (cmd->trc_flags & TRC_XMIT_STATUS) { +- pr_crit("Multiple calls for status = %p.\n", cmd); +- dump_stack(); +- } + cmd->trc_flags |= TRC_XMIT_STATUS; + + if (se_cmd->data_direction == DMA_FROM_DEVICE) { diff --git a/queue-4.18/scsi-qla2xxx-shutdown-chip-if-reset-fail.patch b/queue-4.18/scsi-qla2xxx-shutdown-chip-if-reset-fail.patch new file mode 100644 index 00000000000..9cd78610401 --- /dev/null +++ b/queue-4.18/scsi-qla2xxx-shutdown-chip-if-reset-fail.patch @@ -0,0 +1,34 @@ +From 1e4ac5d6fe0a4af17e4b6251b884485832bf75a3 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Tue, 11 Sep 2018 10:18:21 -0700 +Subject: scsi: qla2xxx: shutdown chip if reset fail + +From: Quinn Tran + +commit 1e4ac5d6fe0a4af17e4b6251b884485832bf75a3 upstream. + +If chip unable to fully initialize, use full shutdown sequence to clear out +any stale FW state. + +Fixes: e315cd28b9ef ("[SCSI] qla2xxx: Code changes for qla data structure refactoring") +Cc: stable@vger.kernel.org #4.10 +Signed-off-by: Quinn Tran +Signed-off-by: Himanshu Madhani +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_init.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -6515,7 +6515,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha) + * The next call disables the board + * completely. + */ +- ha->isp_ops->reset_adapter(vha); ++ qla2x00_abort_isp_cleanup(vha); + vha->flags.online = 0; + clear_bit(ISP_ABORT_RETRY, + &vha->dpc_flags); diff --git a/queue-4.18/serial-sh-sci-fix-could-not-remove-dev_attr_rx_fifo_timeout.patch b/queue-4.18/serial-sh-sci-fix-could-not-remove-dev_attr_rx_fifo_timeout.patch new file mode 100644 index 00000000000..b7f0d5a06b8 --- /dev/null +++ b/queue-4.18/serial-sh-sci-fix-could-not-remove-dev_attr_rx_fifo_timeout.patch @@ -0,0 +1,44 @@ +From 641a41dbba217ee5bd26abe6be77f8cead9cd00e Mon Sep 17 00:00:00 2001 +From: Yoshihiro Shimoda +Date: Tue, 30 Oct 2018 15:13:35 +0900 +Subject: serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout + +From: Yoshihiro Shimoda + +commit 641a41dbba217ee5bd26abe6be77f8cead9cd00e upstream. + +This patch fixes an issue that the sci_remove() could not remove +dev_attr_rx_fifo_timeout because uart_remove_one_port() set +the port->port.type to PORT_UNKNOWN. + +Reported-by: Hiromitsu Yamasaki +Fixes: 5d23188a473d ("serial: sh-sci: make RX FIFO parameters tunable via sysfs") +Cc: # v4.11+ +Signed-off-by: Yoshihiro Shimoda +Reviewed-by: Ulrich Hecht +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/sh-sci.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/tty/serial/sh-sci.c ++++ b/drivers/tty/serial/sh-sci.c +@@ -3045,6 +3045,7 @@ static struct uart_driver sci_uart_drive + static int sci_remove(struct platform_device *dev) + { + struct sci_port *port = platform_get_drvdata(dev); ++ unsigned int type = port->port.type; /* uart_remove_... clears it */ + + sci_ports_in_use &= ~BIT(port->port.line); + uart_remove_one_port(&sci_uart_driver, &port->port); +@@ -3055,8 +3056,7 @@ static int sci_remove(struct platform_de + sysfs_remove_file(&dev->dev.kobj, + &dev_attr_rx_fifo_trigger.attr); + } +- if (port->port.type == PORT_SCIFA || port->port.type == PORT_SCIFB || +- port->port.type == PORT_HSCIF) { ++ if (type == PORT_SCIFA || type == PORT_SCIFB || type == PORT_HSCIF) { + sysfs_remove_file(&dev->dev.kobj, + &dev_attr_rx_fifo_timeout.attr); + } diff --git a/queue-4.18/series b/queue-4.18/series index bf169f80375..67b3dcd50cf 100644 --- a/queue-4.18/series +++ b/queue-4.18/series @@ -33,3 +33,13 @@ udf-prevent-write-unsupported-filesystem-to-be-remounted-read-write.patch arm-dts-imx6ull-keep-imx6ul_-prefix-for-signals-on-both-i.mx6ul-and-i.mx6ull.patch 9p-clear-dangling-pointers-in-p9stat_free.patch cdrom-fix-improper-type-cast-which-can-leat-to-information-leak.patch +ovl-fix-error-handling-in-ovl_verify_set_fh.patch +ovl-check-whiteout-in-ovl_create_over_whiteout.patch +serial-sh-sci-fix-could-not-remove-dev_attr_rx_fifo_timeout.patch +scsi-qla2xxx-fix-incorrect-port-speed-being-set-for-fc-adapters.patch +scsi-qla2xxx-fix-process-response-queue-for-isp26xx-and-above.patch +scsi-qla2xxx-remove-stale-debug-trace-message-from-tcm_qla2xxx.patch +scsi-qla2xxx-shutdown-chip-if-reset-fail.patch +scsi-qla2xxx-reject-bsg-request-if-chip-is-down.patch +scsi-qla2xxx-fix-re-using-loopid-when-handle-is-in-use.patch +scsi-qla2xxx-fix-nvme-session-hang-on-unload.patch