linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ 00/56] 3.4.21-stable review
@ 2012-11-30 18:54 Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 01/56] UBIFS: fix compilation warning Greg Kroah-Hartman
                   ` (56 more replies)
  0 siblings, 57 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, torvalds, akpm, alan

This is the start of the stable review cycle for the 3.4.21 release.
There are 56 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Sun Dec  2 18:50:02 UTC 2012.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.4.21-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 3.4.21-rc1

Johannes Berg <johannes.berg@intel.com>
    iwlwifi: fix 6000 series channel switch command

Stanislav Yakovlev <stas.yakovlev@gmail.com>
    net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx()

Dan Carpenter <dan.carpenter@oracle.com>
    timekeeping: Cast raw_interval to u64 to avoid shift overflow

Colin Cross <ccross@android.com>
    ARM: OMAP: counter: add locking to read_persistent_clock

Jaehoon Chung <jh80.chung@samsung.com>
    mmc: sdhci-s3c: fix the wrong number of max bus clocks

Gavin Shan <shangw@linux.vnet.ibm.com>
    powerpc/eeh: Lock module while handling EEH event

Manuel Lauss <manuel.lauss@gmail.com>
    MPI: Fix compilation on MIPS with GCC 4.4 and newer

Chuansheng Liu <chuansheng.liu@intel.com>
    watchdog: using u64 in get_sample_period()

Johan Hovold <jhovold@gmail.com>
    USB: mct_u232: fix broken close

Thierry Escande <thierry.escande@linux.intel.com>
    NFC: Fix nfc_llcp_local chained list insertion

Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
    NFC: pn533: Fix mem leak in pn533_in_dep_link_up

Szymon Janc <szymon.janc@tieto.com>
    NFC: pn533: Fix use after free

Mauro Carvalho Chehab <mchehab@redhat.com>
    get_dvb_firmware: fix download site for tda10046 firmware

David Milburn <dmilburn@redhat.com>
    sata_svw: check DMA start bit before reset

joshua.a.hay@intel.com <joshua.a.hay@intel.com>
    ixgbe: add support for X540-AT1

Petr Matousek <pmatouse@redhat.com>
    KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)

Jan Kara <jack@suse.cz>
    scsi: Silence unnecessary warnings about ioctl to partition

Tilman Schmidt <tilman@imap.cc>
    bas_gigaset: fix pre_reset handling

David Henningsson <david.henningsson@canonical.com>
    ALSA: hda - Add support for Realtek ALC292

Duncan Roe <duncan_roe@acslink.net.au>
    ALSA: hda - Fix missing beep on ASUS X43U notebook

Kailang Yang <kailang@realtek.com>
    ALSA: hda - Add new codec ALC283 ALC290 support

Guennadi Liakhovetski <g.liakhovetski@gmx.de>
    PM / QoS: fix wrong error-checking condition

Al Viro <viro@zeniv.linux.org.uk>
    sparc64: not any error from do_sigaltstack() should fail rt_sigreturn()

Jan Kara <jack@suse.cz>
    jbd: Fix lock ordering bug in journal_unmap_buffer()

Oliver Hartkopp <socketcan@hartkopp.net>
    can: bcm: initialize ifindex for timeouts without previous frame reception

Oliver Hartkopp <socketcan@hartkopp.net>
    can: peak_usb: fix hwtstamp assignment

Paul Bolle <pebolle@tiscali.nl>
    radeon: add AGPMode 1 quirk for RV250

Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
    mac80211: deinitialize ibss-internals after emptiness check

Darren Hart <dvhart@linux.intel.com>
    futex: avoid wake_futex() for a PI futex_q

Jens Axboe <axboe@kernel.dk>
    dm: fix deadlock with request based dm and queue request_fn recursion

NeilBrown <neilb@suse.de>
    md/raid10: decrement correct pending counter when writing to replacement.

majianpeng <majianpeng@gmail.com>
    md: Avoid write invalid address if read_seqretry returned true.

majianpeng <majianpeng@gmail.com>
    md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.

Thomas Betker <thomas.betker@freenet.de>
    jffs2: Fix lock acquisition order bug in jffs2_write_begin

Sachin Kamat <sachin.kamat@linaro.org>
    mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()

Jiri Engelthaler <engycz@gmail.com>
    mtd: slram: invalid checking of absolute end address

Al Viro <viro@ZenIV.linux.org.uk>
    PARISC: fix user-triggerable panic on parisc

James Bottomley <James.Bottomley@HansenPartnership.com>
    PARISC: fix virtual aliasing issue in get_shared_area()

David Henningsson <david.henningsson@canonical.com>
    ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker

Clemens Ladisch <clemens@ladisch.de>
    ALSA: ua101, usx2y: fix broken MIDI output

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: add new SI pci id

Maciej Patelczyk <maciej.patelczyk@intel.com>
    SCSI: isci: copy fis 0x34 response into proper buffer

Bing Zhao <bzhao@marvell.com>
    mwifiex: fix system hang issue in cmd timeout error case

Bing Zhao <bzhao@marvell.com>
    mwifiex: report error to MMC core if we cannot suspend

Albert Pool <albertpool@solcon.nl>
    rtlwifi: rtl8192cu: Add new USB ID

Boris Ostrovsky <boris.ostrovsky@amd.com>
    x86, microcode, AMD: Add support for family 16h processors

Matt Fleming <matt.fleming@intel.com>
    x86, efi: Fix processor-specific memcpy() build error

Robert Richter <robert.richter@amd.com>
    x86-32: Fix invalid stack address while in softirq

Larry Finger <Larry.Finger@lwfinger.net>
    rtlwifi: rtl8192se: Fix gcc 4.7.x warning

Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
    scsi: aha152x: Fix sparse warning and make printing pointer address more portable.

Dan Carpenter <dan.carpenter@oracle.com>
    mvsas: remove unused variable in mvs_task_exec()

Dan Carpenter <dan.carpenter@oracle.com>
    drivers/leds/leds-lp5521.c: fix lp5521_read() error handling

Daniel Mack <zonque@gmail.com>
    ALSA: snd-usb-caiaq: initialize card pointer

Szymon Janc <szymon.janc@tieto.com>
    Bluetooth: Fix using uninitialized option in RFCMode

Keith Busch <keith.busch@intel.com>
    NVMe: Fix uninitialized iod compiler warning

Alexandre Pereira da Silva <aletes.xgr@gmail.com>
    UBIFS: fix compilation warning


-------------

Diffstat:

 Documentation/dvb/get_dvb_firmware               |  2 +-
 Makefile                                         |  4 +-
 arch/arm/plat-omap/counter_32k.c                 | 21 ++++--
 arch/parisc/kernel/signal32.c                    |  6 +-
 arch/parisc/kernel/sys_parisc.c                  |  2 +
 arch/powerpc/platforms/pseries/eeh_driver.c      | 95 ++++++++++++++++++------
 arch/sparc/kernel/signal_64.c                    |  4 +-
 arch/x86/boot/compressed/eboot.c                 |  2 +
 arch/x86/include/asm/ptrace.h                    | 15 +---
 arch/x86/kernel/microcode_amd.c                  |  4 +
 arch/x86/kernel/ptrace.c                         | 28 +++++++
 arch/x86/kvm/cpuid.h                             |  3 +
 arch/x86/kvm/x86.c                               |  3 +
 block/scsi_ioctl.c                               |  5 +-
 drivers/ata/sata_svw.c                           | 35 +++++++++
 drivers/base/power/qos.c                         |  2 +-
 drivers/block/nvme.c                             |  2 +-
 drivers/gpu/drm/radeon/radeon_agp.c              |  5 +-
 drivers/isdn/gigaset/bas-gigaset.c               | 19 ++++-
 drivers/leds/leds-lp5521.c                       | 12 ++-
 drivers/md/dm.c                                  |  8 +-
 drivers/md/md.c                                  | 11 +--
 drivers/md/raid10.c                              |  2 +-
 drivers/mmc/host/sdhci-s3c.c                     |  2 +-
 drivers/mtd/devices/slram.c                      |  2 +-
 drivers/mtd/ofpart.c                             |  2 +-
 drivers/net/can/usb/peak_usb/pcan_usb.c          |  8 +-
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c      |  8 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  |  1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |  2 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |  1 +
 drivers/net/wireless/ipw2x00/ipw2200.c           |  2 +-
 drivers/net/wireless/iwlwifi/iwl-6000.c          | 33 +++++---
 drivers/net/wireless/mwifiex/cmdevt.c            | 11 ++-
 drivers/net/wireless/mwifiex/sdio.c              | 11 +--
 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c      |  1 +
 drivers/net/wireless/rtlwifi/rtl8192se/phy.c     |  3 +
 drivers/nfc/pn533.c                              | 16 ++--
 drivers/scsi/aha152x.c                           |  4 +-
 drivers/scsi/isci/request.c                      |  2 +-
 drivers/scsi/mvsas/mv_sas.c                      |  1 -
 drivers/usb/serial/mct_u232.c                    | 14 ++--
 fs/jbd/transaction.c                             |  2 +
 fs/jffs2/file.c                                  | 39 +++++-----
 fs/ubifs/dir.c                                   |  2 +-
 include/drm/drm_pciids.h                         |  1 +
 kernel/futex.c                                   | 18 ++++-
 kernel/time/timekeeping.c                        |  2 +-
 kernel/watchdog.c                                |  4 +-
 lib/mpi/longlong.h                               | 19 ++++-
 net/bluetooth/l2cap_core.c                       | 14 ++--
 net/can/bcm.c                                    |  3 +
 net/mac80211/ibss.c                              |  8 +-
 net/nfc/llcp/llcp.c                              |  2 +-
 sound/pci/hda/patch_cirrus.c                     |  1 +
 sound/pci/hda/patch_realtek.c                    |  4 +
 sound/usb/caiaq/device.c                         |  2 +-
 sound/usb/midi.c                                 |  8 +-
 59 files changed, 393 insertions(+), 151 deletions(-)



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 01/56] UBIFS: fix compilation warning
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
@ 2012-11-30 18:54 ` Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 02/56] NVMe: Fix uninitialized iod compiler warning Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Alexandre Pereira da Silva, Artem Bityutskiy

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 02/56] NVMe: Fix uninitialized iod compiler warning
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 01/56] UBIFS: fix compilation warning Greg Kroah-Hartman
@ 2012-11-30 18:54 ` Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 03/56] Bluetooth: Fix using uninitialized option in RFCMode Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Keith Busch, Matthew Wilcox

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 03/56] Bluetooth: Fix using uninitialized option in RFCMode
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 01/56] UBIFS: fix compilation warning Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 02/56] NVMe: Fix uninitialized iod compiler warning Greg Kroah-Hartman
@ 2012-11-30 18:54 ` Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 04/56] ALSA: snd-usb-caiaq: initialize card pointer Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Szymon Janc, Gustavo Padovan

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 04/56] ALSA: snd-usb-caiaq: initialize card pointer
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2012-11-30 18:54 ` [ 03/56] Bluetooth: Fix using uninitialized option in RFCMode Greg Kroah-Hartman
@ 2012-11-30 18:54 ` Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 05/56] drivers/leds/leds-lp5521.c: fix lp5521_read() error handling Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Daniel Mack, Takashi Iwai

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 05/56] drivers/leds/leds-lp5521.c: fix lp5521_read() error handling
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2012-11-30 18:54 ` [ 04/56] ALSA: snd-usb-caiaq: initialize card pointer Greg Kroah-Hartman
@ 2012-11-30 18:54 ` Greg Kroah-Hartman
  2012-12-02  3:17   ` Ben Hutchings
  2012-11-30 18:54 ` [ 06/56] [SCSI] mvsas: remove unused variable in mvs_task_exec() Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  56 siblings, 1 reply; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Dan Carpenter, Milo, Richard Purdie,
	Bryan Wu, Andrew Morton, Linus Torvalds

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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;
 	}



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 06/56] [SCSI] mvsas: remove unused variable in mvs_task_exec()
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2012-11-30 18:54 ` [ 05/56] drivers/leds/leds-lp5521.c: fix lp5521_read() error handling Greg Kroah-Hartman
@ 2012-11-30 18:54 ` Greg Kroah-Hartman
  2012-11-30 18:54 ` [ 07/56] scsi: aha152x: Fix sparse warning and make printing pointer address more portable Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Dan Carpenter, Xiangliang Yu,
	Dan Williams, James Bottomley

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 07/56] scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2012-11-30 18:54 ` [ 06/56] [SCSI] mvsas: remove unused variable in mvs_task_exec() Greg Kroah-Hartman
@ 2012-11-30 18:54 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 08/56] rtlwifi: rtl8192se: Fix gcc 4.7.x warning Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Krzysztof Wilczynski, Jiri Kosina

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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]);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 08/56] rtlwifi: rtl8192se: Fix gcc 4.7.x warning
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2012-11-30 18:54 ` [ 07/56] scsi: aha152x: Fix sparse warning and make printing pointer address more portable Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 09/56] x86-32: Fix invalid stack address while in softirq Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Larry Finger, John W. Linville

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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;
 	}
 }
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 09/56] x86-32: Fix invalid stack address while in softirq
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2012-11-30 18:55 ` [ 08/56] rtlwifi: rtl8192se: Fix gcc 4.7.x warning Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-12-04 13:56   ` Herton Ronaldo Krzesinski
  2012-11-30 18:55 ` [ 10/56] x86, efi: Fix processor-specific memcpy() build error Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  56 siblings, 1 reply; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Yang Wei, Robert Richter,
	H. Peter Anvin, Jun Zhang

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Robert Richter <robert.richter@amd.com>

commit 1022623842cb72ee4d0dbf02f6937f38c92c3f41 upstream.

In 32 bit the stack address provided by kernel_stack_pointer() may
point to an invalid range causing NULL pointer access or page faults
while in NMI (see trace below). This happens if called in softirq
context and if the stack is empty. The address at &regs->sp is then
out of range.

