From: Greg Kroah-Hartman Date: Tue, 24 Apr 2012 16:15:58 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.30~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=522e957a4917b10ad42bb03fcc35febff65ad7b1;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: drivers-tty-amiserial.c-add-missing-tty_unlock.patch jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch pch_uart-fix-dma-channel-unallocated-issue.patch usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch --- diff --git a/queue-3.0/drivers-tty-amiserial.c-add-missing-tty_unlock.patch b/queue-3.0/drivers-tty-amiserial.c-add-missing-tty_unlock.patch new file mode 100644 index 00000000000..b62236eeb6d --- /dev/null +++ b/queue-3.0/drivers-tty-amiserial.c-add-missing-tty_unlock.patch @@ -0,0 +1,33 @@ +From d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 Mon Sep 17 00:00:00 2001 +From: Julia Lawall +Date: Thu, 19 Apr 2012 18:12:40 +0200 +Subject: drivers/tty/amiserial.c: add missing tty_unlock + +From: Julia Lawall + +commit d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 upstream. + +tty_unlock is used on all other exits from the function. + +Signed-off-by: Julia Lawall +Acked-by: Jiri Slaby +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/amiserial.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/tty/amiserial.c ++++ b/drivers/tty/amiserial.c +@@ -1113,8 +1113,10 @@ static int set_serial_info(struct async_ + (new_serial.close_delay != state->close_delay) || + (new_serial.xmit_fifo_size != state->xmit_fifo_size) || + ((new_serial.flags & ~ASYNC_USR_MASK) != +- (state->flags & ~ASYNC_USR_MASK))) ++ (state->flags & ~ASYNC_USR_MASK))) { ++ tty_unlock(); + return -EPERM; ++ } + state->flags = ((state->flags & ~ASYNC_USR_MASK) | + (new_serial.flags & ASYNC_USR_MASK)); + info->flags = ((info->flags & ~ASYNC_USR_MASK) | diff --git a/queue-3.0/jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch b/queue-3.0/jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch new file mode 100644 index 00000000000..b01b36132f3 --- /dev/null +++ b/queue-3.0/jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch @@ -0,0 +1,43 @@ +From 99aa78466777083255b876293e9e83dec7cd809a Mon Sep 17 00:00:00 2001 +From: Shaohua Li +Date: Fri, 13 Apr 2012 10:27:35 +0800 +Subject: jbd2: use GFP_NOFS for blkdev_issue_flush + +From: Shaohua Li + +commit 99aa78466777083255b876293e9e83dec7cd809a upstream. + +flush request is issued in transaction commit code path, so looks using +GFP_KERNEL to allocate memory for flush request bio falls into the classic +deadlock issue. I saw btrfs and dm get it right, but ext4, xfs and md are +using GFP. + +Signed-off-by: Shaohua Li +Signed-off-by: Theodore Ts'o +Reviewed-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/jbd2/commit.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/jbd2/commit.c ++++ b/fs/jbd2/commit.c +@@ -683,7 +683,7 @@ start_journal_io: + if (commit_transaction->t_need_data_flush && + (journal->j_fs_dev != journal->j_dev) && + (journal->j_flags & JBD2_BARRIER)) +- blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL); ++ blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL); + + /* Done it all: now write the commit record asynchronously. */ + if (JBD2_HAS_INCOMPAT_FEATURE(journal, +@@ -819,7 +819,7 @@ wait_for_iobuf: + if (JBD2_HAS_INCOMPAT_FEATURE(journal, + JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) && + journal->j_flags & JBD2_BARRIER) { +- blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL); ++ blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL); + } + + if (err) diff --git a/queue-3.0/pch_uart-fix-dma-channel-unallocated-issue.patch b/queue-3.0/pch_uart-fix-dma-channel-unallocated-issue.patch new file mode 100644 index 00000000000..5f3c55d9234 --- /dev/null +++ b/queue-3.0/pch_uart-fix-dma-channel-unallocated-issue.patch @@ -0,0 +1,51 @@ +From af6d17cdc8c89aeb3101f0d27cd32fc0592b40b2 Mon Sep 17 00:00:00 2001 +From: Tomoya MORINAGA +Date: Thu, 12 Apr 2012 10:47:50 +0900 +Subject: pch_uart: Fix dma channel unallocated issue + +From: Tomoya MORINAGA + +commit af6d17cdc8c89aeb3101f0d27cd32fc0592b40b2 upstream. + +This driver anticipates pch_uart_verify_port() is not called +during installation. +However, actually pch_uart_verify_port() is called during +installation. +As a result, memory access violation occurs like below. + +0. initial value: use_dma=0 +1. starup() + - dma channel is not allocated because use_dma=0 +2. pch_uart_verify_port() + - Set use_dma=1 +3. UART processing acts DMA mode because use_dma=1 + - memory access violation occurs! + +This patch fixes the issue. + +Solution: +Whenever pch_uart_verify_port() is called and then +dma channel is not allocated, the channel should be allocated. + +Signed-off-by: Tomoya MORINAGA +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/pch_uart.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/tty/serial/pch_uart.c ++++ b/drivers/tty/serial/pch_uart.c +@@ -1354,9 +1354,11 @@ static int pch_uart_verify_port(struct u + __func__); + return -EOPNOTSUPP; + #endif +- priv->use_dma = 1; + priv->use_dma_flag = 1; + dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n"); ++ if (!priv->use_dma) ++ pch_request_dma(port); ++ priv->use_dma = 1; + } + + return 0; diff --git a/queue-3.0/series b/queue-3.0/series index be71ba31ddf..82d91fec40b 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -13,3 +13,7 @@ davinci_mdio-fix-mdio-timeout-check.patch media-rc-core-set-mode-for-winbond-cir.patch cfg80211-fix-interface-combinations-check.patch mm-fix-s390-bug-by-__set_page_dirty_no_writeback-on-swap.patch +jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch +usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch +pch_uart-fix-dma-channel-unallocated-issue.patch +drivers-tty-amiserial.c-add-missing-tty_unlock.patch diff --git a/queue-3.0/usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch b/queue-3.0/usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch new file mode 100644 index 00000000000..260dd0bf19e --- /dev/null +++ b/queue-3.0/usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch @@ -0,0 +1,50 @@ +From 2d5733fcd33dd451022d197cb6b476e970519ca7 Mon Sep 17 00:00:00 2001 +From: Yuri Matylitski +Date: Fri, 20 Apr 2012 12:38:32 +0300 +Subject: USB: serial: cp210x: Fixed usb_control_msg timeout values + +From: Yuri Matylitski + +commit 2d5733fcd33dd451022d197cb6b476e970519ca7 upstream. + +Fixed too small hardcoded timeout values for usb_control_msg +in driver for SiliconLabs cp210x-based usb-to-serial adapters. +Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT. + +Signed-off-by: Yuri Matylitski +Acked-by: Kirill A. Shutemov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -285,7 +285,8 @@ static int cp210x_get_config(struct usb_ + /* Issue the request, attempting to read 'size' bytes */ + result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), + request, REQTYPE_DEVICE_TO_HOST, 0x0000, +- port_priv->bInterfaceNumber, buf, size, 300); ++ port_priv->bInterfaceNumber, buf, size, ++ USB_CTRL_GET_TIMEOUT); + + /* Convert data into an array of integers */ + for (i = 0; i < length; i++) +@@ -335,12 +336,14 @@ static int cp210x_set_config(struct usb_ + result = usb_control_msg(serial->dev, + usb_sndctrlpipe(serial->dev, 0), + request, REQTYPE_HOST_TO_DEVICE, 0x0000, +- port_priv->bInterfaceNumber, buf, size, 300); ++ port_priv->bInterfaceNumber, buf, size, ++ USB_CTRL_SET_TIMEOUT); + } else { + result = usb_control_msg(serial->dev, + usb_sndctrlpipe(serial->dev, 0), + request, REQTYPE_HOST_TO_DEVICE, data[0], +- port_priv->bInterfaceNumber, NULL, 0, 300); ++ port_priv->bInterfaceNumber, NULL, 0, ++ USB_CTRL_SET_TIMEOUT); + } + + kfree(buf);