]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 21:21:43 +0000 (13:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 21:21:43 +0000 (13:21 -0800)
added patches:
alsa-snd-usb-caiaq-initialize-card-pointer.patch
bluetooth-fix-using-uninitialized-option-in-rfcmode.patch
drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch
mvsas-remove-unused-variable-in-mvs_task_exec.patch
nvme-fix-uninitialized-iod-compiler-warning.patch
rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch
scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch
ubifs-fix-compilation-warning.patch

queue-3.4/alsa-snd-usb-caiaq-initialize-card-pointer.patch [new file with mode: 0644]
queue-3.4/bluetooth-fix-using-uninitialized-option-in-rfcmode.patch [new file with mode: 0644]
queue-3.4/drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch [new file with mode: 0644]
queue-3.4/mvsas-remove-unused-variable-in-mvs_task_exec.patch [new file with mode: 0644]
queue-3.4/nvme-fix-uninitialized-iod-compiler-warning.patch [new file with mode: 0644]
queue-3.4/rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch [new file with mode: 0644]
queue-3.4/scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch [new file with mode: 0644]
queue-3.4/series [new file with mode: 0644]
queue-3.4/ubifs-fix-compilation-warning.patch [new file with mode: 0644]

diff --git a/queue-3.4/alsa-snd-usb-caiaq-initialize-card-pointer.patch b/queue-3.4/alsa-snd-usb-caiaq-initialize-card-pointer.patch
new file mode 100644 (file)
index 0000000..ac60c90
--- /dev/null
@@ -0,0 +1,35 @@
+From da185443c12f5ef7416af50293833a5654854186 Mon Sep 17 00:00:00 2001
+From: Daniel Mack <zonque@gmail.com>
+Date: Mon, 18 Jun 2012 21:16:31 +0200
+Subject: ALSA: snd-usb-caiaq: initialize card pointer
+
+From: Daniel Mack <zonque@gmail.com>
+
+commit da185443c12f5ef7416af50293833a5654854186 upstream.
+
+Fixes the following warning:
+
+  CC [M]  sound/usb/caiaq/device.o
+sound/usb/caiaq/device.c: In function ‘snd_probe’:
+sound/usb/caiaq/device.c:500:16: warning: ‘card’ may be used
+uninitialized in this function [-Wmaybe-uninitialized]
+
+Signed-off-by: Daniel Mack <zonque@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/caiaq/device.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/usb/caiaq/device.c
++++ b/sound/usb/caiaq/device.c
+@@ -485,7 +485,7 @@ static int __devinit snd_probe(struct us
+                    const struct usb_device_id *id)
+ {
+       int ret;
+-      struct snd_card *card;
++      struct snd_card *card = NULL;
+       struct usb_device *device = interface_to_usbdev(intf);
+       ret = create_card(device, intf, &card);
diff --git a/queue-3.4/bluetooth-fix-using-uninitialized-option-in-rfcmode.patch b/queue-3.4/bluetooth-fix-using-uninitialized-option-in-rfcmode.patch
new file mode 100644 (file)
index 0000000..ae69a08
--- /dev/null
@@ -0,0 +1,56 @@
+From 8f321f853ea33330c7141977cd34804476e2e07e Mon Sep 17 00:00:00 2001
+From: Szymon Janc <szymon.janc@tieto.com>
+Date: Fri, 8 Jun 2012 11:33:33 +0200
+Subject: Bluetooth: Fix using uninitialized option in RFCMode
+
+From: Szymon Janc <szymon.janc@tieto.com>
+
+commit 8f321f853ea33330c7141977cd34804476e2e07e upstream.
+
+If remote device sends bogus RFC option with invalid length,
+undefined options values are used. Fix this by using defaults when
+remote misbehaves.
+
+This also fixes the following warning reported by gcc 4.7.0:
+
+net/bluetooth/l2cap_core.c: In function 'l2cap_config_rsp':
+net/bluetooth/l2cap_core.c:3302:13: warning: 'rfc.max_pdu_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
+net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.max_pdu_size' was declared here
+net/bluetooth/l2cap_core.c:3298:25: warning: 'rfc.monitor_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
+net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.monitor_timeout' was declared here
+net/bluetooth/l2cap_core.c:3297:25: warning: 'rfc.retrans_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
+net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.retrans_timeout' was declared here
+net/bluetooth/l2cap_core.c:3295:2: warning: 'rfc.mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
+net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.mode' was declared here
+
+Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
+Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/bluetooth/l2cap_core.c |   14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/net/bluetooth/l2cap_core.c
++++ b/net/bluetooth/l2cap_core.c
+@@ -2585,12 +2585,14 @@ static void l2cap_conf_rfc_get(struct l2
+       while (len >= L2CAP_CONF_OPT_SIZE) {
+               len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
+-              switch (type) {
+-              case L2CAP_CONF_RFC:
+-                      if (olen == sizeof(rfc))
+-                              memcpy(&rfc, (void *)val, olen);
+-                      goto done;
+-              }
++              if (type != L2CAP_CONF_RFC)
++                      continue;
++
++              if (olen != sizeof(rfc))
++                      break;
++
++              memcpy(&rfc, (void *)val, olen);
++              goto done;
+       }
+       /* Use sane default values in case a misbehaving remote device
diff --git a/queue-3.4/drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch b/queue-3.4/drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch
new file mode 100644 (file)
index 0000000..8b4823f
--- /dev/null
@@ -0,0 +1,70 @@
+From 5bc9ad774c063f6b41965e7314f2c26aa5e465a0 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Tue, 29 May 2012 15:07:26 -0700
+Subject: drivers/leds/leds-lp5521.c: fix lp5521_read() error handling
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 5bc9ad774c063f6b41965e7314f2c26aa5e465a0 upstream.
+
+Gcc 4.6.2 complains that:
+
+  drivers/leds/leds-lp5521.c: In function `lp5521_load_program':
+  drivers/leds/leds-lp5521.c:214:21: warning: `mode' may be used uninitialized in this function [-Wuninitialized]
+  drivers/leds/leds-lp5521.c: In function `lp5521_probe':
+  drivers/leds/leds-lp5521.c:788:5: warning: `buf' may be used uninitialized in this function [-Wuninitialized]
+  drivers/leds/leds-lp5521.c:740:6: warning: `ret' may be used uninitialized in this function [-Wuninitialized]
+
+These are real problems if lp5521_read() returns an error.  When that
+happens we should handle it, instead of ignoring it or doing a bitwise
+OR with all the other error codes and continuing.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Cc: Milo <Milo.Kim@ti.com>
+Cc: Richard Purdie <rpurdie@rpsys.net>
+Cc: Bryan Wu <bryan.wu@canonical.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/leds/leds-lp5521.c |   12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/leds/leds-lp5521.c
++++ b/drivers/leds/leds-lp5521.c
+@@ -193,9 +193,14 @@ static int lp5521_load_program(struct lp
+       /* move current engine to direct mode and remember the state */
+       ret = lp5521_set_engine_mode(eng, LP5521_CMD_DIRECT);
++      if (ret)
++              return ret;
++
+       /* Mode change requires min 500 us delay. 1 - 2 ms  with margin */
+       usleep_range(1000, 2000);
+-      ret |= lp5521_read(client, LP5521_REG_OP_MODE, &mode);
++      ret = lp5521_read(client, LP5521_REG_OP_MODE, &mode);
++      if (ret)
++              return ret;
+       /* For loading, all the engines to load mode */
+       lp5521_write(client, LP5521_REG_OP_MODE, LP5521_CMD_DIRECT);
+@@ -211,8 +216,7 @@ static int lp5521_load_program(struct lp
+                               LP5521_PROG_MEM_SIZE,
+                               pattern);
+-      ret |= lp5521_write(client, LP5521_REG_OP_MODE, mode);
+-      return ret;
++      return lp5521_write(client, LP5521_REG_OP_MODE, mode);
+ }
+ static int lp5521_set_led_current(struct lp5521_chip *chip, int led, u8 curr)
+@@ -785,7 +789,7 @@ static int __devinit lp5521_probe(struct
+        * LP5521_REG_ENABLE register will not have any effect - strange!
+        */
+       ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
+-      if (buf != LP5521_REG_R_CURR_DEFAULT) {
++      if (ret || buf != LP5521_REG_R_CURR_DEFAULT) {
+               dev_err(&client->dev, "error in resetting chip\n");
+               goto fail2;
+       }
diff --git a/queue-3.4/mvsas-remove-unused-variable-in-mvs_task_exec.patch b/queue-3.4/mvsas-remove-unused-variable-in-mvs_task_exec.patch
new file mode 100644 (file)
index 0000000..36ffdab
--- /dev/null
@@ -0,0 +1,33 @@
+From cca85013ef54f66eb4616e6f3860549a96c8338b Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Thu, 21 Jun 2012 23:36:35 -0700
+Subject: [SCSI] mvsas: remove unused variable in mvs_task_exec()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit cca85013ef54f66eb4616e6f3860549a96c8338b upstream.
+
+We don't use "dev" any more after 07ec747a5f ("libsas: remove
+ata_port.lock management duties from lldds") and it causes a compile
+warning.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Cc: Xiangliang Yu <yuxiangl@marvell.com>
+Signed-off-by: Dan Williams <dan.j.williams@intel.com>
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/mvsas/mv_sas.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/scsi/mvsas/mv_sas.c
++++ b/drivers/scsi/mvsas/mv_sas.c
+@@ -885,7 +885,6 @@ static int mvs_task_exec(struct sas_task
+                               struct completion *completion, int is_tmf,
+                               struct mvs_tmf_task *tmf)
+ {
+-      struct domain_device *dev = task->dev;
+       struct mvs_info *mvi = NULL;
+       u32 rc = 0;
+       u32 pass = 0;
diff --git a/queue-3.4/nvme-fix-uninitialized-iod-compiler-warning.patch b/queue-3.4/nvme-fix-uninitialized-iod-compiler-warning.patch
new file mode 100644 (file)
index 0000000..c9f6c3e
--- /dev/null
@@ -0,0 +1,28 @@
+From c7d36ab8fa04c213328119a9c0d66985fe204ee5 Mon Sep 17 00:00:00 2001
+From: Keith Busch <keith.busch@intel.com>
+Date: Fri, 27 Jul 2012 11:53:28 -0600
+Subject: NVMe: Fix uninitialized iod compiler warning
+
+From: Keith Busch <keith.busch@intel.com>
+
+commit c7d36ab8fa04c213328119a9c0d66985fe204ee5 upstream.
+
+Signed-off-by: Keith Busch <keith.busch@intel.com>
+Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/block/nvme.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/block/nvme.c
++++ b/drivers/block/nvme.c
+@@ -1153,7 +1153,7 @@ static int nvme_user_admin_cmd(struct nv
+       struct nvme_admin_cmd cmd;
+       struct nvme_command c;
+       int status, length;
+-      struct nvme_iod *iod;
++      struct nvme_iod *uninitialized_var(iod);
+       if (!capable(CAP_SYS_ADMIN))
+               return -EACCES;
diff --git a/queue-3.4/rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch b/queue-3.4/rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch
new file mode 100644 (file)
index 0000000..6757f96
--- /dev/null
@@ -0,0 +1,36 @@
+From f761b6947dde42890beea59b020e1be87491809e Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Wed, 20 Jun 2012 11:47:26 -0500
+Subject: rtlwifi: rtl8192se: Fix gcc 4.7.x warning
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+commit f761b6947dde42890beea59b020e1be87491809e upstream.
+
+With gcc 4.7.x, the following warning is issued as the routine that sets
+the array has the possibility of not initializing the values:
+
+  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/phy.o
+drivers/net/wireless/rtlwifi/rtl8192se/phy.c: In function ‘rtl92s_phy_set_txpower’:
+drivers/net/wireless/rtlwifi/rtl8192se/phy.c:1268:23: warning: ‘ofdmpowerLevel[0]’ may be used uninitialized in this function [-Wuninitialized]
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rtlwifi/rtl8192se/phy.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
++++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
+@@ -1247,6 +1247,9 @@ static void _rtl92s_phy_get_txpower_inde
+               /* Read HT 40 OFDM TX power */
+               ofdmpowerLevel[0] = rtlefuse->txpwrlevel_ht40_2s[0][index];
+               ofdmpowerLevel[1] = rtlefuse->txpwrlevel_ht40_2s[1][index];
++      } else {
++              ofdmpowerLevel[0] = 0;
++              ofdmpowerLevel[1] = 0;
+       }
+ }
diff --git a/queue-3.4/scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch b/queue-3.4/scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch
new file mode 100644 (file)
index 0000000..1f00b42
--- /dev/null
@@ -0,0 +1,36 @@
+From b631cf1f899f9d2e449884dbccc34940637c639f Mon Sep 17 00:00:00 2001
+From: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
+Date: Wed, 2 May 2012 11:34:01 +0100
+Subject: scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
+
+From: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
+
+commit b631cf1f899f9d2e449884dbccc34940637c639f upstream.
+
+This is to change use of "0x%08x" in favour of "%p" as per ../Documentation/printk-formats.txt,
+which also takes care about the following warning during compilation time:
+
+  drivers/scsi/aha152x.c: In function ‘get_command’:
+  drivers/scsi/aha152x.c:2987: warning: cast from pointer to integer of different size
+
+Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/aha152x.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/aha152x.c
++++ b/drivers/scsi/aha152x.c
+@@ -2984,8 +2984,8 @@ static int get_command(char *pos, Scsi_C
+       char *start = pos;
+       int i;
+-      SPRINTF("0x%08x: target=%d; lun=%d; cmnd=( ",
+-              (unsigned int) ptr, ptr->device->id, ptr->device->lun);
++      SPRINTF("%p: target=%d; lun=%d; cmnd=( ",
++              ptr, ptr->device->id, ptr->device->lun);
+       for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++)
+               SPRINTF("0x%02x ", ptr->cmnd[i]);
diff --git a/queue-3.4/series b/queue-3.4/series
new file mode 100644 (file)
index 0000000..b86f441
--- /dev/null
@@ -0,0 +1,8 @@
+ubifs-fix-compilation-warning.patch
+nvme-fix-uninitialized-iod-compiler-warning.patch
+bluetooth-fix-using-uninitialized-option-in-rfcmode.patch
+alsa-snd-usb-caiaq-initialize-card-pointer.patch
+drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch
+mvsas-remove-unused-variable-in-mvs_task_exec.patch
+scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch
+rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch
diff --git a/queue-3.4/ubifs-fix-compilation-warning.patch b/queue-3.4/ubifs-fix-compilation-warning.patch
new file mode 100644 (file)
index 0000000..9e2e650
--- /dev/null
@@ -0,0 +1,38 @@
+From 782759b9f5f5223e0962af60c3457c912fab755f Mon Sep 17 00:00:00 2001
+From: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
+Date: Mon, 25 Jun 2012 17:47:49 -0300
+Subject: UBIFS: fix compilation warning
+
+From: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
+
+commit 782759b9f5f5223e0962af60c3457c912fab755f upstream.
+
+Fix the following compilation warning:
+
+fs/ubifs/dir.c: In function 'ubifs_rename':
+fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized
+in this function
+
+Use the 'uninitialized_var()' macro to get rid of this false-positive.
+
+Artem: massaged the patch a bit.
+
+Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ubifs/dir.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/ubifs/dir.c
++++ b/fs/ubifs/dir.c
+@@ -977,7 +977,7 @@ static int ubifs_rename(struct inode *ol
+       struct ubifs_budget_req ino_req = { .dirtied_ino = 1,
+                       .dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) };
+       struct timespec time;
+-      unsigned int saved_nlink;
++      unsigned int uninitialized_var(saved_nlink);
+       /*
+        * Budget request settings: deletion direntry, new direntry, removing