Fixing this by checking if regs and &regs->sp are in the same stack
context. Otherwise return the previous stack pointer stored in struct
thread_info. If that address is invalid too, return address of regs.

 BUG: unable to handle kernel NULL pointer dereference at 0000000a
 IP: [<c1004237>] print_context_stack+0x6e/0x8d
 *pde = 00000000
 Oops: 0000 [#1] SMP
 Modules linked in:
 Pid: 4434, comm: perl Not tainted 3.6.0-rc3-oprofile-i386-standard-g4411a05 #4 Hewlett-Packard HP xw9400 Workstation/0A1Ch
 EIP: 0060:[<c1004237>] EFLAGS: 00010093 CPU: 0
 EIP is at print_context_stack+0x6e/0x8d
 EAX: ffffe000 EBX: 0000000a ECX: f4435f94 EDX: 0000000a
 ESI: f4435f94 EDI: f4435f94 EBP: f5409ec0 ESP: f5409ea0
  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
 CR0: 8005003b CR2: 0000000a CR3: 34ac9000 CR4: 000007d0
 DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
 DR6: ffff0ff0 DR7: 00000400
 Process perl (pid: 4434, ti=f5408000 task=f5637850 task.ti=f4434000)
 Stack:
  000003e8 ffffe000 00001ffc f4e39b00 00000000 0000000a f4435f94 c155198c
  f5409ef0 c1003723 c155198c f5409f04 00000000 f5409edc 00000000 00000000
  f5409ee8 f4435f94 f5409fc4 00000001 f5409f1c c12dce1c 00000000 c155198c
 Call Trace:
  [<c1003723>] dump_trace+0x7b/0xa1
  [<c12dce1c>] x86_backtrace+0x40/0x88
  [<c12db712>] ? oprofile_add_sample+0x56/0x84
  [<c12db731>] oprofile_add_sample+0x75/0x84
  [<c12ddb5b>] op_amd_check_ctrs+0x46/0x260
  [<c12dd40d>] profile_exceptions_notify+0x23/0x4c
  [<c1395034>] nmi_handle+0x31/0x4a
  [<c1029dc5>] ? ftrace_define_fields_irq_handler_entry+0x45/0x45
  [<c13950ed>] do_nmi+0xa0/0x2ff
  [<c1029dc5>] ? ftrace_define_fields_irq_handler_entry+0x45/0x45
  [<c13949e5>] nmi_stack_correct+0x28/0x2d
  [<c1029dc5>] ? ftrace_define_fields_irq_handler_entry+0x45/0x45
  [<c1003603>] ? do_softirq+0x4b/0x7f
  <IRQ>
  [<c102a06f>] irq_exit+0x35/0x5b
  [<c1018f56>] smp_apic_timer_interrupt+0x6c/0x7a
  [<c1394746>] apic_timer_interrupt+0x2a/0x30
 Code: 89 fe eb 08 31 c9 8b 45 0c ff 55 ec 83 c3 04 83 7d 10 00 74 0c 3b 5d 10 73 26 3b 5d e4 73 0c eb 1f 3b 5d f0 76 1a 3b 5d e8 73 15 <8b> 13 89 d0 89 55 e0 e8 ad 42 03 00 85 c0 8b 55 e0 75 a6 eb cc
 EIP: [<c1004237>] print_context_stack+0x6e/0x8d SS:ESP 0068:f5409ea0
 CR2: 000000000000000a
 ---[ end trace 62afee3481b00012 ]---
 Kernel panic - not syncing: Fatal exception in interrupt

V2:
* add comments to kernel_stack_pointer()
* always return a valid stack address by falling back to the address
  of regs

Reported-by: Yang Wei <wei.yang@windriver.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Link: http://lkml.kernel.org/r/20120912135059.GZ8285@erda.amd.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jun Zhang <jun.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/include/asm/ptrace.h |   15 ++++-----------
 arch/x86/kernel/ptrace.c      |   28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 11 deletions(-)

--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
@@ -205,21 +205,14 @@ static inline bool user_64bit_mode(struc
 }
 #endif
 
-/*
- * X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode
- * when it traps.  The previous stack will be directly underneath the saved
- * registers, and 'sp/ss' won't even have been saved. Thus the '&regs->sp'.
- *
- * This is valid only for kernel mode traps.
- */
-static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
-{
 #ifdef CONFIG_X86_32
-	return (unsigned long)(&regs->sp);
+extern unsigned long kernel_stack_pointer(struct pt_regs *regs);
 #else
+static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
+{
 	return regs->sp;
-#endif
 }
+#endif
 
 #define GET_IP(regs) ((regs)->ip)
 #define GET_FP(regs) ((regs)->bp)
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -165,6 +165,34 @@ static inline bool invalid_selector(u16
 
 #define FLAG_MASK		FLAG_MASK_32
 
+/*
+ * X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode
+ * when it traps.  The previous stack will be directly underneath the saved
+ * registers, and 'sp/ss' won't even have been saved. Thus the '&regs->sp'.
+ *
+ * Now, if the stack is empty, '&regs->sp' is out of range. In this
+ * case we try to take the previous stack. To always return a non-null
+ * stack pointer we fall back to regs as stack if no previous stack
+ * exists.
+ *
+ * This is valid only for kernel mode traps.
+ */
+unsigned long kernel_stack_pointer(struct pt_regs *regs)
+{
+	unsigned long context = (unsigned long)regs & ~(THREAD_SIZE - 1);
+	unsigned long sp = (unsigned long)&regs->sp;
+	struct thread_info *tinfo;
+
+	if (context == (sp & ~(THREAD_SIZE - 1)))
+		return sp;
+
+	tinfo = (struct thread_info *)context;
+	if (tinfo->previous_esp)
+		return tinfo->previous_esp;
+
+	return (unsigned long)regs;
+}
+
 static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno)
 {
 	BUILD_BUG_ON(offsetof(struct pt_regs, bx) != 0);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 10/56] x86, efi: Fix processor-specific memcpy() build error
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2012-11-30 18:55 ` [ 09/56] x86-32: Fix invalid stack address while in softirq Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 11/56] x86, microcode, AMD: Add support for family 16h processors Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Al Viro, Ryan Underwood,
	H. Peter Anvin, Matt Fleming

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Matt Fleming <matt.fleming@intel.com>

commit 0f905a43ce955b638139bd84486194770a6a2c08 upstream.

Building for Athlon/Duron/K7 results in the following build error,

arch/x86/boot/compressed/eboot.o: In function `__constant_memcpy3d':
eboot.c:(.text+0x385): undefined reference to `_mmx_memcpy'
arch/x86/boot/compressed/eboot.o: In function `efi_main':
eboot.c:(.text+0x1a22): undefined reference to `_mmx_memcpy'

because the boot stub code doesn't link with the kernel proper, and
therefore doesn't have access to the 3DNow version of memcpy. So,
follow the example of misc.c and #undef memcpy so that we use the
version provided by misc.c.

See https://bugzilla.kernel.org/show_bug.cgi?id=50391

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Ryan Underwood <nemesis@icequake.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/boot/compressed/eboot.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -12,6 +12,8 @@
 #include <asm/setup.h>
 #include <asm/desc.h>
 
+#undef memcpy			/* Use memcpy from misc.c */
+
 #include "eboot.h"
 
 static efi_system_table_t *sys_table;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 11/56] x86, microcode, AMD: Add support for family 16h processors
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2012-11-30 18:55 ` [ 10/56] x86, efi: Fix processor-specific memcpy() build error Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 12/56] rtlwifi: rtl8192cu: Add new USB ID Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Boris Ostrovsky, Andreas Herrmann,
	H. Peter Anvin

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Boris Ostrovsky <boris.ostrovsky@amd.com>

commit 36c46ca4f322a7bf89aad5462a3a1f61713edce7 upstream.

Add valid patch size for family 16h processors.

[ hpa: promoting to urgent/stable since it is hw enabling and trivial ]

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Acked-by: Andreas Herrmann <herrmann.der.user@googlemail.com>
Link: http://lkml.kernel.org/r/1353004910-2204-1-git-send-email-boris.ostrovsky@amd.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/microcode_amd.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -97,6 +97,7 @@ static unsigned int verify_ucode_size(in
 #define F1XH_MPB_MAX_SIZE 2048
 #define F14H_MPB_MAX_SIZE 1824
 #define F15H_MPB_MAX_SIZE 4096
+#define F16H_MPB_MAX_SIZE 3458
 
 	switch (c->x86) {
 	case 0x14:
@@ -105,6 +106,9 @@ static unsigned int verify_ucode_size(in
 	case 0x15:
 		max_size = F15H_MPB_MAX_SIZE;
 		break;
+	case 0x16:
+		max_size = F16H_MPB_MAX_SIZE;
+		break;
 	default:
 		max_size = F1XH_MPB_MAX_SIZE;
 		break;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 12/56] rtlwifi: rtl8192cu: Add new USB ID
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2012-11-30 18:55 ` [ 11/56] x86, microcode, AMD: Add support for family 16h processors Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 13/56] mwifiex: report error to MMC core if we cannot suspend Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Albert Pool, Larry Finger, John W. Linville

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Albert Pool <albertpool@solcon.nl>

commit a485e827f07bfdd0762059386e6e787bed6e81ee upstream.

This is an ISY IWL 2000. Probably a clone of Belkin F7D1102 050d:1102.
Its FCC ID is the same.

Signed-off-by: Albert Pool <albertpool@solcon.nl>
Acked-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/rtl8192cu/sw.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
@@ -297,6 +297,7 @@ static struct usb_device_id rtl8192c_usb
 	/*=== Customer ID ===*/
 	/****** 8188CU ********/
 	{RTL_USB_DEVICE(0x050d, 0x1102, rtl92cu_hal_cfg)}, /*Belkin - Edimax*/
+	{RTL_USB_DEVICE(0x050d, 0x11f2, rtl92cu_hal_cfg)}, /*Belkin - ISY*/
 	{RTL_USB_DEVICE(0x06f8, 0xe033, rtl92cu_hal_cfg)}, /*Hercules - Edimax*/
 	{RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
 	{RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 13/56] mwifiex: report error to MMC core if we cannot suspend
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2012-11-30 18:55 ` [ 12/56] rtlwifi: rtl8192cu: Add new USB ID Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 14/56] mwifiex: fix system hang issue in cmd timeout error case Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Bing Zhao, John W. Linville

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bing Zhao <bzhao@marvell.com>

commit dd321acddc3be1371263b8c9e6c6f2af89f63d57 upstream.

When host_sleep_config command fails we should return error to
MMC core to indicate the failure for our device.

The misspelled variable is also removed as it's redundant.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/mwifiex/sdio.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -158,7 +158,6 @@ static int mwifiex_sdio_suspend(struct d
 	struct sdio_mmc_card *card;
 	struct mwifiex_adapter *adapter;
 	mmc_pm_flag_t pm_flag = 0;
-	int hs_actived = 0;
 	int i;
 	int ret = 0;
 
@@ -185,12 +184,14 @@ static int mwifiex_sdio_suspend(struct d
 	adapter = card->adapter;
 
 	/* Enable the Host Sleep */
-	hs_actived = mwifiex_enable_hs(adapter);
-	if (hs_actived) {
-		pr_debug("cmd: suspend with MMC_PM_KEEP_POWER\n");
-		ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
+	if (!mwifiex_enable_hs(adapter)) {
+		dev_err(adapter->dev, "cmd: failed to suspend\n");
+		return -EFAULT;
 	}
 
+	dev_dbg(adapter->dev, "cmd: suspend with MMC_PM_KEEP_POWER\n");
+	ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
+
 	/* Indicate device suspended */
 	adapter->is_suspended = true;
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 14/56] mwifiex: fix system hang issue in cmd timeout error case
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2012-11-30 18:55 ` [ 13/56] mwifiex: report error to MMC core if we cannot suspend Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 15/56] SCSI: isci: copy fis 0x34 response into proper buffer Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Tim Shepard, Bing Zhao, John W. Linville

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bing Zhao <bzhao@marvell.com>

commit b1a47aa5e1e159e2cb06d7dfcc17ef5149b09299 upstream.

Reported by Tim Shepard:
I was seeing sporadic failures (wedgeups), and the majority of those
failures I saw printed the printouts in mwifiex_cmd_timeout_func with
cmd = 0xe5 which is CMD_802_11_HS_CFG_ENH.  When this happens, two
minutes later I get notified that the rtcwake thread is blocked, like
this:
      INFO: task rtcwake:3495 blocked for more than 120 seconds.

To get the hung thread unblocked we wake up the cmd wait queue and
cancel the ioctl.

Reported-by: Tim Shepard <shep@laptop.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/mwifiex/cmdevt.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -816,9 +816,6 @@ mwifiex_cmd_timeout_func(unsigned long f
 		return;
 	}
 	cmd_node = adapter->curr_cmd;
-	if (cmd_node->wait_q_enabled)
-		adapter->cmd_wait_q.status = -ETIMEDOUT;
-
 	if (cmd_node) {
 		adapter->dbg.timeout_cmd_id =
 			adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index];
@@ -864,6 +861,14 @@ mwifiex_cmd_timeout_func(unsigned long f
 
 		dev_err(adapter->dev, "ps_mode=%d ps_state=%d\n",
 			adapter->ps_mode, adapter->ps_state);
+
+		if (cmd_node->wait_q_enabled) {
+			adapter->cmd_wait_q.status = -ETIMEDOUT;
+			wake_up_interruptible(&adapter->cmd_wait_q.wait);
+			mwifiex_cancel_pending_ioctl(adapter);
+			/* reset cmd_sent flag to unblock new commands */
+			adapter->cmd_sent = false;
+		}
 	}
 	if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING)
 		mwifiex_init_fw_complete(adapter);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 15/56] SCSI: isci: copy fis 0x34 response into proper buffer
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2012-11-30 18:55 ` [ 14/56] mwifiex: fix system hang issue in cmd timeout error case Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 16/56] drm/radeon: add new SI pci id Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Maciej Patelczyk, Lukasz Dorau,
	James Bottomley

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Maciej Patelczyk <maciej.patelczyk@intel.com>

commit 49bd665c5407a453736d3232ee58f2906b42e83c upstream.

SATA MICROCODE DOWNALOAD fails on isci driver. After receiving Register
Device to Host (FIS 0x34) frame Initiator resets phy.
In the frame handler routine response (FIS 0x34) was copied into wrong
buffer and upper layer did not receive any answer which resulted in
timeout and reset.
This patch corrects this bug.

Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/isci/request.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -1970,7 +1970,7 @@ sci_io_request_frame_handler(struct isci
 								      frame_index,
 								      (void **)&frame_buffer);
 
-			sci_controller_copy_sata_response(&ireq->stp.req,
+			sci_controller_copy_sata_response(&ireq->stp.rsp,
 							       frame_header,
 							       frame_buffer);
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 16/56] drm/radeon: add new SI pci id
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2012-11-30 18:55 ` [ 15/56] SCSI: isci: copy fis 0x34 response into proper buffer Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 17/56] ALSA: ua101, usx2y: fix broken MIDI output Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Alex Deucher

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alex Deucher <alexander.deucher@amd.com>

commit 0181bd5dea2ed0696f84591a92da0b6a1f1a2e62 upstream.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/drm/drm_pciids.h |    1 +
 1 file changed, 1 insertion(+)

--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -214,6 +214,7 @@
 	{0x1002, 0x6798, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x6799, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x679A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
+	{0x1002, 0x679B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x679E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x679F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x6800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 17/56] ALSA: ua101, usx2y: fix broken MIDI output
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2012-11-30 18:55 ` [ 16/56] drm/radeon: add new SI pci id Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 18/56] ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Colin Fletcher, Devin Venable,
	Dr Nick Bailey, Jannis Achstetter, Rui Nuno Capela,
	Oliver Neukum, Clemens Ladisch

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Clemens Ladisch <clemens@ladisch.de>

commit e99ddfde6ae0dd2662bb40435696002b590e4057 upstream.

Commit 88a8516a2128 (ALSA: usbaudio: implement USB autosuspend) added
autosuspend code to all files making up the snd-usb-audio driver.
However, midi.c is part of snd-usb-lib and is also used by other
drivers, not all of which support autosuspend.  Thus, calls to
usb_autopm_get_interface() could fail, and this unexpected error would
result in the MIDI output being completely unusable.

Make it work by ignoring the error that is expected with drivers that do
not support autosuspend.

Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Reported-by: Devin Venable <venable.devin@gmail.com>
Reported-by: Dr Nick Bailey <nicholas.bailey@glasgow.ac.uk>
Reported-by: Jannis Achstetter <jannis_achstetter@web.de>
Reported-by: Rui Nuno Capela <rncbc@rncbc.org>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/midi.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -148,6 +148,7 @@ struct snd_usb_midi_out_endpoint {
 		struct snd_usb_midi_out_endpoint* ep;
 		struct snd_rawmidi_substream *substream;
 		int active;
+		bool autopm_reference;
 		uint8_t cable;		/* cable number << 4 */
 		uint8_t state;
 #define STATE_UNKNOWN	0
@@ -1076,7 +1077,8 @@ static int snd_usbmidi_output_open(struc
 		return -ENXIO;
 	}
 	err = usb_autopm_get_interface(umidi->iface);
-	if (err < 0)
+	port->autopm_reference = err >= 0;
+	if (err < 0 && err != -EACCES)
 		return -EIO;
 	substream->runtime->private_data = port;
 	port->state = STATE_UNKNOWN;
@@ -1087,9 +1089,11 @@ static int snd_usbmidi_output_open(struc
 static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream)
 {
 	struct snd_usb_midi* umidi = substream->rmidi->private_data;
+	struct usbmidi_out_port *port = substream->runtime->private_data;
 
 	substream_open(substream, 0);
-	usb_autopm_put_interface(umidi->iface);
+	if (port->autopm_reference)
+		usb_autopm_put_interface(umidi->iface);
 	return 0;
 }
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 18/56] ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2012-11-30 18:55 ` [ 17/56] ALSA: ua101, usx2y: fix broken MIDI output Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 19/56] PARISC: fix virtual aliasing issue in get_shared_area() Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, David Henningsson, Takashi Iwai

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David Henningsson <david.henningsson@canonical.com>

commit 34c3d1926bdaf45d3a891dd577482abcdd9faa34 upstream.

If this array is not cleared, the jack related code later might
fail to create "Internal Speaker Phantom Jack" on Dell Inspiron 3420 and
Dell Vostro 2420.

BugLink: https://bugs.launchpad.net/bugs/1076840
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_cirrus.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -460,6 +460,7 @@ static int parse_output(struct hda_codec
 		memcpy(cfg->speaker_pins, cfg->line_out_pins,
 		       sizeof(cfg->speaker_pins));
 		cfg->line_outs = 0;
+		memset(cfg->line_out_pins, 0, sizeof(cfg->line_out_pins));
 	}
 
 	return 0;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 19/56] PARISC: fix virtual aliasing issue in get_shared_area()
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2012-11-30 18:55 ` [ 18/56] ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 20/56] PARISC: fix user-triggerable panic on parisc Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Michel Lespinasse, James Bottomley

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: James Bottomley <James.Bottomley@HansenPartnership.com>

commit 949a05d03490e39e773e8652ccab9157e6f595b4 upstream.

On Thu, 2012-11-01 at 16:45 -0700, Michel Lespinasse wrote:
> Looking at the arch/parisc/kernel/sys_parisc.c implementation of
> get_shared_area(), I do have a concern though. The function basically
> ignores the pgoff argument, so that if one creates a shared mapping of
> pages 0-N of a file, and then a separate shared mapping of pages 1-N
> of that same file, both will have the same cache offset for their
> starting address.
>
> This looks like this would create obvious aliasing issues. Am I
> misreading this ? I can't understand how this could work good enough
> to be undetected, so there must be something I'm missing here ???

This turns out to be correct and we need to pay attention to the pgoff as
well as the address when creating the virtual address for the area.
Fortunately, the bug is rarely triggered as most applications which use pgoff
tend to use large values (git being the primary one, and it uses pgoff in
multiples of 16MB) which are larger than our cache coherency modulus, so the
problem isn't often seen in practise.

