]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2012 16:16:03 +0000 (09:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2012 16:16:03 +0000 (09:16 -0700)
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

queue-3.3/drivers-tty-amiserial.c-add-missing-tty_unlock.patch [new file with mode: 0644]
queue-3.3/jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch [new file with mode: 0644]
queue-3.3/pch_uart-fix-dma-channel-unallocated-issue.patch [new file with mode: 0644]
queue-3.3/series
queue-3.3/usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch [new file with mode: 0644]

diff --git a/queue-3.3/drivers-tty-amiserial.c-add-missing-tty_unlock.patch b/queue-3.3/drivers-tty-amiserial.c-add-missing-tty_unlock.patch
new file mode 100644 (file)
index 0000000..b62236e
--- /dev/null
@@ -0,0 +1,33 @@
+From d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 Mon Sep 17 00:00:00 2001
+From: Julia Lawall <Julia.Lawall@lip6.fr>
+Date: Thu, 19 Apr 2012 18:12:40 +0200
+Subject: drivers/tty/amiserial.c: add missing tty_unlock
+
+From: Julia Lawall <Julia.Lawall@lip6.fr>
+
+commit d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 upstream.
+
+tty_unlock is used on all other exits from the function.
+
+Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
+Acked-by: Jiri Slaby <jslaby@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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.3/jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch b/queue-3.3/jbd2-use-gfp_nofs-for-blkdev_issue_flush.patch
new file mode 100644 (file)
index 0000000..97e63f0
--- /dev/null
@@ -0,0 +1,43 @@
+From 99aa78466777083255b876293e9e83dec7cd809a Mon Sep 17 00:00:00 2001
+From: Shaohua Li <shli@kernel.org>
+Date: Fri, 13 Apr 2012 10:27:35 +0800
+Subject: jbd2: use GFP_NOFS for blkdev_issue_flush
+
+From: Shaohua Li <shli@kernel.org>
+
+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 <shli@fusionio.com>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Reviewed-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/jbd2/commit.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/jbd2/commit.c
++++ b/fs/jbd2/commit.c
+@@ -689,7 +689,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,
+@@ -825,7 +825,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.3/pch_uart-fix-dma-channel-unallocated-issue.patch b/queue-3.3/pch_uart-fix-dma-channel-unallocated-issue.patch
new file mode 100644 (file)
index 0000000..4b392e3
--- /dev/null
@@ -0,0 +1,51 @@
+From af6d17cdc8c89aeb3101f0d27cd32fc0592b40b2 Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Thu, 12 Apr 2012 10:47:50 +0900
+Subject: pch_uart: Fix dma channel unallocated issue
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+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 <tomoya.rohm@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -1366,9 +1366,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;
index d5ec8d6ed186cb03ece1402e9ee50c93e6306f1f..bf9120a1b2abd0013b36c60483edc4772f2755d0 100644 (file)
@@ -31,3 +31,7 @@ fix-modpost-failures-in-fedora-17.patch
 mm-fix-s390-bug-by-__set_page_dirty_no_writeback-on-swap.patch
 md-don-t-call-add_disk-unless-there-is-good-reason.patch
 md-fix-possible-corruption-of-array-metadata-on-shutdown.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.3/usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch b/queue-3.3/usb-serial-cp210x-fixed-usb_control_msg-timeout-values.patch
new file mode 100644 (file)
index 0000000..bfe571c
--- /dev/null
@@ -0,0 +1,50 @@
+From 2d5733fcd33dd451022d197cb6b476e970519ca7 Mon Sep 17 00:00:00 2001
+From: Yuri Matylitski <ym@tekinsoft.com>
+Date: Fri, 20 Apr 2012 12:38:32 +0300
+Subject: USB: serial: cp210x: Fixed usb_control_msg timeout values
+
+From: Yuri Matylitski <ym@tekinsoft.com>
+
+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 <ym@tekinsoft.com>
+Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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++)
+@@ -338,12 +339,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);