Reported-by: Michel Lespinasse <walken@google.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/parisc/kernel/sys_parisc.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/parisc/kernel/sys_parisc.c
+++ b/arch/parisc/kernel/sys_parisc.c
@@ -73,6 +73,8 @@ static unsigned long get_shared_area(str
 	struct vm_area_struct *vma;
 	int offset = mapping ? get_offset(mapping) : 0;
 
+	offset = (offset + (pgoff << PAGE_SHIFT)) & 0x3FF000;
+
 	addr = DCACHE_ALIGN(addr - offset) + offset;
 
 	for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 20/56] PARISC: fix user-triggerable panic on parisc
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2012-11-30 18:55 ` [ 19/56] PARISC: fix virtual aliasing issue in get_shared_area() Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 21/56] mtd: slram: invalid checking of absolute end address Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Al Viro, James Bottomley

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@ZenIV.linux.org.uk>

commit 441a179dafc0f99fc8b3a8268eef66958621082e upstream.

int sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, compat_sigset_t __user *oset,
                                    unsigned int sigsetsize)
{
        sigset_t old_set, new_set;
        int ret;

        if (set && get_sigset32(set, &new_set, sigsetsize))

...
static int
get_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
{
        compat_sigset_t s;
        int r;

        if (sz != sizeof *set) panic("put_sigset32()");

In other words, rt_sigprocmask(69, (void *)69, 69) done by 32bit process
will promptly panic the box.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/parisc/kernel/signal32.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/arch/parisc/kernel/signal32.c
+++ b/arch/parisc/kernel/signal32.c
@@ -67,7 +67,8 @@ put_sigset32(compat_sigset_t __user *up,
 {
 	compat_sigset_t s;
 
-	if (sz != sizeof *set) panic("put_sigset32()");
+	if (sz != sizeof *set)
+		return -EINVAL;
 	sigset_64to32(&s, set);
 
 	return copy_to_user(up, &s, sizeof s);
@@ -79,7 +80,8 @@ get_sigset32(compat_sigset_t __user *up,
 	compat_sigset_t s;
 	int r;
 
-	if (sz != sizeof *set) panic("put_sigset32()");
+	if (sz != sizeof *set)
+		return -EINVAL;
 
 	if ((r = copy_from_user(&s, up, sz)) == 0) {
 		sigset_32to64(set, &s);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 21/56] mtd: slram: invalid checking of absolute end address
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2012-11-30 18:55 ` [ 20/56] PARISC: fix user-triggerable panic on parisc Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 22/56] mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions() Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Jiri Engelthaler, Artem Bityutskiy

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jiri Engelthaler <engycz@gmail.com>

commit c36a7ff4578ab6294885aef5ef241aeec4cdb1f0 upstream.

Fixed parsing end absolute address.

Signed-off-by: Jiri Engelthaler <engycz@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mtd/devices/slram.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mtd/devices/slram.c
+++ b/drivers/mtd/devices/slram.c
@@ -240,7 +240,7 @@ static int parse_cmdline(char *devname,
 
 	if (*(szlength) != '+') {
 		devlength = simple_strtoul(szlength, &buffer, 0);
-		devlength = handle_unit(devlength, buffer) - devstart;
+		devlength = handle_unit(devlength, buffer);
 		if (devlength < devstart)
 			goto err_out;
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 22/56] mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2012-11-30 18:55 ` [ 21/56] mtd: slram: invalid checking of absolute end address Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 23/56] jffs2: Fix lock acquisition order bug in jffs2_write_begin Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Sachin Kamat, Dmitry Eremin-Solenikov,
	Artem Bityutskiy, David Woodhouse

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sachin Kamat <sachin.kamat@linaro.org>

commit 5a6ea4af0907f995dc06df21a9c9ef764c7cd3bc upstream.

The pointer returned by kzalloc should be tested for NULL
to avoid potential NULL pointer dereference later. Incorrect
pointer was being tested for NULL. Bug introduced by commit fbcf62a3
(mtd: physmap_of: move parse_obsolete_partitions to become separate
parser).
This patch fixes this bug.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Artem Bityutskiy <artem.bityutskiy@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mtd/ofpart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -121,7 +121,7 @@ static int parse_ofoldpart_partitions(st
 	nr_parts = plen / sizeof(part[0]);
 
 	*pparts = kzalloc(nr_parts * sizeof(*(*pparts)), GFP_KERNEL);
-	if (!pparts)
+	if (!*pparts)
 		return -ENOMEM;
 
 	names = of_get_property(dp, "partition-names", &plen);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 23/56] jffs2: Fix lock acquisition order bug in jffs2_write_begin
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2012-11-30 18:55 ` [ 22/56] mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions() Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 24/56] md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Thomas Betker, Joakim Tjernlund,
	Artem Bityutskiy

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Betker <thomas.betker@freenet.de>

commit 5ffd3412ae5536a4c57469cb8ea31887121dcb2e upstream.

jffs2_write_begin() first acquires the page lock, then f->sem. This
causes an AB-BA deadlock with jffs2_garbage_collect_live(), which first
acquires f->sem, then the page lock:

jffs2_garbage_collect_live
    mutex_lock(&f->sem)                         (A)
    jffs2_garbage_collect_dnode
        jffs2_gc_fetch_page
            read_cache_page_async
                do_read_cache_page
                    lock_page(page)             (B)

jffs2_write_begin
    grab_cache_page_write_begin
        find_lock_page
            lock_page(page)                     (B)
    mutex_lock(&f->sem)                         (A)

We fix this by restructuring jffs2_write_begin() to take f->sem before
the page lock. However, we make sure that f->sem is not held when
calling jffs2_reserve_space(), as this is not permitted by the locking
rules.

The deadlock above was observed multiple times on an SoC with a dual
ARMv7 (Cortex-A9), running the long-term 3.4.11 kernel; it occurred
when using scp to copy files from a host system to the ARM target
system. The fix was heavily tested on the same target system.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/jffs2/file.c |   39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)

--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -138,33 +138,39 @@ static int jffs2_write_begin(struct file
 	struct page *pg;
 	struct inode *inode = mapping->host;
 	struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
+	struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
+	struct jffs2_raw_inode ri;
+	uint32_t alloc_len = 0;
 	pgoff_t index = pos >> PAGE_CACHE_SHIFT;
 	uint32_t pageofs = index << PAGE_CACHE_SHIFT;
 	int ret = 0;
 
+	jffs2_dbg(1, "%s()\n", __func__);
+
+	if (pageofs > inode->i_size) {
+		ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len,
+					  ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
+		if (ret)
+			return ret;
+	}
+
+	mutex_lock(&f->sem);
 	pg = grab_cache_page_write_begin(mapping, index, flags);
-	if (!pg)
+	if (!pg) {
+		if (alloc_len)
+			jffs2_complete_reservation(c);
+		mutex_unlock(&f->sem);
 		return -ENOMEM;
+	}
 	*pagep = pg;
 
-	jffs2_dbg(1, "%s()\n", __func__);
-
-	if (pageofs > inode->i_size) {
+	if (alloc_len) {
 		/* Make new hole frag from old EOF to new page */
-		struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
-		struct jffs2_raw_inode ri;
 		struct jffs2_full_dnode *fn;
-		uint32_t alloc_len;
 
 		jffs2_dbg(1, "Writing new hole frag 0x%x-0x%x between current EOF and new page\n",
 			  (unsigned int)inode->i_size, pageofs);
 
-		ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len,
-					  ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
-		if (ret)
-			goto out_page;
-
-		mutex_lock(&f->sem);
 		memset(&ri, 0, sizeof(ri));
 
 		ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
@@ -191,7 +197,6 @@ static int jffs2_write_begin(struct file
 		if (IS_ERR(fn)) {
 			ret = PTR_ERR(fn);
 			jffs2_complete_reservation(c);
-			mutex_unlock(&f->sem);
 			goto out_page;
 		}
 		ret = jffs2_add_full_dnode_to_inode(c, f, fn);
@@ -206,12 +211,10 @@ static int jffs2_write_begin(struct file
 			jffs2_mark_node_obsolete(c, fn->raw);
 			jffs2_free_full_dnode(fn);
 			jffs2_complete_reservation(c);
-			mutex_unlock(&f->sem);
 			goto out_page;
 		}
 		jffs2_complete_reservation(c);
 		inode->i_size = pageofs;
-		mutex_unlock(&f->sem);
 	}
 
 	/*
@@ -220,18 +223,18 @@ static int jffs2_write_begin(struct file
 	 * case of a short-copy.
 	 */
 	if (!PageUptodate(pg)) {
-		mutex_lock(&f->sem);
 		ret = jffs2_do_readpage_nolock(inode, pg);
-		mutex_unlock(&f->sem);
 		if (ret)
 			goto out_page;
 	}
+	mutex_unlock(&f->sem);
 	jffs2_dbg(1, "end write_begin(). pg->flags %lx\n", pg->flags);
 	return ret;
 
 out_page:
 	unlock_page(pg);
 	page_cache_release(pg);
+	mutex_unlock(&f->sem);
 	return ret;
 }
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 24/56] md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2012-11-30 18:55 ` [ 23/56] jffs2: Fix lock acquisition order bug in jffs2_write_begin Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 25/56] md: Avoid write invalid address if read_seqretry returned true Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Jianpeng Ma, NeilBrown

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: majianpeng <majianpeng@gmail.com>

commit ab05613a0646dcc11049692d54bae76ca9ffa910 upstream.

This bug was introduced by commit(v3.0-rc7-126-g2230dfe).
So fix is suitable for 3.0.y thru 3.6.y.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/md.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7694,9 +7694,9 @@ int md_is_badblock(struct badblocks *bb,
 		   sector_t *first_bad, int *bad_sectors)
 {
 	int hi;
-	int lo = 0;
+	int lo;
 	u64 *p = bb->page;
-	int rv = 0;
+	int rv;
 	sector_t target = s + sectors;
 	unsigned seq;
 
@@ -7711,7 +7711,8 @@ int md_is_badblock(struct badblocks *bb,
 
 retry:
 	seq = read_seqbegin(&bb->lock);
-
+	lo = 0;
+	rv = 0;
 	hi = bb->count;
 
 	/* Binary search between lo and hi for 'target'



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 25/56] md: Avoid write invalid address if read_seqretry returned true.
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2012-11-30 18:55 ` [ 24/56] md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 26/56] md/raid10: decrement correct pending counter when writing to replacement Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Jianpeng Ma, NeilBrown

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: majianpeng <majianpeng@gmail.com>

commit 35f9ac2dcec8f79d7059ce174fd7b7ee3290d620 upstream.

If read_seqretry returned true and bbp was changed, it will write
invalid address which can cause some serious problem.

This bug was introduced by commit v3.0-rc7-130-g2699b67.
So fix is suitable for 3.0.y thru 3.6.y.

Reported-by: zhuwenfeng@kedacom.com
Tested-by: zhuwenfeng@kedacom.com
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/md.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1805,10 +1805,10 @@ retry:
 			memset(bbp, 0xff, PAGE_SIZE);
 
 			for (i = 0 ; i < bb->count ; i++) {
-				u64 internal_bb = *p++;
+				u64 internal_bb = p[i];
 				u64 store_bb = ((BB_OFFSET(internal_bb) << 10)
 						| BB_LEN(internal_bb));
-				*bbp++ = cpu_to_le64(store_bb);
+				bbp[i] = cpu_to_le64(store_bb);
 			}
 			bb->changed = 0;
 			if (read_seqretry(&bb->lock, seq))



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 26/56] md/raid10: decrement correct pending counter when writing to replacement.
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2012-11-30 18:55 ` [ 25/56] md: Avoid write invalid address if read_seqretry returned true Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 27/56] dm: fix deadlock with request based dm and queue request_fn recursion Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, George Spelvin, NeilBrown

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: NeilBrown <neilb@suse.de>

commit 884162df2aadd7414bef4935e1a54976fd4e3988 upstream.

When a write to a replacement device completes, we carefully
and correctly found the rdev that the write actually went to
and the blithely called rdev_dec_pending on the primary rdev,
even if this write was to the replacement.

This means that any writes to an array while a replacement
was ongoing would cause the nr_pending count for the primary
device to go negative, so it could never be removed.

This bug has been present since replacement was introduced in
3.3, so it is suitable for any -stable kernel since then.

Reported-by: "George Spelvin" <linux@horizon.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/raid10.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -476,7 +476,7 @@ static void raid10_end_write_request(str
 	 */
 	one_write_done(r10_bio);
 	if (dec_rdev)
-		rdev_dec_pending(conf->mirrors[dev].rdev, conf->mddev);
+		rdev_dec_pending(rdev, conf->mddev);
 }
 
 /*



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 27/56] dm: fix deadlock with request based dm and queue request_fn recursion
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2012-11-30 18:55 ` [ 26/56] md/raid10: decrement correct pending counter when writing to replacement Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 28/56] futex: avoid wake_futex() for a PI futex_q Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Alasdair G Kergon, Jens Axboe

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jens Axboe <axboe@kernel.dk>

commit a8c32a5c98943d370ea606a2e7dc04717eb92206 upstream.

Request based dm attempts to re-run the request queue off the
request completion path. If used with a driver that potentially does
end_io from its request_fn, we could deadlock trying to recurse
back into request dispatch. Fix this by punting the request queue
run to kblockd.

Tested to fix a quickly reproducible deadlock in such a scenario.

Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/dm.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -754,8 +754,14 @@ static void rq_completed(struct mapped_d
 	if (!md_in_flight(md))
 		wake_up(&md->wait);
 
+	/*
+	 * Run this off this callpath, as drivers could invoke end_io while
+	 * inside their request_fn (and holding the queue lock). Calling
+	 * back into ->request_fn() could deadlock attempting to grab the
+	 * queue lock again.
+	 */
 	if (run_queue)
-		blk_run_queue(md->queue);
+		blk_run_queue_async(md->queue);
 
 	/*
 	 * dm_put() must be at the end of this function. See the comment above



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 28/56] futex: avoid wake_futex() for a PI futex_q
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2012-11-30 18:55 ` [ 27/56] dm: fix deadlock with request based dm and queue request_fn recursion Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 29/56] mac80211: deinitialize ibss-internals after emptiness check Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Darren Hart, Dave Jones,
	Thomas Gleixner, Peter Zijlstra, Ingo Molnar, John Kacur,
	Andrew Morton, Linus Torvalds

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Darren Hart <dvhart@linux.intel.com>

commit aa10990e028cac3d5e255711fb9fb47e00700e35 upstream.

Dave Jones reported a bug with futex_lock_pi() that his trinity test
exposed.  Sometime between queue_me() and taking the q.lock_ptr, the
lock_ptr became NULL, resulting in a crash.

While futex_wake() is careful to not call wake_futex() on futex_q's with
a pi_state or an rt_waiter (which are either waiting for a
futex_unlock_pi() or a PI futex_requeue()), futex_wake_op() and
futex_requeue() do not perform the same test.

Update futex_wake_op() and futex_requeue() to test for q.pi_state and
q.rt_waiter and abort with -EINVAL if detected.  To ensure any future
breakage is caught, add a WARN() to wake_futex() if the same condition
is true.

This fix has seen 3 hours of testing with "trinity -c futex" on an
x86_64 VM with 4 CPUS.

[akpm@linux-foundation.org: tidy up the WARN()]
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Dave Jones <davej@redat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: John Kacur <jkacur@redhat.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>

---
 kernel/futex.c |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -843,6 +843,9 @@ static void wake_futex(struct futex_q *q
 {
 	struct task_struct *p = q->task;
 
+	if (WARN(q->pi_state || q->rt_waiter, "refusing to wake PI futex\n"))
+		return;
+
 	/*
 	 * We set q->lock_ptr = NULL _before_ we wake up the task. If
 	 * a non-futex wake up happens on another CPU then the task
@@ -1078,6 +1081,10 @@ retry_private:
 
 	plist_for_each_entry_safe(this, next, head, list) {
 		if (match_futex (&this->key, &key1)) {
+			if (this->pi_state || this->rt_waiter) {
+				ret = -EINVAL;
+				goto out_unlock;
+			}
 			wake_futex(this);
 			if (++ret >= nr_wake)
 				break;
@@ -1090,6 +1097,10 @@ retry_private:
 		op_ret = 0;
 		plist_for_each_entry_safe(this, next, head, list) {
 			if (match_futex (&this->key, &key2)) {
+				if (this->pi_state || this->rt_waiter) {
+					ret = -EINVAL;
+					goto out_unlock;
+				}
 				wake_futex(this);
 				if (++op_ret >= nr_wake2)
 					break;
@@ -1098,6 +1109,7 @@ retry_private:
 		ret += op_ret;
 	}
 
+out_unlock:
 	double_unlock_hb(hb1, hb2);
 out_put_keys:
 	put_futex_key(&key2);
@@ -1387,9 +1399,13 @@ retry_private:
 		/*
 		 * FUTEX_WAIT_REQEUE_PI and FUTEX_CMP_REQUEUE_PI should always
 		 * be paired with each other and no other futex ops.
+		 *
+		 * We should never be requeueing a futex_q with a pi_state,
+		 * which is awaiting a futex_unlock_pi().
 		 */
 		if ((requeue_pi && !this->rt_waiter) ||
-		    (!requeue_pi && this->rt_waiter)) {
+		    (!requeue_pi && this->rt_waiter) ||
+		    this->pi_state) {
 			ret = -EINVAL;
 			break;
 		}



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 29/56] mac80211: deinitialize ibss-internals after emptiness check
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2012-11-30 18:55 ` [ 28/56] futex: avoid wake_futex() for a PI futex_q Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 30/56] radeon: add AGPMode 1 quirk for RV250 Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Simon Wunderlich, Ignacy Gawedzki,
	Johannes Berg

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>

commit b78a4932f5fb11fadf41e69c606a33fa6787574c upstream.

The check whether the IBSS is active and can be removed should be
performed before deinitializing the fields used for the check/search.
Otherwise, the configured BSS will not be found and removed properly.

To make it more clear for the future, rename sdata->u.ibss to the
local pointer ifibss which is used within the checks.

This behaviour was introduced by
f3209bea110cade12e2b133da8b8499689cb0e2e
("mac80211: fix IBSS teardown race")

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Cc: Ignacy Gawedzki <i@lri.fr>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/ibss.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1153,10 +1153,6 @@ int ieee80211_ibss_leave(struct ieee8021
 
 	mutex_lock(&sdata->u.ibss.mtx);
 
-	sdata->u.ibss.state = IEEE80211_IBSS_MLME_SEARCH;
-	memset(sdata->u.ibss.bssid, 0, ETH_ALEN);
-	sdata->u.ibss.ssid_len = 0;
-
 	active_ibss = ieee80211_sta_active_ibss(sdata);
 
 	if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
@@ -1177,6 +1173,10 @@ int ieee80211_ibss_leave(struct ieee8021
 		}
 	}
 
+	ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
+	memset(ifibss->bssid, 0, ETH_ALEN);
+	ifibss->ssid_len = 0;
+
 	sta_info_flush(sdata->local, sdata);
 
 	spin_lock_bh(&ifibss->incomplete_lock);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 30/56] radeon: add AGPMode 1 quirk for RV250
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2012-11-30 18:55 ` [ 29/56] mac80211: deinitialize ibss-internals after emptiness check Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 31/56] can: peak_usb: fix hwtstamp assignment Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Paul Bolle, Alex Deucher

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Paul Bolle <pebolle@tiscali.nl>

commit 45171002b01b2e2ec4f991eca81ffd8430fd0aec upstream.

The Intel 82855PM host bridge / Mobility FireGL 9000 RV250 combination
in an (outdated) ThinkPad T41 needs AGPMode 1 for suspend/resume (under
KMS, that is). So add a quirk for it.

(Change R250 to RV250 in comment for preceding quirk too.)

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/radeon/radeon_agp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/radeon/radeon_agp.c
+++ b/drivers/gpu/drm/radeon/radeon_agp.c
@@ -70,9 +70,12 @@ static struct radeon_agpmode_quirk radeo
 	/* Intel 82830 830 Chipset Host Bridge / Mobility M6 LY Needs AGPMode 2 (fdo #17360)*/
 	{ PCI_VENDOR_ID_INTEL, 0x3575, PCI_VENDOR_ID_ATI, 0x4c59,
 		PCI_VENDOR_ID_DELL, 0x00e3, 2},
-	/* Intel 82852/82855 host bridge / Mobility FireGL 9000 R250 Needs AGPMode 1 (lp #296617) */
+	/* Intel 82852/82855 host bridge / Mobility FireGL 9000 RV250 Needs AGPMode 1 (lp #296617) */
 	{ PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4c66,
 		PCI_VENDOR_ID_DELL, 0x0149, 1},
+	/* Intel 82855PM host bridge / Mobility FireGL 9000 RV250 Needs AGPMode 1 for suspend/resume */
+	{ PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x4c66,
+		PCI_VENDOR_ID_IBM, 0x0531, 1},
 	/* Intel 82852/82855 host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (deb #467460) */
 	{ PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4e50,
 		0x1025, 0x0061, 1},



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 31/56] can: peak_usb: fix hwtstamp assignment
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2012-11-30 18:55 ` [ 30/56] radeon: add AGPMode 1 quirk for RV250 Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 32/56] can: bcm: initialize ifindex for timeouts without previous frame reception Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Oliver Hartkopp, Marc Kleine-Budde

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oliver Hartkopp <socketcan@hartkopp.net>

commit c9faaa09e2a1335678f09c70a0d0eda095564bab upstream.

The skb->tstamp is set to the hardware timestamp when available in the USB
urb message. This leads to user visible timestamps which contain the 'uptime'
of the USB adapter - and not the usual system generated timestamp.

Fix this wrong assignment by applying the available hardware timestamp to the
skb_shared_hwtstamps data structure - which is intended for this purpose.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/can/usb/peak_usb/pcan_usb.c     |    8 ++++++--
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c |    8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -519,8 +519,10 @@ static int pcan_usb_decode_error(struct
 	mc->pdev->dev.can.state = new_state;
 
 	if (status_len & PCAN_USB_STATUSLEN_TIMESTAMP) {
+		struct skb_shared_hwtstamps *hwts = skb_hwtstamps(skb);
+
 		peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv);
-		skb->tstamp = timeval_to_ktime(tv);
+		hwts->hwtstamp = timeval_to_ktime(tv);
 	}
 
 	netif_rx(skb);
@@ -605,6 +607,7 @@ static int pcan_usb_decode_data(struct p
 	struct sk_buff *skb;
 	struct can_frame *cf;
 	struct timeval tv;
+	struct skb_shared_hwtstamps *hwts;
 
 	skb = alloc_can_skb(mc->netdev, &cf);
 	if (!skb)
@@ -652,7 +655,8 @@ static int pcan_usb_decode_data(struct p
 
 	/* convert timestamp into kernel time */
 	peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv);
-	skb->tstamp = timeval_to_ktime(tv);
+	hwts = skb_hwtstamps(skb);
+	hwts->hwtstamp = timeval_to_ktime(tv);
 
 	/* push the skb */
 	netif_rx(skb);
--- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
@@ -532,6 +532,7 @@ static int pcan_usb_pro_handle_canmsg(st
 	struct can_frame *can_frame;
 	struct sk_buff *skb;
 	struct timeval tv;
+	struct skb_shared_hwtstamps *hwts;
 
 	skb = alloc_can_skb(netdev, &can_frame);
 	if (!skb)
@@ -549,7 +550,8 @@ static int pcan_usb_pro_handle_canmsg(st
 		memcpy(can_frame->data, rx->data, can_frame->can_dlc);
 
 	peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(rx->ts32), &tv);
-	skb->tstamp = timeval_to_ktime(tv);
+	hwts = skb_hwtstamps(skb);
+	hwts->hwtstamp = timeval_to_ktime(tv);
 
 	netif_rx(skb);
 	netdev->stats.rx_packets++;
@@ -570,6 +572,7 @@ static int pcan_usb_pro_handle_error(str
 	u8 err_mask = 0;
 	struct sk_buff *skb;
 	struct timeval tv;
+	struct skb_shared_hwtstamps *hwts;
 
 	/* nothing should be sent while in BUS_OFF state */
 	if (dev->can.state == CAN_STATE_BUS_OFF)
@@ -664,7 +667,8 @@ static int pcan_usb_pro_handle_error(str
 	dev->can.state = new_state;
 
 	peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(er->ts32), &tv);
-	skb->tstamp = timeval_to_ktime(tv);
+	hwts = skb_hwtstamps(skb);
+	hwts->hwtstamp = timeval_to_ktime(tv);
 	netif_rx(skb);
 	netdev->stats.rx_packets++;
 	netdev->stats.rx_bytes += can_frame->can_dlc;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 32/56] can: bcm: initialize ifindex for timeouts without previous frame reception
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2012-11-30 18:55 ` [ 31/56] can: peak_usb: fix hwtstamp assignment Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 33/56] jbd: Fix lock ordering bug in journal_unmap_buffer() Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Andre Naujoks, Oliver Hartkopp,
	Marc Kleine-Budde

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oliver Hartkopp <socketcan@hartkopp.net>

commit 81b401100c01d2357031e874689f89bd788d13cd upstream.

Set in the rx_ifindex to pass the correct interface index in the case of a
message timeout detection. Usually the rx_ifindex value is set at receive
time. But when no CAN frame has been received the RX_TIMEOUT notification
did not contain a valid value.

Reported-by: Andre Naujoks <nautsch2@googlemail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/can/bcm.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -1084,6 +1084,9 @@ static int bcm_rx_setup(struct bcm_msg_h
 		op->sk = sk;
 		op->ifindex = ifindex;
 
+		/* ifindex for timeout events w/o previous frame reception */
+		op->rx_ifindex = ifindex;
+
 		/* initialize uninitialized (kzalloc) structure */
 		hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
 		op->timer.function = bcm_rx_timeout_handler;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 33/56] jbd: Fix lock ordering bug in journal_unmap_buffer()
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2012-11-30 18:55 ` [ 32/56] can: bcm: initialize ifindex for timeouts without previous frame reception Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 34/56] sparc64: not any error from do_sigaltstack() should fail rt_sigreturn() Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Jan Kara

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jan Kara <jack@suse.cz>

commit 25389bb207987b5774182f763b9fb65ff08761c8 upstream.

Commit 09e05d48 introduced a wait for transaction commit into
journal_unmap_buffer() in the case we are truncating a buffer undergoing commit
in the page stradding i_size on a filesystem with blocksize < pagesize. Sadly
we forgot to drop buffer lock before waiting for transaction commit and thus
deadlock is possible when kjournald wants to lock the buffer.

Fix the problem by dropping the buffer lock before waiting for transaction
commit. Since we are still holding page lock (and that is OK), buffer cannot
disappear under us.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/jbd/transaction.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1963,7 +1963,9 @@ retry:
 			spin_unlock(&journal->j_list_lock);
 			jbd_unlock_bh_state(bh);
 			spin_unlock(&journal->j_state_lock);
+			unlock_buffer(bh);
 			log_wait_commit(journal, tid);
+			lock_buffer(bh);
 			goto retry;
 		}
 		/*



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 34/56] sparc64: not any error from do_sigaltstack() should fail rt_sigreturn()
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2012-11-30 18:55 ` [ 33/56] jbd: Fix lock ordering bug in journal_unmap_buffer() Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 35/56] PM / QoS: fix wrong error-checking condition Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Al Viro, David S. Miller

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit fae2ae2a900a5c7bb385fe4075f343e7e2d5daa2 upstream.

If a signal handler is executed on altstack and another signal comes,
we will end up with rt_sigreturn() on return from the second handler
getting -EPERM from do_sigaltstack().  It's perfectly OK, since we
are not asking to change the settings; in fact, they couldn't have been
changed during the second handler execution exactly because we'd been
on altstack all along.  64bit sigreturn on sparc treats any error from
do_sigaltstack() as "SIGSEGV now"; we need to switch to the same semantics
we are using on other architectures.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/sparc/kernel/signal_64.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/arch/sparc/kernel/signal_64.c
+++ b/arch/sparc/kernel/signal_64.c
@@ -309,9 +309,7 @@ void do_rt_sigreturn(struct pt_regs *reg
 		err |= restore_fpu_state(regs, fpu_save);
 
 	err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t));
-	err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf);
-
-	if (err)
+	if (err || do_sigaltstack(&sf->stack, NULL, (unsigned long)sf) == -EFAULT)
 		goto segv;
 
 	err |= __get_user(rwin_save, &sf->rwin_save);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 35/56] PM / QoS: fix wrong error-checking condition
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2012-11-30 18:55 ` [ 34/56] sparc64: not any error from do_sigaltstack() should fail rt_sigreturn() Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 36/56] ALSA: hda - Add new codec ALC283 ALC290 support Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Guennadi Liakhovetski, Rafael J. Wysocki

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

commit a7227a0faa117d0bc532aea546ae5ac5f89e8ed7 upstream.

dev_pm_qos_add_request() can return 0, 1, or a negative error code,
therefore the correct error test is "if (error < 0)." Checking just for
non-zero return code leads to erroneous setting of the req->dev pointer
to NULL, which then leads to a repeated call to
dev_pm_qos_add_ancestor_request() in st1232_ts_irq_handler(). This in turn
leads to an Oops, when the I2C host adapter is unloaded and reloaded again
because of the inconsistent state of its QoS request list.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/base/power/qos.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -446,7 +446,7 @@ int dev_pm_qos_add_ancestor_request(stru
 	if (ancestor)
 		error = dev_pm_qos_add_request(ancestor, req, value);
 
-	if (error)
+	if (error < 0)
 		req->dev = NULL;
 
 	return error;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 36/56] ALSA: hda - Add new codec ALC283 ALC290 support
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2012-11-30 18:55 ` [ 35/56] PM / QoS: fix wrong error-checking condition Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 37/56] ALSA: hda - Fix missing beep on ASUS X43U notebook Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Kailang Yang, Takashi Iwai

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kailang Yang <kailang@realtek.com>

commit 7ff34ad80b7080fafaac8efa9ef0061708eddd51 upstream.

These are compatible with standard ALC269 parser.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7035,6 +7035,8 @@ static const struct hda_codec_preset snd
 	{ .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 },
 	{ .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 },
 	{ .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 },
+	{ .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 },
+	{ .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 },
 	{ .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
 	  .patch = patch_alc861 },
 	{ .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 37/56] ALSA: hda - Fix missing beep on ASUS X43U notebook
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2012-11-30 18:55 ` [ 36/56] ALSA: hda - Add new codec ALC283 ALC290 support Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 38/56] ALSA: hda - Add support for Realtek ALC292 Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Duncan Roe, Takashi Iwai

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Duncan Roe <duncan_roe@acslink.net.au>

commit 7110005e8d5c3cd418fc4b64f9f124f004422a9a upstream.

Signed-off-by: Duncan Roe <duncan_roe@acslink.net.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4322,6 +4322,7 @@ static void alc_auto_init_std(struct hda
 	((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir))
 
 static const struct snd_pci_quirk beep_white_list[] = {
+	SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
 	SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
 	SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
 	SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 38/56] ALSA: hda - Add support for Realtek ALC292
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2012-11-30 18:55 ` [ 37/56] ALSA: hda - Fix missing beep on ASUS X43U notebook Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 39/56] bas_gigaset: fix pre_reset handling Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Acelan Kao, David Henningsson, Takashi Iwai

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David Henningsson <david.henningsson@canonical.com>

commit af02dde8a609d8d071c4b31a82df811a55690a4a upstream.

We found a new codec ID 292, and that just a simple quirk would enable
sound output/input on this ALC292 chip.

BugLink: https://bugs.launchpad.net/bugs/1081466
Tested-by: Acelan Kao <acelan.kao@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7038,6 +7038,7 @@ static const struct hda_codec_preset snd
 	{ .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 },
 	{ .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 },
 	{ .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 },
+	{ .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 },
 	{ .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
 	  .patch = patch_alc861 },
 	{ .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 39/56] bas_gigaset: fix pre_reset handling
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2012-11-30 18:55 ` [ 38/56] ALSA: hda - Add support for Realtek ALC292 Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 40/56] scsi: Silence unnecessary warnings about ioctl to partition Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Tilman Schmidt, David S. Miller

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tilman Schmidt <tilman@imap.cc>

commit c6fdd8e5d0c65bb8821dc6da26ee1a2ddd58b3cc upstream.

The delayed work function int_in_work() may call usb_reset_device()
and thus, indirectly, the driver's pre_reset method. Trying to
cancel the work synchronously in that situation would deadlock.
Fix by avoiding cancel_work_sync() in the pre_reset method.

If the reset was NOT initiated by int_in_work() this might cause
int_in_work() to run after the post_reset method, with urb_int_in
already resubmitted, so handle that case gracefully.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/isdn/gigaset/bas-gigaset.c |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -616,7 +616,13 @@ static void int_in_work(struct work_stru
 	if (rc == 0)
 		/* success, resubmit interrupt read URB */
 		rc = usb_submit_urb(urb, GFP_ATOMIC);
-	if (rc != 0 && rc != -ENODEV) {
+
+	switch (rc) {
+	case 0:		/* success */
+	case -ENODEV:	/* device gone */
+	case -EINVAL:	/* URB already resubmitted, or terminal badness */
+		break;
+	default:	/* failure: try to recover by resetting the device */
 		dev_err(cs->dev, "clear halt failed: %s\n", get_usb_rcmsg(rc));
 		rc = usb_lock_device_for_reset(ucs->udev, ucs->interface);
 		if (rc == 0) {
@@ -2437,7 +2443,9 @@ static void gigaset_disconnect(struct us
 }
 
 /* gigaset_suspend
- * This function is called before the USB connection is suspended.
+ * This function is called before the USB connection is suspended
+ * or before the USB device is reset.
+ * In the latter case, message == PMSG_ON.
  */
 static int gigaset_suspend(struct usb_interface *intf, pm_message_t message)
 {
@@ -2493,7 +2501,12 @@ static int gigaset_suspend(struct usb_in
 	del_timer_sync(&ucs->timer_atrdy);
 	del_timer_sync(&ucs->timer_cmd_in);
 	del_timer_sync(&ucs->timer_int_in);
-	cancel_work_sync(&ucs->int_in_wq);
+
+	/* don't try to cancel int_in_wq from within reset as it
+	 * might be the one requesting the reset
+	 */
+	if (message.event != PM_EVENT_ON)
+		cancel_work_sync(&ucs->int_in_wq);
 
 	gig_dbg(DEBUG_SUSPEND, "suspend complete");
 	return 0;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 40/56] scsi: Silence unnecessary warnings about ioctl to partition
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2012-11-30 18:55 ` [ 39/56] bas_gigaset: fix pre_reset handling Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 41/56] KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Paolo Bonzini, James Bottomley,
	Jan Kara, Jens Axboe, satoru takeuchi

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jan Kara <jack@suse.cz>

commit 6d9359280753d2955f86d6411047516a9431eb51 upstream.

Sometimes, warnings about ioctls to partition happen often enough that they
form majority of the warnings in the kernel log and users complain. In some
cases warnings are about ioctls such as SG_IO so it's not good to get rid of
the warnings completely as they can ease debugging of userspace problems
when ioctl is refused.

Since I have seen warnings from lots of commands, including some proprietary
userspace applications, I don't think disallowing the ioctls for processes
with CAP_SYS_RAWIO will happen in the near future if ever. So lets just
stop warning for processes with CAP_SYS_RAWIO for which ioctl is allowed.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: James Bottomley <JBottomley@parallels.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Cc: satoru takeuchi <satoru.takeuchi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 block/scsi_ioctl.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -721,11 +721,14 @@ int scsi_verify_blk_ioctl(struct block_d
 		break;
 	}
 
+	if (capable(CAP_SYS_RAWIO))
+		return 0;
+
 	/* In particular, rule out all resets and host-specific ioctls.  */
 	printk_ratelimited(KERN_WARNING
 			   "%s: sending ioctl %x to a partition!\n", current->comm, cmd);
 
-	return capable(CAP_SYS_RAWIO) ? 0 : -ENOIOCTLCMD;
+	return -ENOIOCTLCMD;
 }
 EXPORT_SYMBOL(scsi_verify_blk_ioctl);
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 41/56] KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2012-11-30 18:55 ` [ 40/56] scsi: Silence unnecessary warnings about ioctl to partition Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 42/56] ixgbe: add support for X540-AT1 Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Petr Matousek, Marcelo Tosatti

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Petr Matousek <pmatouse@redhat.com>

commit 6d1068b3a98519247d8ba4ec85cd40ac136dbdf9 upstream.

On hosts without the XSAVE support unprivileged local user can trigger
oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest
cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN
ioctl.

invalid opcode: 0000 [#2] SMP
Modules linked in: tun ip6table_filter ip6_tables ebtable_nat ebtables
...
Pid: 24935, comm: zoog_kvm_monito Tainted: G      D      3.2.0-3-686-pae
EIP: 0060:[<f8b9550c>] EFLAGS: 00210246 CPU: 0
EIP is at kvm_arch_vcpu_ioctl_run+0x92a/0xd13 [kvm]
EAX: 00000001 EBX: 000f387e ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: ef5a0060 ESP: d7c63e70
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process zoog_kvm_monito (pid: 24935, ti=d7c62000 task=ed84a0c0
task.ti=d7c62000)
Stack:
 00000001 f70a1200 f8b940a9 ef5a0060 00000000 00200202 f8769009 00000000
 ef5a0060 000f387e eda5c020 8722f9c8 00015bae 00000000 ed84a0c0 ed84a0c0
 c12bf02d 0000ae80 ef7f8740 fffffffb f359b740 ef5a0060 f8b85dc1 0000ae80
Call Trace:
 [<f8b940a9>] ? kvm_arch_vcpu_ioctl_set_sregs+0x2fe/0x308 [kvm]
...
 [<c12bfb44>] ? syscall_call+0x7/0xb
Code: 89 e8 e8 14 ee ff ff ba 00 00 04 00 89 e8 e8 98 48 ff ff 85 c0 74
1e 83 7d 48 00 75 18 8b 85 08 07 00 00 31 c9 8b 95 0c 07 00 00 <0f> 01
d1 c7 45 48 01 00 00 00 c7 45 1c 01 00 00 00 0f ae f0 89
EIP: [<f8b9550c>] kvm_arch_vcpu_ioctl_run+0x92a/0xd13 [kvm] SS:ESP
0068:d7c63e70

QEMU first retrieves the supported features via KVM_GET_SUPPORTED_CPUID
and then sets them later. So guest's X86_FEATURE_XSAVE should be masked
out on hosts without X86_FEATURE_XSAVE, making kvm_set_cr4 with
X86_CR4_OSXSAVE fail. Userspaces that allow specifying guest cpuid with
X86_FEATURE_XSAVE even on hosts that do not support it, might be
susceptible to this attack from inside the guest as well.

Allow setting X86_CR4_OSXSAVE bit only if host has XSAVE support.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kvm/cpuid.h |    3 +++
 arch/x86/kvm/x86.c   |    3 +++
 2 files changed, 6 insertions(+)

--- a/arch/x86/kvm/cpuid.h
+++ b/arch/x86/kvm/cpuid.h
@@ -23,6 +23,9 @@ static inline bool guest_cpuid_has_xsave
 {
 	struct kvm_cpuid_entry2 *best;
 
+	if (!static_cpu_has(X86_FEATURE_XSAVE))
+		return 0;
+
 	best = kvm_find_cpuid_entry(vcpu, 1, 0);
 	return best && (best->ecx & bit(X86_FEATURE_XSAVE));
 }
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5697,6 +5697,9 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct
 	int pending_vec, max_bits, idx;
 	struct desc_ptr dt;
 
+	if (!guest_cpuid_has_xsave(vcpu) && (sregs->cr4 & X86_CR4_OSXSAVE))
+		return -EINVAL;
+
 	dt.size = sregs->idt.limit;
 	dt.address = sregs->idt.base;
 	kvm_x86_ops->set_idt(vcpu, &dt);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 42/56] ixgbe: add support for X540-AT1
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2012-11-30 18:55 ` [ 41/56] KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 43/56] sata_svw: check DMA start bit before reset Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Josh Hay, Phil Schmitt, Jeff Kirsher,
	Abdallah Chatila

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "joshua.a.hay@intel.com" <joshua.a.hay@intel.com>

commit df376f0de167754da9b3ece4afdb5bb8bf3fbf3e upstream.

This patch adds device support for Ethernet Controller X540-AT1.

Signed-off-by: Josh Hay <joshua.a.hay@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Abdallah Chatila <Abdallah.Chatila@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  |    1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |    1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |    2 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |    1 +
 4 files changed, 5 insertions(+)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -3216,6 +3216,7 @@ static s32 ixgbe_device_supports_autoneg
 
 	switch (hw->device_id) {
 	case IXGBE_DEV_ID_X540T:
+	case IXGBE_DEV_ID_X540T1:
 		return 0;
 	case IXGBE_DEV_ID_82599_T3_LOM:
 		return 0;
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -2006,6 +2006,7 @@ static int ixgbe_wol_exclusion(struct ix
 		retval = 0;
 		break;
 	case IXGBE_DEV_ID_X540T:
+	case IXGBE_DEV_ID_X540T1:
 		/* check eeprom to see if enabled wol */
 		if ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0_1) ||
 		    ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0) &&
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -114,6 +114,7 @@ static DEFINE_PCI_DEVICE_TABLE(ixgbe_pci
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_LS), board_82599 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599EN_SFP), board_82599 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP), board_82599 },
+	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T1), board_X540 },
 	/* required last entry */
 	{0, }
 };
@@ -7060,6 +7061,7 @@ static int __devinit ixgbe_probe(struct
 		adapter->wol = IXGBE_WUFC_MAG;
 		break;
 	case IXGBE_DEV_ID_X540T:
+	case IXGBE_DEV_ID_X540T1:
 		/* Check eeprom to see if it is enabled */
 		hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap);
 		wol_cap = adapter->eeprom_cap & IXGBE_DEVICE_CAPS_WOL_MASK;
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -67,6 +67,7 @@
 #define IXGBE_DEV_ID_82599_LS            0x154F
 #define IXGBE_DEV_ID_X540T               0x1528
 #define IXGBE_DEV_ID_82599_SFP_SF_QP     0x154A
+#define IXGBE_DEV_ID_X540T1              0x1560
 
 /* VF Device IDs */
 #define IXGBE_DEV_ID_82599_VF           0x10ED



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 43/56] sata_svw: check DMA start bit before reset
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2012-11-30 18:55 ` [ 42/56] ixgbe: add support for X540-AT1 Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 44/56] get_dvb_firmware: fix download site for tda10046 firmware Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, David Milburn, Jeff Garzik, CAI Qian

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David Milburn <dmilburn@redhat.com>

commit b03e66a6be91f8389fcd902ab6c1563db1c9c06b upstream.

If kdump is triggered with pending IO, controller may not respond causing
kdump to fail.

http://marc.info/?l=linux-ide&m=133032255424658&w=2

During error recovery ata_do_dev_read_id never completes due hang
in mmio_insw.

ata_do_dev_read_id
 ata_sff_data_xfer
  ioread16_rep
   mmio_insw

if DMA start bit is cleared before reset, PIO command is successful
and kdump succeeds.

Signed-off-by: David Milburn <dmilburn@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Cc: CAI Qian <caiqian@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/sata_svw.c |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -142,6 +142,39 @@ static int k2_sata_scr_write(struct ata_
 	return 0;
 }
 
+static int k2_sata_softreset(struct ata_link *link,
+			     unsigned int *class, unsigned long deadline)
+{
+	u8 dmactl;
+	void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
+
+	dmactl = readb(mmio + ATA_DMA_CMD);
+
+	/* Clear the start bit */
+	if (dmactl & ATA_DMA_START) {
+		dmactl &= ~ATA_DMA_START;
+		writeb(dmactl, mmio + ATA_DMA_CMD);
+	}
+
+	return ata_sff_softreset(link, class, deadline);
+}
+
+static int k2_sata_hardreset(struct ata_link *link,
+			     unsigned int *class, unsigned long deadline)
+{
+	u8 dmactl;
+	void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
+
+	dmactl = readb(mmio + ATA_DMA_CMD);
+
+	/* Clear the start bit */
+	if (dmactl & ATA_DMA_START) {
+		dmactl &= ~ATA_DMA_START;
+		writeb(dmactl, mmio + ATA_DMA_CMD);
+	}
+
+	return sata_sff_hardreset(link, class, deadline);
+}
 
 static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
 {
@@ -346,6 +379,8 @@ static struct scsi_host_template k2_sata
 
 static struct ata_port_operations k2_sata_ops = {
 	.inherits		= &ata_bmdma_port_ops,
+	.softreset              = k2_sata_softreset,
+	.hardreset              = k2_sata_hardreset,
 	.sff_tf_load		= k2_sata_tf_load,
 	.sff_tf_read		= k2_sata_tf_read,
 	.sff_check_status	= k2_stat_check_status,



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 44/56] get_dvb_firmware: fix download site for tda10046 firmware
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2012-11-30 18:55 ` [ 43/56] sata_svw: check DMA start bit before reset Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 45/56] NFC: pn533: Fix use after free Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Mauro Carvalho Chehab, Peter Huewe

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mauro Carvalho Chehab <mchehab@redhat.com>

commit 25ec43d3e6306978cf66060ed18c4160ce8fc302 upstream.

The previous website doesn't exist anymore. Update it to one site that
actually exists.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 Documentation/dvb/get_dvb_firmware |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -115,7 +115,7 @@ sub tda10045 {
 
 sub tda10046 {
 	my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip";
-	my $url = "http://www.tt-download.com/download/updates/219/$sourcefile";
+	my $url = "http://technotrend.com.ua/download/software/219/$sourcefile";
 	my $hash = "6a7e1e2f2644b162ff0502367553c72d";
 	my $outfile = "dvb-fe-tda10046.fw";
 	my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 45/56] NFC: pn533: Fix use after free
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2012-11-30 18:55 ` [ 44/56] get_dvb_firmware: fix download site for tda10046 firmware Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 46/56] NFC: pn533: Fix mem leak in pn533_in_dep_link_up Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Szymon Janc, Samuel Ortiz, Peter Huewe

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Szymon Janc <szymon.janc@tieto.com>

commit 770f750bc2b8312489c8e45306f551d08a319d3c upstream.

cmd was freed in pn533_dep_link_up regardless of
pn533_send_cmd_frame_async return code. Cmd is passed as argument to
pn533_in_dep_link_up_complete callback and should be freed there.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/nfc/pn533.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -1385,12 +1385,8 @@ static int pn533_dep_link_up(struct nfc_
 	rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame,
 				dev->in_maxlen,	pn533_in_dep_link_up_complete,
 				cmd, GFP_KERNEL);
-	if (rc)
-		goto out;
-
-
-out:
-	kfree(cmd);
+	if (rc < 0)
+		kfree(cmd);
 
 	return rc;
 }



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 46/56] NFC: pn533: Fix mem leak in pn533_in_dep_link_up
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2012-11-30 18:55 ` [ 45/56] NFC: pn533: Fix use after free Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 47/56] NFC: Fix nfc_llcp_local chained list insertion Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Waldemar Rymarkiewicz, Samuel Ortiz,
	Peter Huewe

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>

commit 70418e6efcf4f8652cc08e3f2ab8ae35f0948fd9 upstream.

cmd is allocated in pn533_dep_link_up and passed as an arg to
pn533_send_cmd_frame_async together with a complete cb.

arg is passed to the cb and must be kfreed there.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/nfc/pn533.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -1278,11 +1278,14 @@ static void pn533_deactivate_target(stru
 static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
 						u8 *params, int params_len)
 {
-	struct pn533_cmd_jump_dep *cmd;
 	struct pn533_cmd_jump_dep_response *resp;
 	struct nfc_target nfc_target;
 	u8 target_gt_len;
 	int rc;
+	struct pn533_cmd_jump_dep *cmd = (struct pn533_cmd_jump_dep *)arg;
+	u8 active = cmd->active;
+
+	kfree(arg);
 
 	if (params_len == -ENOENT) {
 		nfc_dev_dbg(&dev->interface->dev, "");
@@ -1304,7 +1307,6 @@ static int pn533_in_dep_link_up_complete
 	}
 
 	resp = (struct pn533_cmd_jump_dep_response *) params;
-	cmd = (struct pn533_cmd_jump_dep *) arg;
 	rc = resp->status & PN533_CMD_RET_MASK;
 	if (rc != PN533_CMD_RET_SUCCESS) {
 		nfc_dev_err(&dev->interface->dev,
@@ -1334,7 +1336,7 @@ static int pn533_in_dep_link_up_complete
 	if (rc == 0)
 		rc = nfc_dep_link_is_up(dev->nfc_dev,
 						dev->nfc_dev->targets[0].idx,
-						!cmd->active, NFC_RF_INITIATOR);
+						!active, NFC_RF_INITIATOR);
 
 	return 0;
 }



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 47/56] NFC: Fix nfc_llcp_local chained list insertion
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2012-11-30 18:55 ` [ 46/56] NFC: pn533: Fix mem leak in pn533_in_dep_link_up Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 48/56] USB: mct_u232: fix broken close Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Thierry Escande, Samuel Ortiz, Peter Huewe

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thierry Escande <thierry.escande@linux.intel.com>

commit 16a78e9fed5e8baa8480ae3413f4328c4537c599 upstream.

list_add was called with swapped parameters

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/nfc/llcp/llcp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -966,7 +966,7 @@ int nfc_llcp_register_device(struct nfc_
 	local->remote_lto = LLCP_DEFAULT_LTO;
 	local->remote_rw = LLCP_DEFAULT_RW;
 
-	list_add(&llcp_devices, &local->list);
+	list_add(&local->list, &llcp_devices);
 
 	return 0;
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 48/56] USB: mct_u232: fix broken close
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2012-11-30 18:55 ` [ 47/56] NFC: Fix nfc_llcp_local chained list insertion Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 49/56] watchdog: using u64 in get_sample_period() Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Johan Hovold, Ben Hutchings

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hovold <jhovold@gmail.com>

commit 5260e458f5eff269a43e4f1e9c47186c57b88ddb upstream.

Make sure generic close is called at close.

The driver relies on the generic write implementation but did not call
generic close.

Note that the call to kill the read urb is not redundant, as mct_u232
uses an interrupt urb from the second port as the read urb and that
generic close therefore fails to kill it.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/usb/serial/mct_u232.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -533,12 +533,14 @@ static void mct_u232_close(struct usb_se
 {
 	dbg("%s port %d", __func__, port->number);
 
-	if (port->serial->dev) {
-		/* shutdown our urbs */
-		usb_kill_urb(port->write_urb);
-		usb_kill_urb(port->read_urb);
-		usb_kill_urb(port->interrupt_in_urb);
-	}
+	/*
+	 * Must kill the read urb as it is actually an interrupt urb, which
+	 * generic close thus fails to kill.
+	 */
+	usb_kill_urb(port->read_urb);
+	usb_kill_urb(port->interrupt_in_urb);
+
+	usb_serial_generic_close(port);
 } /* mct_u232_close */
 
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 49/56] watchdog: using u64 in get_sample_period()
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2012-11-30 18:55 ` [ 48/56] USB: mct_u232: fix broken close Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 50/56] MPI: Fix compilation on MIPS with GCC 4.4 and newer Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, liu chuansheng, Don Zickus,
	Andrew Morton, Linus Torvalds, Shuah Khan

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Chuansheng Liu <chuansheng.liu@intel.com>

commit 8ffeb9b0e6369135bf03a073514f571ef10606b9 upstream.

In get_sample_period(), unsigned long is not enough:

  watchdog_thresh * 2 * (NSEC_PER_SEC / 5)

case1:
  watchdog_thresh is 10 by default, the sample value will be: 0xEE6B2800

case2:
 set watchdog_thresh is 20, the sample value will be: 0x1 DCD6 5000

In case2, we need use u64 to express the sample period.  Otherwise,
changing the threshold thru proc often can not be successful.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/watchdog.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -112,7 +112,7 @@ static unsigned long get_timestamp(int t
 	return cpu_clock(this_cpu) >> 30LL;  /* 2^30 ~= 10^9 */
 }
 
-static unsigned long get_sample_period(void)
+static u64 get_sample_period(void)
 {
 	/*
 	 * convert watchdog_thresh from seconds to ns
@@ -121,7 +121,7 @@ static unsigned long get_sample_period(v
 	 * and hard thresholds) to increment before the
 	 * hardlockup detector generates a warning
 	 */
-	return get_softlockup_thresh() * (NSEC_PER_SEC / 5);
+	return get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5);
 }
 
 /* Commands for resetting the watchdog */



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 50/56] MPI: Fix compilation on MIPS with GCC 4.4 and newer
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2012-11-30 18:55 ` [ 49/56] watchdog: using u64 in get_sample_period() Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 51/56] powerpc/eeh: Lock module while handling EEH event Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Manuel Lauss, Linux-MIPS,
	Dmitry Kasatkin, James Morris, Ralf Baechle, Shuah Khan

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Manuel Lauss <manuel.lauss@gmail.com>

commit a3cea9894157c20a5b1ec08b7e0b5f2019740c10 upstream.

Since 4.4 GCC on MIPS no longer recognizes the "h" constraint,
leading to this build failure:

  CC      lib/mpi/generic_mpih-mul1.o
lib/mpi/generic_mpih-mul1.c: In function 'mpihelp_mul_1':
lib/mpi/generic_mpih-mul1.c:50:3: error: impossible constraint in 'asm'

This patch updates MPI with the latest umul_ppm implementations for MIPS.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: James Morris <jmorris@namei.org>
Patchwork: https://patchwork.linux-mips.org/patch/4612/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 lib/mpi/longlong.h |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

--- a/lib/mpi/longlong.h
+++ b/lib/mpi/longlong.h
@@ -703,7 +703,14 @@ do { \
 	**************  MIPS  *****************
 	***************************************/
 #if defined(__mips__) && W_TYPE_SIZE == 32
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4
+#define umul_ppmm(w1, w0, u, v)			\
+do {						\
+	UDItype __ll = (UDItype)(u) * (v);	\
+	w1 = __ll >> 32;			\
+	w0 = __ll;				\
+} while (0)
+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
 #define umul_ppmm(w1, w0, u, v) \
 	__asm__ ("multu %2,%3" \
 	: "=l" ((USItype)(w0)), \
@@ -728,7 +735,15 @@ do { \
 	**************  MIPS/64  **************
 	***************************************/
 #if (defined(__mips) && __mips >= 3) && W_TYPE_SIZE == 64
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4
+#define umul_ppmm(w1, w0, u, v) \
+do {									\
+	typedef unsigned int __ll_UTItype __attribute__((mode(TI)));	\
+	__ll_UTItype __ll = (__ll_UTItype)(u) * (v);			\
+	w1 = __ll >> 64;						\
+	w0 = __ll;							\
+} while (0)
+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
 #define umul_ppmm(w1, w0, u, v) \
 	__asm__ ("dmultu %2,%3" \
 	: "=l" ((UDItype)(w0)), \



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 51/56] powerpc/eeh: Lock module while handling EEH event
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2012-11-30 18:55 ` [ 50/56] MPI: Fix compilation on MIPS with GCC 4.4 and newer Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 52/56] mmc: sdhci-s3c: fix the wrong number of max bus clocks Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Alexey Kardashevskiy, Gavin Shan,
	Benjamin Herrenschmidt, Herton Ronaldo Krzesinski, Ben Hutchings

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gavin Shan <shangw@linux.vnet.ibm.com>

commit feadf7c0a1a7c08c74bebb4a13b755f8c40e3bbc upstream.

The EEH core is talking with the PCI device driver to determine the
action (purely reset, or PCI device removal). During the period, the
driver might be unloaded and in turn causes kernel crash as follows:

EEH: Detected PCI bus error on PHB#4-PE#10000
EEH: This PCI device has failed 3 times in the last hour
lpfc 0004:01:00.0: 0:2710 PCI channel disable preparing for reset
Unable to handle kernel paging request for data at address 0x00000490
Faulting instruction address: 0xd00000000e682c90
cpu 0x1: Vector: 300 (Data Access) at [c000000fc75ffa20]
    pc: d00000000e682c90: .lpfc_io_error_detected+0x30/0x240 [lpfc]
    lr: d00000000e682c8c: .lpfc_io_error_detected+0x2c/0x240 [lpfc]
    sp: c000000fc75ffca0
   msr: 8000000000009032
   dar: 490
 dsisr: 40000000
  current = 0xc000000fc79b88b0
  paca    = 0xc00000000edb0380	 softe: 0	 irq_happened: 0x00
    pid   = 3386, comm = eehd
enter ? for help
[c000000fc75ffca0] c000000fc75ffd30 (unreliable)
[c000000fc75ffd30] c00000000004fd3c .eeh_report_error+0x7c/0xf0
[c000000fc75ffdc0] c00000000004ee00 .eeh_pe_dev_traverse+0xa0/0x180
[c000000fc75ffe70] c00000000004ffd8 .eeh_handle_event+0x68/0x300
[c000000fc75fff00] c0000000000503a0 .eeh_event_handler+0x130/0x1a0
[c000000fc75fff90] c000000000020138 .kernel_thread+0x54/0x70
1:mon>

The patch increases the reference of the corresponding driver modules
while EEH core does the negotiation with PCI device driver so that the
corresponding driver modules can't be unloaded during the period and
we're safe to refer the callbacks.

Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[ herton: backported for 3.5, adjusted driver assignments, return 0
  instead of NULL, assume dev is not NULL ]
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/powerpc/platforms/pseries/eeh_driver.c |   95 +++++++++++++++++++++-------
 1 file changed, 74 insertions(+), 21 deletions(-)

--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/module.h>
 #include <linux/pci.h>
 #include <asm/eeh.h>
 #include <asm/eeh_event.h>
@@ -47,6 +48,41 @@ static inline const char *eeh_pcid_name(
 	return "";
 }
 
+/**
+ * eeh_pcid_get - Get the PCI device driver
+ * @pdev: PCI device
+ *
+ * The function is used to retrieve the PCI device driver for
+ * the indicated PCI device. Besides, we will increase the reference
+ * of the PCI device driver to prevent that being unloaded on
+ * the fly. Otherwise, kernel crash would be seen.
+ */
+static inline struct pci_driver *eeh_pcid_get(struct pci_dev *pdev)
+{
+	if (!pdev || !pdev->driver)
+		return NULL;
+
+	if (!try_module_get(pdev->driver->driver.owner))
+		return NULL;
+
+	return pdev->driver;
+}
+
+/**
+ * eeh_pcid_put - Dereference on the PCI device driver
+ * @pdev: PCI device
+ *
+ * The function is called to do dereference on the PCI device
+ * driver of the indicated PCI device.
+ */
+static inline void eeh_pcid_put(struct pci_dev *pdev)
+{
+	if (!pdev || !pdev->driver)
+		return;
+
+	module_put(pdev->driver->driver.owner);
+}
+
 #if 0
 static void print_device_node_tree(struct pci_dn *pdn, int dent)
 {
@@ -126,18 +162,20 @@ static void eeh_enable_irq(struct pci_de
 static int eeh_report_error(struct pci_dev *dev, void *userdata)
 {
 	enum pci_ers_result rc, *res = userdata;
-	struct pci_driver *driver = dev->driver;
+	struct pci_driver *driver;
 
 	dev->error_state = pci_channel_io_frozen;
 
-	if (!driver)
-		return 0;
+	driver = eeh_pcid_get(dev);
+	if (!driver) return 0;
 
 	eeh_disable_irq(dev);
 
 	if (!driver->err_handler ||
-	    !driver->err_handler->error_detected)
+	    !driver->err_handler->error_detected) {
+		eeh_pcid_put(dev);
 		return 0;
+	}
 
 	rc = driver->err_handler->error_detected(dev, pci_channel_io_frozen);
 
@@ -145,6 +183,7 @@ static int eeh_report_error(struct pci_d
 	if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
 	if (*res == PCI_ERS_RESULT_NONE) *res = rc;
 
+	eeh_pcid_put(dev);
 	return 0;
 }
 
@@ -160,12 +199,16 @@ static int eeh_report_error(struct pci_d
 static int eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata)
 {
 	enum pci_ers_result rc, *res = userdata;
-	struct pci_driver *driver = dev->driver;
+	struct pci_driver *driver;
 
-	if (!driver ||
-	    !driver->err_handler ||
-	    !driver->err_handler->mmio_enabled)
+	driver = eeh_pcid_get(dev);
+	if (!driver) return 0;
+
+	if (!driver->err_handler ||
+	    !driver->err_handler->mmio_enabled) {
+		eeh_pcid_put(dev);
 		return 0;
+	}
 
 	rc = driver->err_handler->mmio_enabled(dev);
 
@@ -173,6 +216,7 @@ static int eeh_report_mmio_enabled(struc
 	if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
 	if (*res == PCI_ERS_RESULT_NONE) *res = rc;
 
+	eeh_pcid_put(dev);
 	return 0;
 }
 
@@ -189,18 +233,20 @@ static int eeh_report_mmio_enabled(struc
 static int eeh_report_reset(struct pci_dev *dev, void *userdata)
 {
 	enum pci_ers_result rc, *res = userdata;
-	struct pci_driver *driver = dev->driver;
-
-	if (!driver)
-		return 0;
+	struct pci_driver *driver;
 
 	dev->error_state = pci_channel_io_normal;
 
+	driver = eeh_pcid_get(dev);
+	if (!driver) return 0;
+
 	eeh_enable_irq(dev);
 
 	if (!driver->err_handler ||
-	    !driver->err_handler->slot_reset)
+	    !driver->err_handler->slot_reset) {
+		eeh_pcid_put(dev);
 		return 0;
+	}
 
 	rc = driver->err_handler->slot_reset(dev);
 	if ((*res == PCI_ERS_RESULT_NONE) ||
@@ -208,6 +254,7 @@ static int eeh_report_reset(struct pci_d
 	if (*res == PCI_ERS_RESULT_DISCONNECT &&
 	     rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
 
+	eeh_pcid_put(dev);
 	return 0;
 }
 
@@ -222,21 +269,24 @@ static int eeh_report_reset(struct pci_d
  */
 static int eeh_report_resume(struct pci_dev *dev, void *userdata)
 {
-	struct pci_driver *driver = dev->driver;
+	struct pci_driver *driver;
 
 	dev->error_state = pci_channel_io_normal;
 
-	if (!driver)
-		return 0;
+	driver = eeh_pcid_get(dev);
+	if (!driver) return 0;
 
 	eeh_enable_irq(dev);
 
 	if (!driver->err_handler ||
-	    !driver->err_handler->resume)
+	    !driver->err_handler->resume) {
+		eeh_pcid_put(dev);
 		return 0;
+	}
 
 	driver->err_handler->resume(dev);
 
+	eeh_pcid_put(dev);
 	return 0;
 }
 
@@ -250,21 +300,24 @@ static int eeh_report_resume(struct pci_
  */
 static int eeh_report_failure(struct pci_dev *dev, void *userdata)
 {
-	struct pci_driver *driver = dev->driver;
+	struct pci_driver *driver;
 
 	dev->error_state = pci_channel_io_perm_failure;
 
-	if (!driver)
-		return 0;
+	driver = eeh_pcid_get(dev);
+	if (!driver) return 0;
 
 	eeh_disable_irq(dev);
 
 	if (!driver->err_handler ||
-	    !driver->err_handler->error_detected)
+	    !driver->err_handler->error_detected) {
+		eeh_pcid_put(dev);
 		return 0;
+	}
 
 	driver->err_handler->error_detected(dev, pci_channel_io_perm_failure);
 
+	eeh_pcid_put(dev);
 	return 0;
 }
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 52/56] mmc: sdhci-s3c: fix the wrong number of max bus clocks
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2012-11-30 18:55 ` [ 51/56] powerpc/eeh: Lock module while handling EEH event Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 53/56] ARM: OMAP: counter: add locking to read_persistent_clock Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Jaehoon Chung, Kyungmin Park,
	Chris Ball, Ben Hutchings

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jaehoon Chung <jh80.chung@samsung.com>

commit 5feb54a1ab91a237e247c013b8c4fb100ea347b1 upstream.

We can use up to four bus-clocks; but on module remove, we didn't
disable the fourth bus clock.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mmc/host/sdhci-s3c.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -656,7 +656,7 @@ static int __devexit sdhci_s3c_remove(st
 
 	pm_runtime_disable(&pdev->dev);
 
-	for (ptr = 0; ptr < 3; ptr++) {
+	for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
 		if (sc->clk_bus[ptr]) {
 			clk_disable(sc->clk_bus[ptr]);
 			clk_put(sc->clk_bus[ptr]);



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 53/56] ARM: OMAP: counter: add locking to read_persistent_clock
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2012-11-30 18:55 ` [ 52/56] mmc: sdhci-s3c: fix the wrong number of max bus clocks Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 54/56] timekeeping: Cast raw_interval to u64 to avoid shift overflow Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Colin Cross, R Sricharan,
	Tony Lindgren, Ben Hutchings

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

commit 9d7d6e363b06934221b81a859d509844c97380df upstream.

read_persistent_clock uses a global variable, use a spinlock to
ensure non-atomic updates to the variable don't overlap and cause
time to move backwards.

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/plat-omap/counter_32k.c |   21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -50,22 +50,29 @@ static u32 notrace omap_32k_read_sched_c
  * nsecs and adds to a monotonically increasing timespec.
  */
 static struct timespec persistent_ts;
-static cycles_t cycles, last_cycles;
+static cycles_t cycles;
 static unsigned int persistent_mult, persistent_shift;
+static DEFINE_SPINLOCK(read_persistent_clock_lock);
+
 void read_persistent_clock(struct timespec *ts)
 {
 	unsigned long long nsecs;
-	cycles_t delta;
-	struct timespec *tsp = &persistent_ts;
+	cycles_t last_cycles;
+	unsigned long flags;
+
+	spin_lock_irqsave(&read_persistent_clock_lock, flags);
 
 	last_cycles = cycles;
 	cycles = timer_32k_base ? __raw_readl(timer_32k_base) : 0;
-	delta = cycles - last_cycles;
 
-	nsecs = clocksource_cyc2ns(delta, persistent_mult, persistent_shift);
+	nsecs = clocksource_cyc2ns(cycles - last_cycles,
+					persistent_mult, persistent_shift);
+
+	timespec_add_ns(&persistent_ts, nsecs);
+
+	*ts = persistent_ts;
 
-	timespec_add_ns(tsp, nsecs);
-	*ts = *tsp;
+	spin_unlock_irqrestore(&read_persistent_clock_lock, flags);
 }
 
 int __init omap_init_clocksource_32k(void)



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 54/56] timekeeping: Cast raw_interval to u64 to avoid shift overflow
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2012-11-30 18:55 ` [ 53/56] ARM: OMAP: counter: add locking to read_persistent_clock Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 55/56] net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx() Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Dan Carpenter, John Stultz,
	Thomas Gleixner, Ben Hutchings, Herton Ronaldo Krzesinski

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 5b3900cd409466c0070b234d941650685ad0c791 upstream.

We fixed a bunch of integer overflows in timekeeping code during the 3.6
cycle.  I did an audit based on that and found this potential overflow.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Link: http://lkml.kernel.org/r/20121009071823.GA19159@elgon.mountain
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ben Hutchings <ben@decadent.org.uk>
[ herton: adapt for 3.5, timekeeper instead of tk pointer ]
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/time/timekeeping.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1014,7 +1014,7 @@ static cycle_t logarithmic_accumulation(
 	}
 
 	/* Accumulate raw time */
-	raw_nsecs = timekeeper.raw_interval << shift;
+	raw_nsecs = (u64)timekeeper.raw_interval << shift;
 	raw_nsecs += timekeeper.raw_time.tv_nsec;
 	if (raw_nsecs >= NSEC_PER_SEC) {
 		u64 raw_secs = raw_nsecs;



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 55/56] net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx()
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2012-11-30 18:55 ` [ 54/56] timekeeping: Cast raw_interval to u64 to avoid shift overflow Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-11-30 18:55 ` [ 56/56] iwlwifi: fix 6000 series channel switch command Greg Kroah-Hartman
  2012-12-01 15:35 ` [ 00/56] 3.4.21-stable review Satoru Takeuchi
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Stanislav Yakovlev, John W. Linville,
	Ben Hutchings

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stanislav Yakovlev <stas.yakovlev@gmail.com>

commit bf11315eeda510ea4fc1a2bf972d8155d31d89b4 upstream.

The driver does not count space of radiotap fields when allocating skb for
radiotap packet. This leads to kernel panic with the following call trace:

...
[67607.676067] [<c152f90f>] error_code+0x67/0x6c
[67607.676067] [<c142f831>] ? skb_put+0x91/0xa0
[67607.676067] [<f8cf5e5b>] ? ipw_handle_promiscuous_tx+0x16b/0x2d0 [ipw2200]
[67607.676067] [<f8cf5e5b>] ipw_handle_promiscuous_tx+0x16b/0x2d0 [ipw2200]
[67607.676067] [<f8cf899b>] ipw_net_hard_start_xmit+0x8b/0x90 [ipw2200]
[67607.676067] [<f8741c5a>] libipw_xmit+0x55a/0x980 [libipw]
[67607.676067] [<c143d3e8>] dev_hard_start_xmit+0x218/0x4d0
...

This bug was found by VittGam.
https://bugzilla.kernel.org/show_bug.cgi?id=43255

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/ipw2x00/ipw2200.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -10471,7 +10471,7 @@ static void ipw_handle_promiscuous_tx(st
 		} else
 			len = src->len;
 
-		dst = alloc_skb(len + sizeof(*rt_hdr), GFP_ATOMIC);
+		dst = alloc_skb(len + sizeof(*rt_hdr) + sizeof(u16)*2, GFP_ATOMIC);
 		if (!dst)
 			continue;
 



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ 56/56] iwlwifi: fix 6000 series channel switch command
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2012-11-30 18:55 ` [ 55/56] net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx() Greg Kroah-Hartman
@ 2012-11-30 18:55 ` Greg Kroah-Hartman
  2012-12-01 15:35 ` [ 00/56] 3.4.21-stable review Satoru Takeuchi
  56 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-30 18:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Greg Kroah-Hartman, alan, Emmanuel Grumbach, Johannes Berg,
	Ben Hutchings

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johannes Berg <johannes.berg@intel.com>

commit 8f7b8db6e0557c8437adf9371e020cd89a7e85dc upstream.

The channel switch command for 6000 series devices
is larger than the maximum inline command size of
320 bytes. The command is therefore refused with a
warning. Fix this by allocating the command and
using the NOCOPY mechanism.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/iwlwifi/iwl-6000.c |   33 ++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -170,7 +170,7 @@ static int iwl6000_hw_channel_switch(str
 	 * See iwlagn_mac_channel_switch.
 	 */
 	struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
-	struct iwl6000_channel_switch_cmd cmd;
+	struct iwl6000_channel_switch_cmd *cmd;
 	const struct iwl_channel_info *ch_info;
 	u32 switch_time_in_usec, ucode_switch_time;
 	u16 ch;
@@ -180,18 +180,25 @@ static int iwl6000_hw_channel_switch(str
 	struct ieee80211_vif *vif = ctx->vif;
 	struct iwl_host_cmd hcmd = {
 		.id = REPLY_CHANNEL_SWITCH,
-		.len = { sizeof(cmd), },
+		.len = { sizeof(*cmd), },
 		.flags = CMD_SYNC,
-		.data = { &cmd, },
+		.dataflags[0] = IWL_HCMD_DFL_NOCOPY,
 	};
+	int err;
 
-	cmd.band = priv->band == IEEE80211_BAND_2GHZ;
+	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
+	if (!cmd)
+		return -ENOMEM;
+
+	hcmd.data[0] = cmd;
+
+	cmd->band = priv->band == IEEE80211_BAND_2GHZ;
 	ch = ch_switch->channel->hw_value;
 	IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
 		      ctx->active.channel, ch);
-	cmd.channel = cpu_to_le16(ch);
-	cmd.rxon_flags = ctx->staging.flags;
-	cmd.rxon_filter_flags = ctx->staging.filter_flags;
+	cmd->channel = cpu_to_le16(ch);
+	cmd->rxon_flags = ctx->staging.flags;
+	cmd->rxon_filter_flags = ctx->staging.filter_flags;
 	switch_count = ch_switch->count;
 	tsf_low = ch_switch->timestamp & 0x0ffffffff;
 	/*
@@ -207,30 +214,32 @@ static int iwl6000_hw_channel_switch(str
 			switch_count = 0;
 	}
 	if (switch_count <= 1)
-		cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
+		cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time);
 	else {
 		switch_time_in_usec =
 			vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
 		ucode_switch_time = iwl_usecs_to_beacons(priv,
 							 switch_time_in_usec,
 							 beacon_interval);
-		cmd.switch_time = iwl_add_beacon_time(priv,
+		cmd->switch_time = iwl_add_beacon_time(priv,
 						      priv->ucode_beacon_time,
 						      ucode_switch_time,
 						      beacon_interval);
 	}
 	IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
-		      cmd.switch_time);
+		      cmd->switch_time);
 	ch_info = iwl_get_channel_info(priv, priv->band, ch);
 	if (ch_info)
-		cmd.expect_beacon = is_channel_radar(ch_info);
+		cmd->expect_beacon = is_channel_radar(ch_info);
 	else {
 		IWL_ERR(priv, "invalid channel switch from %u to %u\n",
 			ctx->active.channel, ch);
 		return -EFAULT;
 	}
 
-	return iwl_dvm_send_cmd(priv, &hcmd);
+	err = iwl_dvm_send_cmd(priv, &hcmd);
+	kfree(cmd);
+	return err;
 }
 
 static struct iwl_lib_ops iwl6000_lib = {



^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [ 00/56] 3.4.21-stable review
  2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2012-11-30 18:55 ` [ 56/56] iwlwifi: fix 6000 series channel switch command Greg Kroah-Hartman
@ 2012-12-01 15:35 ` Satoru Takeuchi
  2012-12-02  2:08   ` Shuah Khan
  56 siblings, 1 reply; 65+ messages in thread
From: Satoru Takeuchi @ 2012-12-01 15:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, stable, torvalds, akpm, alan

At Fri, 30 Nov 2012 10:54:52 -0800,
Greg Kroah-Hartman wrote:
> 
> This is the start of the stable review cycle for the 3.4.21 release.
> There are 56 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Sun Dec  2 18:50:02 UTC 2012.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.4.21-rc1.gz
> and the diffstat can be found below.

3.4.21-rc1 can be built and boot without any problem. Building a kernel with
this kernel also works fine.

Thanks,
Satoru

> 
> thanks,
> 
> greg k-h
> 
> -------------
> Pseudo-Shortlog of commits:
> 
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>     Linux 3.4.21-rc1
> 
> Johannes Berg <johannes.berg@intel.com>
>     iwlwifi: fix 6000 series channel switch command
> 
> Stanislav Yakovlev <stas.yakovlev@gmail.com>
>     net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx()
> 
> Dan Carpenter <dan.carpenter@oracle.com>
>     timekeeping: Cast raw_interval to u64 to avoid shift overflow
> 
> Colin Cross <ccross@android.com>
>     ARM: OMAP: counter: add locking to read_persistent_clock
> 
> Jaehoon Chung <jh80.chung@samsung.com>
>     mmc: sdhci-s3c: fix the wrong number of max bus clocks
> 
> Gavin Shan <shangw@linux.vnet.ibm.com>
>     powerpc/eeh: Lock module while handling EEH event
> 
> Manuel Lauss <manuel.lauss@gmail.com>
>     MPI: Fix compilation on MIPS with GCC 4.4 and newer
> 
> Chuansheng Liu <chuansheng.liu@intel.com>
>     watchdog: using u64 in get_sample_period()
> 
> Johan Hovold <jhovold@gmail.com>
>     USB: mct_u232: fix broken close
> 
> Thierry Escande <thierry.escande@linux.intel.com>
>     NFC: Fix nfc_llcp_local chained list insertion
> 
> Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
>     NFC: pn533: Fix mem leak in pn533_in_dep_link_up
> 
> Szymon Janc <szymon.janc@tieto.com>
>     NFC: pn533: Fix use after free
> 
> Mauro Carvalho Chehab <mchehab@redhat.com>
>     get_dvb_firmware: fix download site for tda10046 firmware
> 
> David Milburn <dmilburn@redhat.com>
>     sata_svw: check DMA start bit before reset
> 
> joshua.a.hay@intel.com <joshua.a.hay@intel.com>
>     ixgbe: add support for X540-AT1
> 
> Petr Matousek <pmatouse@redhat.com>
>     KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
> 
> Jan Kara <jack@suse.cz>
>     scsi: Silence unnecessary warnings about ioctl to partition
> 
> Tilman Schmidt <tilman@imap.cc>
>     bas_gigaset: fix pre_reset handling
> 
> David Henningsson <david.henningsson@canonical.com>
>     ALSA: hda - Add support for Realtek ALC292
> 
> Duncan Roe <duncan_roe@acslink.net.au>
>     ALSA: hda - Fix missing beep on ASUS X43U notebook
> 
> Kailang Yang <kailang@realtek.com>
>     ALSA: hda - Add new codec ALC283 ALC290 support
> 
> Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>     PM / QoS: fix wrong error-checking condition
> 
> Al Viro <viro@zeniv.linux.org.uk>
>     sparc64: not any error from do_sigaltstack() should fail rt_sigreturn()
> 
> Jan Kara <jack@suse.cz>
>     jbd: Fix lock ordering bug in journal_unmap_buffer()
> 
> Oliver Hartkopp <socketcan@hartkopp.net>
>     can: bcm: initialize ifindex for timeouts without previous frame reception
> 
> Oliver Hartkopp <socketcan@hartkopp.net>
>     can: peak_usb: fix hwtstamp assignment
> 
> Paul Bolle <pebolle@tiscali.nl>
>     radeon: add AGPMode 1 quirk for RV250
> 
> Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
>     mac80211: deinitialize ibss-internals after emptiness check
> 
> Darren Hart <dvhart@linux.intel.com>
>     futex: avoid wake_futex() for a PI futex_q
> 
> Jens Axboe <axboe@kernel.dk>
>     dm: fix deadlock with request based dm and queue request_fn recursion
> 
> NeilBrown <neilb@suse.de>
>     md/raid10: decrement correct pending counter when writing to replacement.
> 
> majianpeng <majianpeng@gmail.com>
>     md: Avoid write invalid address if read_seqretry returned true.
> 
> majianpeng <majianpeng@gmail.com>
>     md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.
> 
> Thomas Betker <thomas.betker@freenet.de>
>     jffs2: Fix lock acquisition order bug in jffs2_write_begin
> 
> Sachin Kamat <sachin.kamat@linaro.org>
>     mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()
> 
> Jiri Engelthaler <engycz@gmail.com>
>     mtd: slram: invalid checking of absolute end address
> 
> Al Viro <viro@ZenIV.linux.org.uk>
>     PARISC: fix user-triggerable panic on parisc
> 
> James Bottomley <James.Bottomley@HansenPartnership.com>
>     PARISC: fix virtual aliasing issue in get_shared_area()
> 
> David Henningsson <david.henningsson@canonical.com>
>     ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker
> 
> Clemens Ladisch <clemens@ladisch.de>
>     ALSA: ua101, usx2y: fix broken MIDI output
> 
> Alex Deucher <alexander.deucher@amd.com>
>     drm/radeon: add new SI pci id
> 
> Maciej Patelczyk <maciej.patelczyk@intel.com>
>     SCSI: isci: copy fis 0x34 response into proper buffer
> 
> Bing Zhao <bzhao@marvell.com>
>     mwifiex: fix system hang issue in cmd timeout error case
> 
> Bing Zhao <bzhao@marvell.com>
>     mwifiex: report error to MMC core if we cannot suspend
> 
> Albert Pool <albertpool@solcon.nl>
>     rtlwifi: rtl8192cu: Add new USB ID
> 
> Boris Ostrovsky <boris.ostrovsky@amd.com>
>     x86, microcode, AMD: Add support for family 16h processors
> 
> Matt Fleming <matt.fleming@intel.com>
>     x86, efi: Fix processor-specific memcpy() build error
> 
> Robert Richter <robert.richter@amd.com>
>     x86-32: Fix invalid stack address while in softirq
> 
> Larry Finger <Larry.Finger@lwfinger.net>
>     rtlwifi: rtl8192se: Fix gcc 4.7.x warning
> 
> Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
>     scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
> 
> Dan Carpenter <dan.carpenter@oracle.com>
>     mvsas: remove unused variable in mvs_task_exec()
> 
> Dan Carpenter <dan.carpenter@oracle.com>
>     drivers/leds/leds-lp5521.c: fix lp5521_read() error handling
> 
> Daniel Mack <zonque@gmail.com>
>     ALSA: snd-usb-caiaq: initialize card pointer
> 
> Szymon Janc <szymon.janc@tieto.com>
>     Bluetooth: Fix using uninitialized option in RFCMode
> 
> Keith Busch <keith.busch@intel.com>
>     NVMe: Fix uninitialized iod compiler warning
> 
> Alexandre Pereira da Silva <aletes.xgr@gmail.com>
>     UBIFS: fix compilation warning
> 
> 
> -------------
> 
> Diffstat:
> 
>  Documentation/dvb/get_dvb_firmware               |  2 +-
>  Makefile                                         |  4 +-
>  arch/arm/plat-omap/counter_32k.c                 | 21 ++++--
>  arch/parisc/kernel/signal32.c                    |  6 +-
>  arch/parisc/kernel/sys_parisc.c                  |  2 +
>  arch/powerpc/platforms/pseries/eeh_driver.c      | 95 ++++++++++++++++++------
>  arch/sparc/kernel/signal_64.c                    |  4 +-
>  arch/x86/boot/compressed/eboot.c                 |  2 +
>  arch/x86/include/asm/ptrace.h                    | 15 +---
>  arch/x86/kernel/microcode_amd.c                  |  4 +
>  arch/x86/kernel/ptrace.c                         | 28 +++++++
>  arch/x86/kvm/cpuid.h                             |  3 +
>  arch/x86/kvm/x86.c                               |  3 +
>  block/scsi_ioctl.c                               |  5 +-
>  drivers/ata/sata_svw.c                           | 35 +++++++++
>  drivers/base/power/qos.c                         |  2 +-
>  drivers/block/nvme.c                             |  2 +-
>  drivers/gpu/drm/radeon/radeon_agp.c              |  5 +-
>  drivers/isdn/gigaset/bas-gigaset.c               | 19 ++++-
>  drivers/leds/leds-lp5521.c                       | 12 ++-
>  drivers/md/dm.c                                  |  8 +-
>  drivers/md/md.c                                  | 11 +--
>  drivers/md/raid10.c                              |  2 +-
>  drivers/mmc/host/sdhci-s3c.c                     |  2 +-
>  drivers/mtd/devices/slram.c                      |  2 +-
>  drivers/mtd/ofpart.c                             |  2 +-
>  drivers/net/can/usb/peak_usb/pcan_usb.c          |  8 +-
>  drivers/net/can/usb/peak_usb/pcan_usb_pro.c      |  8 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  |  1 +
>  drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  1 +
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |  2 +
>  drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |  1 +
>  drivers/net/wireless/ipw2x00/ipw2200.c           |  2 +-
>  drivers/net/wireless/iwlwifi/iwl-6000.c          | 33 +++++---
>  drivers/net/wireless/mwifiex/cmdevt.c            | 11 ++-
>  drivers/net/wireless/mwifiex/sdio.c              | 11 +--
>  drivers/net/wireless/rtlwifi/rtl8192cu/sw.c      |  1 +
>  drivers/net/wireless/rtlwifi/rtl8192se/phy.c     |  3 +
>  drivers/nfc/pn533.c                              | 16 ++--
>  drivers/scsi/aha152x.c                           |  4 +-
>  drivers/scsi/isci/request.c                      |  2 +-
>  drivers/scsi/mvsas/mv_sas.c                      |  1 -
>  drivers/usb/serial/mct_u232.c                    | 14 ++--
>  fs/jbd/transaction.c                             |  2 +
>  fs/jffs2/file.c                                  | 39 +++++-----
>  fs/ubifs/dir.c                                   |  2 +-
>  include/drm/drm_pciids.h                         |  1 +
>  kernel/futex.c                                   | 18 ++++-
>  kernel/time/timekeeping.c                        |  2 +-
>  kernel/watchdog.c                                |  4 +-
>  lib/mpi/longlong.h                               | 19 ++++-
>  net/bluetooth/l2cap_core.c                       | 14 ++--
>  net/can/bcm.c                                    |  3 +
>  net/mac80211/ibss.c                              |  8 +-
>  net/nfc/llcp/llcp.c                              |  2 +-
>  sound/pci/hda/patch_cirrus.c                     |  1 +
>  sound/pci/hda/patch_realtek.c                    |  4 +
>  sound/usb/caiaq/device.c                         |  2 +-
>  sound/usb/midi.c                                 |  8 +-
>  59 files changed, 393 insertions(+), 151 deletions(-)
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [ 00/56] 3.4.21-stable review
  2012-12-01 15:35 ` [ 00/56] 3.4.21-stable review Satoru Takeuchi
@ 2012-12-02  2:08   ` Shuah Khan
  0 siblings, 0 replies; 65+ messages in thread
From: Shuah Khan @ 2012-12-02  2:08 UTC (permalink / raw)
  To: Satoru Takeuchi
  Cc: Greg Kroah-Hartman, linux-kernel, stable, torvalds, akpm, alan

On Sat, Dec 1, 2012 at 8:35 AM, Satoru Takeuchi
<satoru.takeuchi@gmail.com> wrote:
> At Fri, 30 Nov 2012 10:54:52 -0800,
> Greg Kroah-Hartman wrote:
>>
>> This is the start of the stable review cycle for the 3.4.21 release.
>> There are 56 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Sun Dec  2 18:50:02 UTC 2012.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>>       kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.4.21-rc1.gz
>> and the diffstat can be found below.
>
> 3.4.21-rc1 can be built and boot without any problem. Building a kernel with
> this kernel also works fine.
>

Patch applied cleanly, compiled and booted on the following systems:
HP EliteBook 6930p Intel(R) Core(TM)2 Duo CPU     T9400  @ 2.53GHz
HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics

-- Shuah

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [ 05/56] drivers/leds/leds-lp5521.c: fix lp5521_read() error handling
  2012-11-30 18:54 ` [ 05/56] drivers/leds/leds-lp5521.c: fix lp5521_read() error handling Greg Kroah-Hartman
@ 2012-12-02  3:17   ` Ben Hutchings
  2012-12-02  8:05     ` Dan Carpenter
  2012-12-02 17:29     ` [patch] leds: leds-lp5521: return an error code on error in probe() Dan Carpenter
  0 siblings, 2 replies; 65+ messages in thread
From: Ben Hutchings @ 2012-12-02  3:17 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: linux-kernel, stable, alan, Milo, Richard Purdie, Bryan Wu,
	Andrew Morton, Linus Torvalds, Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 1707 bytes --]

On Fri, 2012-11-30 at 10:54 -0800, Greg Kroah-Hartman wrote:
> 3.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> 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.
[...]
> --- a/drivers/leds/leds-lp5521.c
> +++ b/drivers/leds/leds-lp5521.c
[...]
> @@ -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;
>  	}

lp5521_probe() is going to return 0 if ret == 0 &&
buf != LP5521_REG_R_CURR_DEFAULT here.  It needs to set an error code.

Ben.

-- 
Ben Hutchings
It is easier to change the specification to fit the program than vice versa.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [ 05/56] drivers/leds/leds-lp5521.c: fix lp5521_read() error handling
  2012-12-02  3:17   ` Ben Hutchings
@ 2012-12-02  8:05     ` Dan Carpenter
  2012-12-02 17:29     ` [patch] leds: leds-lp5521: return an error code on error in probe() Dan Carpenter
  1 sibling, 0 replies; 65+ messages in thread
From: Dan Carpenter @ 2012-12-02  8:05 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kernel, stable, alan, Milo, Richard Purdie, Bryan Wu,
	Andrew Morton, Linus Torvalds, Greg Kroah-Hartman

On Sun, Dec 02, 2012 at 03:17:27AM +0000, Ben Hutchings wrote:
> On Fri, 2012-11-30 at 10:54 -0800, Greg Kroah-Hartman wrote:
> > 3.4-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > 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.
> [...]
> > --- a/drivers/leds/leds-lp5521.c
> > +++ b/drivers/leds/leds-lp5521.c
> [...]
> > @@ -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;
> >  	}
> 
> lp5521_probe() is going to return 0 if ret == 0 &&
> buf != LP5521_REG_R_CURR_DEFAULT here.  It needs to set an error code.

Thanks Ben,

I'll send a fix for this.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [patch] leds: leds-lp5521: return an error code on error in probe()
  2012-12-02  3:17   ` Ben Hutchings
  2012-12-02  8:05     ` Dan Carpenter
@ 2012-12-02 17:29     ` Dan Carpenter
  2012-12-03 19:18       ` Bryan Wu
  1 sibling, 1 reply; 65+ messages in thread
From: Dan Carpenter @ 2012-12-02 17:29 UTC (permalink / raw)
  To: Bryan Wu; +Cc: Richard Purdie, linux-leds, linux-kernel, kernel-janitors

If "buf" wasn't equal to LP5521_REG_R_CURR_DEFAULT the probe fails but
we still return zero.  I've changed it to print an error message and
return -EINVAL.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 2bee6b9..cb8a522 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -788,10 +788,17 @@ static int lp5521_probe(struct i2c_client *client,
 	 * LP5521_REG_ENABLE register will not have any effect - strange!
 	 */
 	ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
-	if (ret || buf != LP5521_REG_R_CURR_DEFAULT) {
+	if (ret) {
 		dev_err(&client->dev, "error in resetting chip\n");
 		goto fail2;
 	}
+	if (buf != LP5521_REG_R_CURR_DEFAULT) {
+		dev_err(&client->dev,
+			"unexpected data in register (expected 0x%x got 0x%x)\n",
+			LP5521_REG_R_CURR_DEFAULT, buf);
+		ret = -EINVAL;
+		goto fail2;
+	}
 	usleep_range(10000, 20000);
 
 	ret = lp5521_detect(client);

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [patch] leds: leds-lp5521: return an error code on error in probe()
  2012-12-02 17:29     ` [patch] leds: leds-lp5521: return an error code on error in probe() Dan Carpenter
@ 2012-12-03 19:18       ` Bryan Wu
  0 siblings, 0 replies; 65+ messages in thread
From: Bryan Wu @ 2012-12-03 19:18 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Richard Purdie, linux-leds, linux-kernel, kernel-janitors

On Sun, Dec 2, 2012 at 9:29 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> If "buf" wasn't equal to LP5521_REG_R_CURR_DEFAULT the probe fails but
> we still return zero.  I've changed it to print an error message and
> return -EINVAL.
>

Looks fine with me, I applied it to my for-next branch.

-Bryan

> Reported-by: Ben Hutchings <ben@decadent.org.uk>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
> index 2bee6b9..cb8a522 100644
> --- a/drivers/leds/leds-lp5521.c
> +++ b/drivers/leds/leds-lp5521.c
> @@ -788,10 +788,17 @@ static int lp5521_probe(struct i2c_client *client,
>          * LP5521_REG_ENABLE register will not have any effect - strange!
>          */
>         ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
> -       if (ret || buf != LP5521_REG_R_CURR_DEFAULT) {
> +       if (ret) {
>                 dev_err(&client->dev, "error in resetting chip\n");
>                 goto fail2;
>         }
> +       if (buf != LP5521_REG_R_CURR_DEFAULT) {
> +               dev_err(&client->dev,
> +                       "unexpected data in register (expected 0x%x got 0x%x)\n",
> +                       LP5521_REG_R_CURR_DEFAULT, buf);
> +               ret = -EINVAL;
> +               goto fail2;
> +       }
>         usleep_range(10000, 20000);
>
>         ret = lp5521_detect(client);

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [ 09/56] x86-32: Fix invalid stack address while in softirq
  2012-11-30 18:55 ` [ 09/56] x86-32: Fix invalid stack address while in softirq Greg Kroah-Hartman
@ 2012-12-04 13:56   ` Herton Ronaldo Krzesinski
  2012-12-06 18:42     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 65+ messages in thread
From: Herton Ronaldo Krzesinski @ 2012-12-04 13:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, alan, Yang Wei, Robert Richter,
	H. Peter Anvin, Jun Zhang

On Fri, Nov 30, 2012 at 10:55:01AM -0800, Greg Kroah-Hartman wrote:
> 3.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Robert Richter <robert.richter@amd.com>
> 
> commit 1022623842cb72ee4d0dbf02f6937f38c92c3f41 upstream.
> 
> In 32 bit the stack address provided by kernel_stack_pointer() may
> point to an invalid range causing NULL pointer access or page faults
> while in NMI (see trace below). This happens if called in softirq
> context and if the stack is empty. The address at &regs->sp is then
> out of range.
> 
> Fixing this by checking if regs and &regs->sp are in the same stack
> context. Otherwise return the previous stack pointer stored in struct
> thread_info. If that address is invalid too, return address of regs.
> 

This also makes latest 3.4.y build fail with oprofile on i386, needs
also EXPORT_SYMBOL for kernel_stack_pointer (commit
cb57a2b4cff7edf2a4e32c0163200e9434807e0a)

-- 
[]'s
Herton

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [ 09/56] x86-32: Fix invalid stack address while in softirq
  2012-12-04 13:56   ` Herton Ronaldo Krzesinski
@ 2012-12-06 18:42     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 65+ messages in thread
From: Greg Kroah-Hartman @ 2012-12-06 18:42 UTC (permalink / raw)
  To: Herton Ronaldo Krzesinski
  Cc: linux-kernel, stable, alan, Yang Wei, Robert Richter,
	H. Peter Anvin, Jun Zhang

On Tue, Dec 04, 2012 at 11:56:46AM -0200, Herton Ronaldo Krzesinski wrote:
> On Fri, Nov 30, 2012 at 10:55:01AM -0800, Greg Kroah-Hartman wrote:
> > 3.4-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Robert Richter <robert.richter@amd.com>
> > 
> > commit 1022623842cb72ee4d0dbf02f6937f38c92c3f41 upstream.
> > 
> > In 32 bit the stack address provided by kernel_stack_pointer() may
> > point to an invalid range causing NULL pointer access or page faults
> > while in NMI (see trace below). This happens if called in softirq
> > context and if the stack is empty. The address at &regs->sp is then
> > out of range.
> > 
> > Fixing this by checking if regs and &regs->sp are in the same stack
> > context. Otherwise return the previous stack pointer stored in struct
> > thread_info. If that address is invalid too, return address of regs.
> > 
> 
> This also makes latest 3.4.y build fail with oprofile on i386, needs
> also EXPORT_SYMBOL for kernel_stack_pointer (commit
> cb57a2b4cff7edf2a4e32c0163200e9434807e0a)

Sorry, now fixed with 3.4.22

^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2012-12-06 18:42 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-30 18:54 [ 00/56] 3.4.21-stable review Greg Kroah-Hartman
2012-11-30 18:54 ` [ 01/56] UBIFS: fix compilation warning Greg Kroah-Hartman
2012-11-30 18:54 ` [ 02/56] NVMe: Fix uninitialized iod compiler warning Greg Kroah-Hartman
2012-11-30 18:54 ` [ 03/56] Bluetooth: Fix using uninitialized option in RFCMode Greg Kroah-Hartman
2012-11-30 18:54 ` [ 04/56] ALSA: snd-usb-caiaq: initialize card pointer Greg Kroah-Hartman
2012-11-30 18:54 ` [ 05/56] drivers/leds/leds-lp5521.c: fix lp5521_read() error handling Greg Kroah-Hartman
2012-12-02  3:17   ` Ben Hutchings
2012-12-02  8:05     ` Dan Carpenter
2012-12-02 17:29     ` [patch] leds: leds-lp5521: return an error code on error in probe() Dan Carpenter
2012-12-03 19:18       ` Bryan Wu
2012-11-30 18:54 ` [ 06/56] [SCSI] mvsas: remove unused variable in mvs_task_exec() Greg Kroah-Hartman
2012-11-30 18:54 ` [ 07/56] scsi: aha152x: Fix sparse warning and make printing pointer address more portable Greg Kroah-Hartman
2012-11-30 18:55 ` [ 08/56] rtlwifi: rtl8192se: Fix gcc 4.7.x warning Greg Kroah-Hartman
2012-11-30 18:55 ` [ 09/56] x86-32: Fix invalid stack address while in softirq Greg Kroah-Hartman
2012-12-04 13:56   ` Herton Ronaldo Krzesinski
2012-12-06 18:42     ` Greg Kroah-Hartman
2012-11-30 18:55 ` [ 10/56] x86, efi: Fix processor-specific memcpy() build error Greg Kroah-Hartman
2012-11-30 18:55 ` [ 11/56] x86, microcode, AMD: Add support for family 16h processors Greg Kroah-Hartman
2012-11-30 18:55 ` [ 12/56] rtlwifi: rtl8192cu: Add new USB ID Greg Kroah-Hartman
2012-11-30 18:55 ` [ 13/56] mwifiex: report error to MMC core if we cannot suspend Greg Kroah-Hartman
2012-11-30 18:55 ` [ 14/56] mwifiex: fix system hang issue in cmd timeout error case Greg Kroah-Hartman
2012-11-30 18:55 ` [ 15/56] SCSI: isci: copy fis 0x34 response into proper buffer Greg Kroah-Hartman
2012-11-30 18:55 ` [ 16/56] drm/radeon: add new SI pci id Greg Kroah-Hartman
2012-11-30 18:55 ` [ 17/56] ALSA: ua101, usx2y: fix broken MIDI output Greg Kroah-Hartman
2012-11-30 18:55 ` [ 18/56] ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker Greg Kroah-Hartman
2012-11-30 18:55 ` [ 19/56] PARISC: fix virtual aliasing issue in get_shared_area() Greg Kroah-Hartman
2012-11-30 18:55 ` [ 20/56] PARISC: fix user-triggerable panic on parisc Greg Kroah-Hartman
2012-11-30 18:55 ` [ 21/56] mtd: slram: invalid checking of absolute end address Greg Kroah-Hartman
2012-11-30 18:55 ` [ 22/56] mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions() Greg Kroah-Hartman
2012-11-30 18:55 ` [ 23/56] jffs2: Fix lock acquisition order bug in jffs2_write_begin Greg Kroah-Hartman
2012-11-30 18:55 ` [ 24/56] md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock Greg Kroah-Hartman
2012-11-30 18:55 ` [ 25/56] md: Avoid write invalid address if read_seqretry returned true Greg Kroah-Hartman
2012-11-30 18:55 ` [ 26/56] md/raid10: decrement correct pending counter when writing to replacement Greg Kroah-Hartman
2012-11-30 18:55 ` [ 27/56] dm: fix deadlock with request based dm and queue request_fn recursion Greg Kroah-Hartman
2012-11-30 18:55 ` [ 28/56] futex: avoid wake_futex() for a PI futex_q Greg Kroah-Hartman
2012-11-30 18:55 ` [ 29/56] mac80211: deinitialize ibss-internals after emptiness check Greg Kroah-Hartman
2012-11-30 18:55 ` [ 30/56] radeon: add AGPMode 1 quirk for RV250 Greg Kroah-Hartman
2012-11-30 18:55 ` [ 31/56] can: peak_usb: fix hwtstamp assignment Greg Kroah-Hartman
2012-11-30 18:55 ` [ 32/56] can: bcm: initialize ifindex for timeouts without previous frame reception Greg Kroah-Hartman
2012-11-30 18:55 ` [ 33/56] jbd: Fix lock ordering bug in journal_unmap_buffer() Greg Kroah-Hartman
2012-11-30 18:55 ` [ 34/56] sparc64: not any error from do_sigaltstack() should fail rt_sigreturn() Greg Kroah-Hartman
2012-11-30 18:55 ` [ 35/56] PM / QoS: fix wrong error-checking condition Greg Kroah-Hartman
2012-11-30 18:55 ` [ 36/56] ALSA: hda - Add new codec ALC283 ALC290 support Greg Kroah-Hartman
2012-11-30 18:55 ` [ 37/56] ALSA: hda - Fix missing beep on ASUS X43U notebook Greg Kroah-Hartman
2012-11-30 18:55 ` [ 38/56] ALSA: hda - Add support for Realtek ALC292 Greg Kroah-Hartman
2012-11-30 18:55 ` [ 39/56] bas_gigaset: fix pre_reset handling Greg Kroah-Hartman
2012-11-30 18:55 ` [ 40/56] scsi: Silence unnecessary warnings about ioctl to partition Greg Kroah-Hartman
2012-11-30 18:55 ` [ 41/56] KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) Greg Kroah-Hartman
2012-11-30 18:55 ` [ 42/56] ixgbe: add support for X540-AT1 Greg Kroah-Hartman
2012-11-30 18:55 ` [ 43/56] sata_svw: check DMA start bit before reset Greg Kroah-Hartman
2012-11-30 18:55 ` [ 44/56] get_dvb_firmware: fix download site for tda10046 firmware Greg Kroah-Hartman
2012-11-30 18:55 ` [ 45/56] NFC: pn533: Fix use after free Greg Kroah-Hartman
2012-11-30 18:55 ` [ 46/56] NFC: pn533: Fix mem leak in pn533_in_dep_link_up Greg Kroah-Hartman
2012-11-30 18:55 ` [ 47/56] NFC: Fix nfc_llcp_local chained list insertion Greg Kroah-Hartman
2012-11-30 18:55 ` [ 48/56] USB: mct_u232: fix broken close Greg Kroah-Hartman
2012-11-30 18:55 ` [ 49/56] watchdog: using u64 in get_sample_period() Greg Kroah-Hartman
2012-11-30 18:55 ` [ 50/56] MPI: Fix compilation on MIPS with GCC 4.4 and newer Greg Kroah-Hartman
2012-11-30 18:55 ` [ 51/56] powerpc/eeh: Lock module while handling EEH event Greg Kroah-Hartman
2012-11-30 18:55 ` [ 52/56] mmc: sdhci-s3c: fix the wrong number of max bus clocks Greg Kroah-Hartman
2012-11-30 18:55 ` [ 53/56] ARM: OMAP: counter: add locking to read_persistent_clock Greg Kroah-Hartman
2012-11-30 18:55 ` [ 54/56] timekeeping: Cast raw_interval to u64 to avoid shift overflow Greg Kroah-Hartman
2012-11-30 18:55 ` [ 55/56] net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx() Greg Kroah-Hartman
2012-11-30 18:55 ` [ 56/56] iwlwifi: fix 6000 series channel switch command Greg Kroah-Hartman
2012-12-01 15:35 ` [ 00/56] 3.4.21-stable review Satoru Takeuchi
2012-12-02  2:08   ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).