* [ 00/62] 3.4.15-stable review
@ 2012-10-19 2:44 Greg Kroah-Hartman
2012-10-19 2:44 ` [ 01/62] ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels Greg Kroah-Hartman
` (61 more replies)
0 siblings, 62 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 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.15 release.
There are 62 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 Oct 21 02:42:38 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.15-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Maxim Kachur <mcdebugger@duganet.ru>
ALSA: emu10k1: add chip details for E-mu 1010 PCIe card
Takashi Iwai <tiwai@suse.de>
ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
Peter Ujfalusi <peter.ujfalusi@ti.com>
ASoC: omap-abe-twl6040: Fix typo of Vibrator
Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm2200: Fix non-inverted OUT2 mute control
Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm2200: Use rev A register patches on rev B
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
ASoC: fsi: don't reschedule DMA from an atomic context
David Henningsson <david.henningsson@canonical.com>
ALSA: hda - Always check array bounds in alc_get_line_out_pfx
Fabio Porcedda <fabio.porcedda@gmail.com>
usb: gadget: at91_udc: fix dt support
Tyler Hicks <tyhicks@canonical.com>
eCryptfs: Call lower ->flush() from ecryptfs_flush()
Tyler Hicks <tyhicks@canonical.com>
eCryptfs: Write out all dirty pages just before releasing the lower file
Tyler Hicks <tyhicks@canonical.com>
eCryptfs: Revert to a writethrough cache model
Tyler Hicks <tyhicks@canonical.com>
eCryptfs: Initialize empty lower files when opening them
Tyler Hicks <tyhicks@canonical.com>
eCryptfs: Unlink lower inode when ecryptfs_create() fails
Peter Huewe <peter.huewe@infineon.com>
tpm: Propagate error from tpm_transmit to fix a timeout hang
Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
e1000e: Change wthresh to 1 to avoid possible Tx stalls
Jan Kara <jack@suse.cz>
jbd: Fix assertion failure in commit code due to lacking transaction credits
Jani Nikula <jani.nikula@intel.com>
drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
Egbert Eich <eich@suse.de>
drm/radeon: Don't destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy().
Jean-Christian de Rivaz <jc@eclis.ch>
Add CDC-ACM support for the CX93010-2x UCMxx USB Modem
Jan Engelhardt <jengelh@inai.de>
netfilter: xt_limit: have r->cost != 0 case work
Florian Westphal <fw@strlen.de>
netfilter: limit, hashlimit: avoid duplicated inline
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nf_ct_expect: fix possible access to uninitialized timer
Patrick McHardy <kaber@trash.net>
netfilter: nf_nat_sip: fix via header translation with multiple parameters
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nf_nat_sip: fix incorrect handling of EBUSY for RTCP expectation
Lin Ming <mlin@ss.pku.edu.cn>
ipvs: fix oops on NAT reply in br_nf context
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
netfilter: ipset: timeout fixing bug broke SET target special timeout value
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
netfilter: ipset: fix timeout value overflow bug
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nf_conntrack: fix racy timer handling with reliable events
Julian Anastasov <ja@ssi.bg>
ipvs: fix oops in ip_vs_dst_event on rmmod
Amerigo Wang <amwang@redhat.com>
pktgen: fix crash when generating IPv6 packets
Jason Wessel <jason.wessel@windriver.com>
kdb,vt_console: Fix missed data due to pager overruns
Dan Carpenter <dan.carpenter@oracle.com>
md/raid10: use correct limit variable
Felix Fietkau <nbd@openwrt.org>
ath9k: use ieee80211_free_txskb
Hildner, Christian <christian.hildner@siemens.com>
timers: Fix endless looping between cascade() and internal_add_timer()
Daniel Drake <dsd@laptop.org>
viafb: don't touch clock state on OLPC XO-1.5
Alexander Holler <holler@ahsoftware.de>
video/udlfb: fix line counting in fb_write
Matthew Garrett <mjg59@srcf.ucam.org>
module: taint kernel when lve module is loaded
Ian Kent <raven@themaw.net>
autofs4 - fix reset pending flag on mount fail
Tejun Heo <tj@kernel.org>
block: fix request_queue->flags initialization
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/bootup: allow read_tscp call for Xen PV guests.
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/bootup: allow {read|write}_cr8 pvops call.
Peter Senna Tschudin <peter.senna@gmail.com>
target: fix return code in target_core_init_configfs error path
Trond Myklebust <Trond.Myklebust@netapp.com>
SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT
Stefan Richter <stefanr@s5r6.in-berlin.de>
firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)
Simon Horman <horms@verge.net.au>
ARM: 7541/1: Add ARM ERRATA 775420 workaround
Lukas Czerner <lczerner@redhat.com>
SCSI: scsi_debug: Fix off-by-one bug when unmapping region
K. Y. Srinivasan <kys@microsoft.com>
SCSI: storvsc: Account for in-transit packets in the RESET path
Nicholas Bellinger <nab@linux-iscsi.org>
iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values
Nicholas Bellinger <nab@linux-iscsi.org>
iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
Christoph Hellwig <hch@infradead.org>
iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
Nicholas Bellinger <nab@linux-iscsi.org>
iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU
Stephen M. Cameron <scameron@beardog.cce.hp.com>
SCSI: hpsa: dial down lockup detection during firmware flash
Hugh Dickins <hughd@google.com>
tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking
Jason Wessel <jason.wessel@windriver.com>
mips,kgdb: fix recursive page fault with CONFIG_KPROBES
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
David Henningsson <david.henningsson@canonical.com>
ALSA: hda - do not detect jack on internal speakers for Realtek
Feng Tang <feng.tang@intel.com>
ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop
Feng Tang <feng.tang@intel.com>
ACPI: EC: Make the GPE storm threshold a module parameter
Stanislav Kinsbursky <skinsbursky@parallels.com>
lockd: use rpc client's cl_nodename for id encoding
Malahal Naineni <malahal@us.ibm.com>
NFSD: pass null terminated buf to kstrtouint()
J. Bruce Fields <bfields@redhat.com>
nfsd4: fix nfs4 stateid leak
Russell King <rmk+kernel@arm.linux.org.uk>
ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels
-------------
Diffstat:
Makefile | 4 ++--
arch/arm/Kconfig | 10 ++++++++
arch/arm/include/asm/vfpmacros.h | 4 ++--
arch/arm/mm/cache-v7.S | 3 +++
arch/mips/kernel/kgdb.c | 9 ++++++++
arch/x86/xen/enlighten.c | 18 ++++++++++++++-
block/blk-core.c | 2 +-
drivers/acpi/ec.c | 30 ++++++++++++++++++++----
drivers/char/tpm/tpm.c | 21 +++++++++++------
drivers/firewire/core-cdev.c | 4 ++--
drivers/gpu/drm/i915/intel_display.c | 4 ++--
drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 6 +----
drivers/md/raid10.c | 2 +-
drivers/net/ethernet/intel/e1000e/e1000.h | 6 ++---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
drivers/net/wireless/ath/ath9k/beacon.c | 2 +-
drivers/net/wireless/ath/ath9k/main.c | 2 +-
drivers/net/wireless/ath/ath9k/xmit.c | 53 +++++++++++++++++++++++-------------------
drivers/scsi/hpsa.c | 39 +++++++++++++++++++++++++++----
drivers/scsi/hpsa.h | 2 ++
drivers/scsi/hpsa_cmd.h | 1 +
drivers/scsi/scsi_debug.c | 2 +-
drivers/scsi/storvsc_drv.c | 5 ++++
drivers/target/iscsi/iscsi_target.c | 2 +-
drivers/target/iscsi/iscsi_target_core.h | 4 ++--
drivers/target/iscsi/iscsi_target_tpg.c | 12 ++++++++++
drivers/target/target_core_configfs.c | 8 ++++++-
drivers/tty/vt/vt.c | 13 +++++++++++
drivers/usb/class/cdc-acm.c | 3 +++
drivers/usb/gadget/at91_udc.c | 2 +-
drivers/video/udlfb.c | 2 +-
drivers/video/via/via_clock.c | 19 +++++++++++++++
fs/autofs4/root.c | 6 +++--
fs/ceph/export.c | 18 +++++++++++----
fs/ecryptfs/ecryptfs_kernel.h | 2 ++
fs/ecryptfs/file.c | 100 ++++++++++++++++++++++++++++++++++++++-----------------------------------------
fs/ecryptfs/inode.c | 65 ++++++++++++++++++++++++++-------------------------
fs/ecryptfs/main.c | 1 +
fs/ecryptfs/mmap.c | 39 +++++++++++--------------------
fs/gfs2/export.c | 4 ++++
fs/isofs/export.c | 2 +-
fs/jbd/commit.c | 45 +++++++++++++++++++++++++++---------
fs/jbd/transaction.c | 64 ++++++++++++++++++++++++++++++++++----------------
fs/lockd/mon.c | 4 +++-
fs/nfsd/nfs4idmap.c | 2 +-
fs/nfsd/nfs4state.c | 1 +
fs/reiserfs/inode.c | 6 ++++-
fs/xfs/xfs_export.c | 3 +++
include/linux/netfilter/ipset/ip_set_timeout.h | 4 ++++
include/net/ip_vs.h | 2 +-
include/net/netfilter/nf_conntrack_ecache.h | 1 +
kernel/debug/kdb/kdb_io.c | 33 ++++++++++++++++++++++----
kernel/module.c | 4 ++++
kernel/timer.c | 10 ++++----
mm/shmem.c | 6 +++--
net/core/pktgen.c | 2 +-
net/ipv4/netfilter/nf_nat_sip.c | 10 +++++---
net/netfilter/ipvs/ip_vs_ctl.c | 5 ++--
net/netfilter/nf_conntrack_core.c | 16 +++++++++----
net/netfilter/nf_conntrack_expect.c | 29 +++++------------------
net/netfilter/xt_hashlimit.c | 8 +++----
net/netfilter/xt_limit.c | 13 +++++------
net/netfilter/xt_set.c | 17 ++++++++++++--
net/sunrpc/xprtsock.c | 21 +++++++++++++----
sound/pci/ac97/ac97_codec.c | 2 ++
sound/pci/emu10k1/emu10k1_main.c | 9 ++++++++
sound/pci/hda/patch_cirrus.c | 6 ++---
sound/pci/hda/patch_realtek.c | 6 ++++-
sound/soc/codecs/wm2200.c | 3 ++-
sound/soc/omap/omap-abe-twl6040.c | 2 +-
sound/soc/sh/fsi.c | 15 ++++++------
71 files changed, 584 insertions(+), 298 deletions(-)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 01/62] ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 02/62] nfsd4: fix nfs4 stateid leak Greg Kroah-Hartman
` (60 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Michael Olbrich, Russell King
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Russell King <rmk+kernel@arm.linux.org.uk>
commit 846a136881b8f73c1f74250bf6acfaa309cab1f2 upstream.
Michael Olbrich reported that his test program fails when built with
-O2 -mcpu=cortex-a8 -mfpu=neon, and a kernel which supports v6 and v7
CPUs:
volatile int x = 2;
volatile int64_t y = 2;
int main() {
volatile int a = 0;
volatile int64_t b = 0;
while (1) {
a = (a + x) % (1 << 30);
b = (b + y) % (1 << 30);
assert(a == b);
}
}
and two instances are run. When built for just v7 CPUs, this program
works fine. It uses the "vadd.i64 d19, d18, d16" VFP instruction.
It appears that we do not save the high-16 double VFP registers across
context switches when the kernel is built for v6 CPUs. Fix that.
Tested-By: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/include/asm/vfpmacros.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/include/asm/vfpmacros.h
+++ b/arch/arm/include/asm/vfpmacros.h
@@ -28,7 +28,7 @@
ldr \tmp, =elf_hwcap @ may not have MVFR regs
ldr \tmp, [\tmp, #0]
tst \tmp, #HWCAP_VFPv3D16
- ldceq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31}
+ ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31}
addne \base, \base, #32*4 @ step over unused register space
#else
VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
@@ -52,7 +52,7 @@
ldr \tmp, =elf_hwcap @ may not have MVFR regs
ldr \tmp, [\tmp, #0]
tst \tmp, #HWCAP_VFPv3D16
- stceq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31}
+ stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31}
addne \base, \base, #32*4 @ step over unused register space
#else
VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 02/62] nfsd4: fix nfs4 stateid leak
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
2012-10-19 2:44 ` [ 01/62] ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 03/62] NFSD: pass null terminated buf to kstrtouint() Greg Kroah-Hartman
` (59 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Cyril B., J. Bruce Fields
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: "J. Bruce Fields" <bfields@redhat.com>
commit cf9182e90b2af04245ac4fae497fe73fc71285b4 upstream.
Processes that open and close multiple files may end up setting this
oo_last_closed_stid without freeing what was previously pointed to.
This can result in a major leak, visible for example by watching the
nfsd4_stateids line of /proc/slabinfo.
Reported-by: Cyril B. <cbay@excellency.fr>
Tested-by: Cyril B. <cbay@excellency.fr>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/nfsd/nfs4state.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3783,6 +3783,7 @@ nfsd4_close(struct svc_rqst *rqstp, stru
memcpy(&close->cl_stateid, &stp->st_stid.sc_stateid, sizeof(stateid_t));
nfsd4_close_open_stateid(stp);
+ release_last_closed_stateid(oo);
oo->oo_last_closed_stid = stp;
/* place unused nfs4_stateowners on so_close_lru list to be
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 03/62] NFSD: pass null terminated buf to kstrtouint()
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
2012-10-19 2:44 ` [ 01/62] ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels Greg Kroah-Hartman
2012-10-19 2:44 ` [ 02/62] nfsd4: fix nfs4 stateid leak Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 04/62] lockd: use rpc clients cl_nodename for id encoding Greg Kroah-Hartman
` (58 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Malahal Naineni, J. Bruce Fields
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malahal Naineni <malahal@us.ibm.com>
commit 9959ba0c241a71c7ed8133401cfbbee2720da0b5 upstream.
The 'buf' is prepared with null termination with intention of using it for
this purpose, but 'name' is passed instead!
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/nfsd/nfs4idmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -581,7 +581,7 @@ numeric_name_to_id(struct svc_rqst *rqst
/* Just to make sure it's null-terminated: */
memcpy(buf, name, namelen);
buf[namelen] = '\0';
- ret = kstrtouint(name, 10, id);
+ ret = kstrtouint(buf, 10, id);
return ret == 0;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 04/62] lockd: use rpc clients cl_nodename for id encoding
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2012-10-19 2:44 ` [ 03/62] NFSD: pass null terminated buf to kstrtouint() Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 05/62] ACPI: EC: Make the GPE storm threshold a module parameter Greg Kroah-Hartman
` (57 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Stanislav Kinsbursky, Trond Myklebust
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
commit 303a7ce92064c285a04c870f2dc0192fdb2968cb upstream.
Taking hostname from uts namespace if not safe, because this cuold be
performind during umount operation on child reaper death. And in this case
current->nsproxy is NULL already.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/lockd/mon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -40,6 +40,7 @@ struct nsm_args {
u32 proc;
char *mon_name;
+ char *nodename;
};
struct nsm_res {
@@ -94,6 +95,7 @@ static int nsm_mon_unmon(struct nsm_hand
.vers = 3,
.proc = NLMPROC_NSM_NOTIFY,
.mon_name = nsm->sm_mon_name,
+ .nodename = utsname()->nodename,
};
struct rpc_message msg = {
.rpc_argp = &args,
@@ -430,7 +432,7 @@ static void encode_my_id(struct xdr_stre
{
__be32 *p;
- encode_nsm_string(xdr, utsname()->nodename);
+ encode_nsm_string(xdr, argp->nodename);
p = xdr_reserve_space(xdr, 4 + 4 + 4);
*p++ = cpu_to_be32(argp->prog);
*p++ = cpu_to_be32(argp->vers);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 05/62] ACPI: EC: Make the GPE storm threshold a module parameter
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2012-10-19 2:44 ` [ 04/62] lockd: use rpc clients cl_nodename for id encoding Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 06/62] ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop Greg Kroah-Hartman
` (56 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Feng Tang, Len Brown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Feng Tang <feng.tang@intel.com>
commit a520d52e99b14ba7db135e916348f12f2a6e09be upstream.
The Linux EC driver includes a mechanism to detect GPE storms,
and switch from interrupt-mode to polling mode. However, polling
mode sometimes doesn't work, so the workaround is problematic.
Also, different systems seem to need the threshold for detecting
the GPE storm at different levels.
ACPI_EC_STORM_THRESHOLD was initially 20 when it's created, and
was changed to 8 in 2.6.28 commit 06cf7d3c7 "ACPI: EC: lower interrupt storm
threshold" to fix kernel bug 11892 by forcing the laptop in that bug to
work in polling mode. However in bug 45151, it works fine in interrupt
mode if we lift the threshold back to 20.
This patch makes the threshold a module parameter so that user has a
flexible option to debug/workaround this issue.
The default is unchanged.
This is also a preparation patch to fix specific systems:
https://bugzilla.kernel.org/show_bug.cgi?id=45151
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/acpi/ec.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -71,9 +71,6 @@ enum ec_command {
#define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */
#define ACPI_EC_MSI_UDELAY 550 /* Wait 550us for MSI EC */
-#define ACPI_EC_STORM_THRESHOLD 8 /* number of false interrupts
- per one transaction */
-
enum {
EC_FLAGS_QUERY_PENDING, /* Query is pending */
EC_FLAGS_GPE_STORM, /* GPE storm detected */
@@ -87,6 +84,15 @@ static unsigned int ec_delay __read_most
module_param(ec_delay, uint, 0644);
MODULE_PARM_DESC(ec_delay, "Timeout(ms) waited until an EC command completes");
+/*
+ * If the number of false interrupts per one transaction exceeds
+ * this threshold, will think there is a GPE storm happened and
+ * will disable the GPE for normal transaction.
+ */
+static unsigned int ec_storm_threshold __read_mostly = 8;
+module_param(ec_storm_threshold, uint, 0644);
+MODULE_PARM_DESC(ec_storm_threshold, "Maxim false GPE numbers not considered as GPE storm");
+
/* If we find an EC via the ECDT, we need to keep a ptr to its context */
/* External interfaces use first EC only, so remember */
typedef int (*acpi_ec_query_func) (void *data);
@@ -319,7 +325,7 @@ static int acpi_ec_transaction(struct ac
msleep(1);
/* It is safe to enable the GPE outside of the transaction. */
acpi_enable_gpe(NULL, ec->gpe);
- } else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) {
+ } else if (t->irq_count > ec_storm_threshold) {
pr_info(PREFIX "GPE storm detected, "
"transactions will use polling mode\n");
set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 06/62] ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2012-10-19 2:44 ` [ 05/62] ACPI: EC: Make the GPE storm threshold a module parameter Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 07/62] ALSA: hda - do not detect jack on internal speakers for Realtek Greg Kroah-Hartman
` (55 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Feng Tang, Len Brown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Feng Tang <feng.tang@intel.com>
commit 67bfa9b60bd689601554526d144b21d529f78a09 upstream.
By enlarging the GPE storm threshold back to 20, that laptop's
EC works fine with interrupt mode instead of polling mode.
https://bugzilla.kernel.org/show_bug.cgi?id=45151
Reported-and-Tested-by: Francesco <trentini@dei.unipd.it>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/acpi/ec.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -930,6 +930,17 @@ static int ec_flag_msi(const struct dmi_
return 0;
}
+/*
+ * Clevo M720 notebook actually works ok with IRQ mode, if we lifted
+ * the GPE storm threshold back to 20
+ */
+static int ec_enlarge_storm_threshold(const struct dmi_system_id *id)
+{
+ pr_debug("Setting the EC GPE storm threshold to 20\n");
+ ec_storm_threshold = 20;
+ return 0;
+}
+
static struct dmi_system_id __initdata ec_dmi_table[] = {
{
ec_skip_dsdt_scan, "Compal JFL92", {
@@ -961,10 +972,13 @@ static struct dmi_system_id __initdata e
{
ec_validate_ecdt, "ASUS hardware", {
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc.") }, NULL},
+ {
+ ec_enlarge_storm_threshold, "CLEVO hardware", {
+ DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M720T/M730T"),}, NULL},
{},
};
-
int __init acpi_ec_ecdt_probe(void)
{
acpi_status status;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 07/62] ALSA: hda - do not detect jack on internal speakers for Realtek
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2012-10-19 2:44 ` [ 06/62] ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 08/62] ALSA: hda - Fix memory leaks at error path in patch_cirrus.c Greg Kroah-Hartman
` (54 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Da Fox, 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 f7f4b2322bf7b8c5929b7eb5a667091f32592580 upstream.
This caused the internal speaker to mute itself because it was
present, which happened after powersave.
It was found on Dell XPS 15 (L502x), ALC665.
Reported-by: Da Fox <da.fox.mail@gmail.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 | 2 ++
1 file changed, 2 insertions(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -602,6 +602,8 @@ static void alc_line_automute(struct hda
{
struct alc_spec *spec = codec->spec;
+ if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT)
+ return;
/* check LO jack only when it's different from HP */
if (spec->autocfg.line_out_pins[0] == spec->autocfg.hp_pins[0])
return;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 08/62] ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2012-10-19 2:44 ` [ 07/62] ALSA: hda - do not detect jack on internal speakers for Realtek Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 09/62] mips,kgdb: fix recursive page fault with CONFIG_KPROBES Greg Kroah-Hartman
` (53 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Takashi Iwai
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit c5e0b6dbad9b4d18c561af90b384d02373f1c994 upstream.
The proper destructor should be called at the error path.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_cirrus.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -1427,7 +1427,7 @@ static int patch_cs420x(struct hda_codec
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}
@@ -1984,7 +1984,7 @@ static int patch_cs4210(struct hda_codec
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}
@@ -2009,7 +2009,7 @@ static int patch_cs4213(struct hda_codec
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 09/62] mips,kgdb: fix recursive page fault with CONFIG_KPROBES
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2012-10-19 2:44 ` [ 08/62] ALSA: hda - Fix memory leaks at error path in patch_cirrus.c Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 10/62] tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking Greg Kroah-Hartman
` (52 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Jason Wessel, Masami Hiramatsu,
David S. Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wessel <jason.wessel@windriver.com>
commit f0a996eeeda214f4293e234df33b29bec003b536 upstream.
This fault was detected using the kgdb test suite on boot and it
crashes recursively due to the fact that CONFIG_KPROBES on mips adds
an extra die notifier in the page fault handler. The crash signature
looks like this:
kgdbts:RUN bad memory access test
KGDB: re-enter exception: ALL breakpoints killed
Call Trace:
[<807b7548>] dump_stack+0x20/0x54
[<807b7548>] dump_stack+0x20/0x54
The fix for now is to have kgdb return immediately if the fault type
is DIE_PAGE_FAULT and allow the kprobe code to decide what is supposed
to happen.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/kernel/kgdb.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/arch/mips/kernel/kgdb.c
+++ b/arch/mips/kernel/kgdb.c
@@ -283,6 +283,15 @@ static int kgdb_mips_notify(struct notif
struct pt_regs *regs = args->regs;
int trap = (regs->cp0_cause & 0x7c) >> 2;
+#ifdef CONFIG_KPROBES
+ /*
+ * Return immediately if the kprobes fault notifier has set
+ * DIE_PAGE_FAULT.
+ */
+ if (cmd == DIE_PAGE_FAULT)
+ return NOTIFY_DONE;
+#endif /* CONFIG_KPROBES */
+
/* Userspace events, ignore. */
if (user_mode(regs))
return NOTIFY_DONE;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 10/62] tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2012-10-19 2:44 ` [ 09/62] mips,kgdb: fix recursive page fault with CONFIG_KPROBES Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 11/62] SCSI: hpsa: dial down lockup detection during firmware flash Greg Kroah-Hartman
` (51 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Sasha Levin, Hugh Dickins, Al Viro,
Sage Weil, Steven Whitehouse, Christoph Hellwig
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hugh Dickins <hughd@google.com>
commit 35c2a7f4908d404c9124c2efc6ada4640ca4d5d5 upstream.
Fuzzing with trinity oopsed on the 1st instruction of shmem_fh_to_dentry(),
u64 inum = fid->raw[2];
which is unhelpfully reported as at the end of shmem_alloc_inode():
BUG: unable to handle kernel paging request at ffff880061cd3000
IP: [<ffffffff812190d0>] shmem_alloc_inode+0x40/0x40
Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Call Trace:
[<ffffffff81488649>] ? exportfs_decode_fh+0x79/0x2d0
[<ffffffff812d77c3>] do_handle_open+0x163/0x2c0
[<ffffffff812d792c>] sys_open_by_handle_at+0xc/0x10
[<ffffffff83a5f3f8>] tracesys+0xe1/0xe6
Right, tmpfs is being stupid to access fid->raw[2] before validating that
fh_len includes it: the buffer kmalloc'ed by do_sys_name_to_handle() may
fall at the end of a page, and the next page not be present.
But some other filesystems (ceph, gfs2, isofs, reiserfs, xfs) are being
careless about fh_len too, in fh_to_dentry() and/or fh_to_parent(), and
could oops in the same way: add the missing fh_len checks to those.
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Sage Weil <sage@inktank.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ceph/export.c | 18 ++++++++++++++----
fs/gfs2/export.c | 4 ++++
fs/isofs/export.c | 2 +-
fs/reiserfs/inode.c | 6 +++++-
fs/xfs/xfs_export.c | 3 +++
mm/shmem.c | 6 ++++--
6 files changed, 31 insertions(+), 8 deletions(-)
--- a/fs/ceph/export.c
+++ b/fs/ceph/export.c
@@ -89,7 +89,7 @@ static int ceph_encode_fh(struct dentry
* FIXME: we should try harder by querying the mds for the ino.
*/
static struct dentry *__fh_to_dentry(struct super_block *sb,
- struct ceph_nfs_fh *fh)
+ struct ceph_nfs_fh *fh, int fh_len)
{
struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc;
struct inode *inode;
@@ -97,6 +97,9 @@ static struct dentry *__fh_to_dentry(str
struct ceph_vino vino;
int err;
+ if (fh_len < sizeof(*fh) / 4)
+ return ERR_PTR(-ESTALE);
+
dout("__fh_to_dentry %llx\n", fh->ino);
vino.ino = fh->ino;
vino.snap = CEPH_NOSNAP;
@@ -140,7 +143,7 @@ static struct dentry *__fh_to_dentry(str
* convert connectable fh to dentry
*/
static struct dentry *__cfh_to_dentry(struct super_block *sb,
- struct ceph_nfs_confh *cfh)
+ struct ceph_nfs_confh *cfh, int fh_len)
{
struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc;
struct inode *inode;
@@ -148,6 +151,9 @@ static struct dentry *__cfh_to_dentry(st
struct ceph_vino vino;
int err;
+ if (fh_len < sizeof(*cfh) / 4)
+ return ERR_PTR(-ESTALE);
+
dout("__cfh_to_dentry %llx (%llx/%x)\n",
cfh->ino, cfh->parent_ino, cfh->parent_name_hash);
@@ -197,9 +203,11 @@ static struct dentry *ceph_fh_to_dentry(
int fh_len, int fh_type)
{
if (fh_type == 1)
- return __fh_to_dentry(sb, (struct ceph_nfs_fh *)fid->raw);
+ return __fh_to_dentry(sb, (struct ceph_nfs_fh *)fid->raw,
+ fh_len);
else
- return __cfh_to_dentry(sb, (struct ceph_nfs_confh *)fid->raw);
+ return __cfh_to_dentry(sb, (struct ceph_nfs_confh *)fid->raw,
+ fh_len);
}
/*
@@ -220,6 +228,8 @@ static struct dentry *ceph_fh_to_parent(
if (fh_type == 1)
return ERR_PTR(-ESTALE);
+ if (fh_len < sizeof(*cfh) / 4)
+ return ERR_PTR(-ESTALE);
pr_debug("fh_to_parent %llx/%d\n", cfh->parent_ino,
cfh->parent_name_hash);
--- a/fs/gfs2/export.c
+++ b/fs/gfs2/export.c
@@ -168,6 +168,8 @@ static struct dentry *gfs2_fh_to_dentry(
case GFS2_SMALL_FH_SIZE:
case GFS2_LARGE_FH_SIZE:
case GFS2_OLD_FH_SIZE:
+ if (fh_len < GFS2_SMALL_FH_SIZE)
+ return NULL;
this.no_formal_ino = ((u64)be32_to_cpu(fh[0])) << 32;
this.no_formal_ino |= be32_to_cpu(fh[1]);
this.no_addr = ((u64)be32_to_cpu(fh[2])) << 32;
@@ -187,6 +189,8 @@ static struct dentry *gfs2_fh_to_parent(
switch (fh_type) {
case GFS2_LARGE_FH_SIZE:
case GFS2_OLD_FH_SIZE:
+ if (fh_len < GFS2_LARGE_FH_SIZE)
+ return NULL;
parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
parent.no_formal_ino |= be32_to_cpu(fh[5]);
parent.no_addr = ((u64)be32_to_cpu(fh[6])) << 32;
--- a/fs/isofs/export.c
+++ b/fs/isofs/export.c
@@ -179,7 +179,7 @@ static struct dentry *isofs_fh_to_parent
{
struct isofs_fid *ifid = (struct isofs_fid *)fid;
- if (fh_type != 2)
+ if (fh_len < 2 || fh_type != 2)
return NULL;
return isofs_export_iget(sb,
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -1573,8 +1573,10 @@ struct dentry *reiserfs_fh_to_dentry(str
reiserfs_warning(sb, "reiserfs-13077",
"nfsd/reiserfs, fhtype=%d, len=%d - odd",
fh_type, fh_len);
- fh_type = 5;
+ fh_type = fh_len;
}
+ if (fh_len < 2)
+ return NULL;
return reiserfs_get_dentry(sb, fid->raw[0], fid->raw[1],
(fh_type == 3 || fh_type >= 5) ? fid->raw[2] : 0);
@@ -1583,6 +1585,8 @@ struct dentry *reiserfs_fh_to_dentry(str
struct dentry *reiserfs_fh_to_parent(struct super_block *sb, struct fid *fid,
int fh_len, int fh_type)
{
+ if (fh_type > fh_len)
+ fh_type = fh_len;
if (fh_type < 4)
return NULL;
--- a/fs/xfs/xfs_export.c
+++ b/fs/xfs/xfs_export.c
@@ -195,6 +195,9 @@ xfs_fs_fh_to_parent(struct super_block *
struct xfs_fid64 *fid64 = (struct xfs_fid64 *)fid;
struct inode *inode = NULL;
+ if (fh_len < xfs_fileid_length(fileid_type))
+ return NULL;
+
switch (fileid_type) {
case FILEID_INO32_GEN_PARENT:
inode = xfs_nfs_get_inode(sb, fid->i32.parent_ino,
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2018,12 +2018,14 @@ static struct dentry *shmem_fh_to_dentry
{
struct inode *inode;
struct dentry *dentry = NULL;
- u64 inum = fid->raw[2];
- inum = (inum << 32) | fid->raw[1];
+ u64 inum;
if (fh_len < 3)
return NULL;
+ inum = fid->raw[2];
+ inum = (inum << 32) | fid->raw[1];
+
inode = ilookup5(sb, (unsigned long)(inum + fid->raw[0]),
shmem_match, fid->raw);
if (inode) {
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 11/62] SCSI: hpsa: dial down lockup detection during firmware flash
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2012-10-19 2:44 ` [ 10/62] tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 12/62] iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU Greg Kroah-Hartman
` (50 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Stephen M. Cameron, James Bottomley
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
commit e85c59746957fd6e3595d02cf614370056b5816e upstream.
Dial back the aggressiveness of the controller lockup detection thread.
Currently it will declare the controller to be locked up if it goes
for 10 seconds with no interrupts and no change in the heartbeat
register. Dial back this to 30 seconds with no heartbeat change, and
also snoop the ioctl path and if a firmware flash command is detected,
dial it back further to 4 minutes until the firmware flash command
completes. The reason for this is that during the firmware flash
operation, the controller apparently doesn't update the heartbeat
register as frequently as it is supposed to, and we can get a false
positive.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/hpsa.c | 39 ++++++++++++++++++++++++++++++++++-----
drivers/scsi/hpsa.h | 2 ++
drivers/scsi/hpsa_cmd.h | 1 +
3 files changed, 37 insertions(+), 5 deletions(-)
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -548,12 +548,42 @@ static void set_performant_mode(struct c
c->busaddr |= 1 | (h->blockFetchTable[c->Header.SGList] << 1);
}
+static int is_firmware_flash_cmd(u8 *cdb)
+{
+ return cdb[0] == BMIC_WRITE && cdb[6] == BMIC_FLASH_FIRMWARE;
+}
+
+/*
+ * During firmware flash, the heartbeat register may not update as frequently
+ * as it should. So we dial down lockup detection during firmware flash. and
+ * dial it back up when firmware flash completes.
+ */
+#define HEARTBEAT_SAMPLE_INTERVAL_DURING_FLASH (240 * HZ)
+#define HEARTBEAT_SAMPLE_INTERVAL (30 * HZ)
+static void dial_down_lockup_detection_during_fw_flash(struct ctlr_info *h,
+ struct CommandList *c)
+{
+ if (!is_firmware_flash_cmd(c->Request.CDB))
+ return;
+ atomic_inc(&h->firmware_flash_in_progress);
+ h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL_DURING_FLASH;
+}
+
+static void dial_up_lockup_detection_on_fw_flash_complete(struct ctlr_info *h,
+ struct CommandList *c)
+{
+ if (is_firmware_flash_cmd(c->Request.CDB) &&
+ atomic_dec_and_test(&h->firmware_flash_in_progress))
+ h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL;
+}
+
static void enqueue_cmd_and_start_io(struct ctlr_info *h,
struct CommandList *c)
{
unsigned long flags;
set_performant_mode(h, c);
+ dial_down_lockup_detection_during_fw_flash(h, c);
spin_lock_irqsave(&h->lock, flags);
addQ(&h->reqQ, c);
h->Qdepth++;
@@ -3049,6 +3079,7 @@ static inline int bad_tag(struct ctlr_in
static inline void finish_cmd(struct CommandList *c, u32 raw_tag)
{
removeQ(c);
+ dial_up_lockup_detection_on_fw_flash_complete(c->h, c);
if (likely(c->cmd_type == CMD_SCSI))
complete_scsi_command(c);
else if (c->cmd_type == CMD_IOCTL_PEND)
@@ -4189,9 +4220,6 @@ static void controller_lockup_detected(s
spin_unlock_irqrestore(&h->lock, flags);
}
-#define HEARTBEAT_SAMPLE_INTERVAL (10 * HZ)
-#define HEARTBEAT_CHECK_MINIMUM_INTERVAL (HEARTBEAT_SAMPLE_INTERVAL / 2)
-
static void detect_controller_lockup(struct ctlr_info *h)
{
u64 now;
@@ -4202,7 +4230,7 @@ static void detect_controller_lockup(str
now = get_jiffies_64();
/* If we've received an interrupt recently, we're ok. */
if (time_after64(h->last_intr_timestamp +
- (HEARTBEAT_CHECK_MINIMUM_INTERVAL), now))
+ (h->heartbeat_sample_interval), now))
return;
/*
@@ -4211,7 +4239,7 @@ static void detect_controller_lockup(str
* otherwise don't care about signals in this thread.
*/
if (time_after64(h->last_heartbeat_timestamp +
- (HEARTBEAT_CHECK_MINIMUM_INTERVAL), now))
+ (h->heartbeat_sample_interval), now))
return;
/* If heartbeat has not changed since we last looked, we're not ok. */
@@ -4253,6 +4281,7 @@ static void add_ctlr_to_lockup_detector_
{
unsigned long flags;
+ h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL;
spin_lock_irqsave(&lockup_detector_lock, flags);
list_add_tail(&h->lockup_list, &hpsa_ctlr_list);
spin_unlock_irqrestore(&lockup_detector_lock, flags);
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -123,6 +123,8 @@ struct ctlr_info {
u64 last_intr_timestamp;
u32 last_heartbeat;
u64 last_heartbeat_timestamp;
+ u32 heartbeat_sample_interval;
+ atomic_t firmware_flash_in_progress;
u32 lockup_detected;
struct list_head lockup_list;
};
--- a/drivers/scsi/hpsa_cmd.h
+++ b/drivers/scsi/hpsa_cmd.h
@@ -162,6 +162,7 @@ struct SenseSubsystem_info {
#define BMIC_WRITE 0x27
#define BMIC_CACHE_FLUSH 0xc2
#define HPSA_CACHE_FLUSH 0x01 /* C2 was already being used by HPSA */
+#define BMIC_FLASH_FIRMWARE 0xF7
/* Command List Structure */
union SCSI3Addr {
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 12/62] iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (10 preceding siblings ...)
2012-10-19 2:44 ` [ 11/62] SCSI: hpsa: dial down lockup detection during firmware flash Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 13/62] iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp Greg Kroah-Hartman
` (49 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Ronnie Sahlberg, Nicholas Bellinger
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicholas Bellinger <nab@linux-iscsi.org>
commit f25590f39d543272f7ae7b00d533359c8d7ff331 upstream.
This patch adds a missing iscsi_reject->ffffffff assignment within
iscsit_send_reject() code to properly follow RFC-3720 Section 10.17
Bytes 16 -> 19 for the PDU format definition of ISCSI_OP_REJECT.
We've not seen any initiators care about this bytes in practice, but
as Ronnie reported this was causing trouble with wireshark packet
decoding lets go ahead and fix this up now.
Reported-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/iscsi/iscsi_target.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3349,6 +3349,7 @@ static int iscsit_send_reject(
hdr->opcode = ISCSI_OP_REJECT;
hdr->flags |= ISCSI_FLAG_CMD_FINAL;
hton24(hdr->dlength, ISCSI_HDR_LEN);
+ hdr->ffffffff = 0xffffffff;
cmd->stat_sn = conn->stat_sn++;
hdr->statsn = cpu_to_be32(cmd->stat_sn);
hdr->exp_cmdsn = cpu_to_be32(conn->sess->exp_cmd_sn);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 13/62] iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (11 preceding siblings ...)
2012-10-19 2:44 ` [ 12/62] iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 14/62] iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode Greg Kroah-Hartman
` (48 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Christoph Hellwig, Nicholas Bellinger
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@infradead.org>
commit 904753da183566c71211d23c169a80184648c121 upstream.
Fix a potential multiple spin-unlock -> deadlock scenario during the
overflow check within iscsit_build_sendtargets_resp() as found by
sparse static checking.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/iscsi/iscsi_target.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3196,7 +3196,6 @@ static int iscsit_build_sendtargets_resp
len += 1;
if ((len + payload_len) > buffer_len) {
- spin_unlock(&tiqn->tiqn_tpg_lock);
end_of_buf = 1;
goto eob;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 14/62] iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (12 preceding siblings ...)
2012-10-19 2:44 ` [ 13/62] iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 15/62] iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values Greg Kroah-Hartman
` (47 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Ronnie Sahlberg, Nicholas Bellinger
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicholas Bellinger <nab@linux-iscsi.org>
commit 38b11bae6ba02da352340aff12ee25755977b222 upstream.
We've had reports in the past about this specific case, so it's time to
go ahead and explicitly set cache_dynamic_acls=1 for generate_node_acls=1
(TPG demo-mode) operation.
During normal generate_node_acls=0 operation with explicit NodeACLs ->
se_node_acl memory is persistent to the configfs group located at
/sys/kernel/config/target/$TARGETNAME/$TPGT/acls/$INITIATORNAME, so in
the generate_node_acls=1 case we want the reservation logic to reference
existing per initiator IQN se_node_acl memory (not to generate a new
se_node_acl), so go ahead and always set cache_dynamic_acls=1 when
TPG demo-mode is enabled.
Reported-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/iscsi/iscsi_target_tpg.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/drivers/target/iscsi/iscsi_target_tpg.c
+++ b/drivers/target/iscsi/iscsi_target_tpg.c
@@ -672,6 +672,12 @@ int iscsit_ta_generate_node_acls(
pr_debug("iSCSI_TPG[%hu] - Generate Initiator Portal Group ACLs: %s\n",
tpg->tpgt, (a->generate_node_acls) ? "Enabled" : "Disabled");
+ if (flag == 1 && a->cache_dynamic_acls == 0) {
+ pr_debug("Explicitly setting cache_dynamic_acls=1 when "
+ "generate_node_acls=1\n");
+ a->cache_dynamic_acls = 1;
+ }
+
return 0;
}
@@ -711,6 +717,12 @@ int iscsit_ta_cache_dynamic_acls(
return -EINVAL;
}
+ if (a->generate_node_acls == 1 && flag == 0) {
+ pr_debug("Skipping cache_dynamic_acls=0 when"
+ " generate_node_acls=1\n");
+ return 0;
+ }
+
a->cache_dynamic_acls = flag;
pr_debug("iSCSI_TPG[%hu] - Cache Dynamic Initiator Portal Group"
" ACLs %s\n", tpg->tpgt, (a->cache_dynamic_acls) ?
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 15/62] iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (13 preceding siblings ...)
2012-10-19 2:44 ` [ 14/62] iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 16/62] SCSI: storvsc: Account for in-transit packets in the RESET path Greg Kroah-Hartman
` (46 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Nicholas Bellinger, Christoph Hellwig,
Andy Grover, Mike Christie, Hannes Reinecke
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicholas Bellinger <nab@linux-iscsi.org>
commit cf0eb28d3ba60098865bf7dbcbfdd6b1cc483e3b upstream.
This patch increases the default for nopin_timeout to 15 seconds (wait
between sending a new NopIN ping) and nopin_response_timeout to 30 seconds
(wait for NopOUT response before failing the connection) in order to avoid
false positives by iSCSI Initiators who are not always able (under load) to
respond to NopIN echo PING requests within the current 5 second window.
False positives have been observed recently using Open-iSCSI code on v3.3.x
with heavy large-block READ workloads over small MTU 1 Gb/sec ports, and
increasing these values to more reasonable defaults significantly reduces
the possibility of false positive NopIN response timeout events under
this specific workload.
Historically these have been set low to initiate connection recovery as
soon as possible if we don't hear a ping back, but for modern v3.x code
on 1 -> 10 Gb/sec ports these new defaults make alot more sense.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/iscsi/iscsi_target_core.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/target/iscsi/iscsi_target_core.h
+++ b/drivers/target/iscsi/iscsi_target_core.h
@@ -25,10 +25,10 @@
#define NA_DATAOUT_TIMEOUT_RETRIES 5
#define NA_DATAOUT_TIMEOUT_RETRIES_MAX 15
#define NA_DATAOUT_TIMEOUT_RETRIES_MIN 1
-#define NA_NOPIN_TIMEOUT 5
+#define NA_NOPIN_TIMEOUT 15
#define NA_NOPIN_TIMEOUT_MAX 60
#define NA_NOPIN_TIMEOUT_MIN 3
-#define NA_NOPIN_RESPONSE_TIMEOUT 5
+#define NA_NOPIN_RESPONSE_TIMEOUT 30
#define NA_NOPIN_RESPONSE_TIMEOUT_MAX 60
#define NA_NOPIN_RESPONSE_TIMEOUT_MIN 3
#define NA_RANDOM_DATAIN_PDU_OFFSETS 0
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 16/62] SCSI: storvsc: Account for in-transit packets in the RESET path
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (14 preceding siblings ...)
2012-10-19 2:44 ` [ 15/62] iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 17/62] SCSI: scsi_debug: Fix off-by-one bug when unmapping region Greg Kroah-Hartman
` (45 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, K. Y. Srinivasan, James Bottomley
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: "K. Y. Srinivasan" <kys@microsoft.com>
commit 5c1b10ab7f93d24f29b5630286e323d1c5802d5c upstream.
Properly account for I/O in transit before returning from the RESET call.
In the absense of this patch, we could have a situation where the host may
respond to a command that was issued prior to the issuance of the RESET
command at some arbitrary time after responding to the RESET command.
Currently, the host does not do anything with the RESET command.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/storvsc_drv.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1211,7 +1211,12 @@ static int storvsc_host_reset_handler(st
/*
* At this point, all outstanding requests in the adapter
* should have been flushed out and return to us
+ * There is a potential race here where the host may be in
+ * the process of responding when we return from here.
+ * Just wait for all in-transit packets to be accounted for
+ * before we return from here.
*/
+ storvsc_wait_to_drain(stor_device);
return SUCCESS;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 17/62] SCSI: scsi_debug: Fix off-by-one bug when unmapping region
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (15 preceding siblings ...)
2012-10-19 2:44 ` [ 16/62] SCSI: storvsc: Account for in-transit packets in the RESET path Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 18/62] ARM: 7541/1: Add ARM ERRATA 775420 workaround Greg Kroah-Hartman
` (44 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Paolo Bonzini, Lukas Czerner,
Martin K. Petersen, Douglas Gilbert, James Bottomley
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Czerner <lczerner@redhat.com>
commit bc977749e967daa56de1922cf4cb38525631c51c upstream.
Currently it is possible to unmap one more block than user requested to
due to the off-by-one error in unmap_region(). This is probably due to
the fact that the end variable despite its name actually points to the
last block to unmap + 1. However in the condition it is handled as the
last block of the region to unmap.
The bug was not previously spotted probably due to the fact that the
region was not zeroed, which has changed with commit
be1dd78de5686c062bb3103f9e86d444a10ed783. With that commit we were able
to corrupt the ext4 file system on 256M scsi_debug device with LBPRZ
enabled using fstrim.
Since the 'end' semantic is the same in several functions there this
commit just fixes the condition to use the 'end' variable correctly in
that context.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/scsi_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2054,7 +2054,7 @@ static void unmap_region(sector_t lba, u
block = lba + alignment;
rem = do_div(block, granularity);
- if (rem == 0 && lba + granularity <= end && block < map_size) {
+ if (rem == 0 && lba + granularity < end && block < map_size) {
clear_bit(block, map_storep);
if (scsi_debug_lbprz)
memset(fake_storep +
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 18/62] ARM: 7541/1: Add ARM ERRATA 775420 workaround
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (16 preceding siblings ...)
2012-10-19 2:44 ` [ 17/62] SCSI: scsi_debug: Fix off-by-one bug when unmapping region Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 19/62] firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel) Greg Kroah-Hartman
` (43 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Kouei Abe, Catalin Marinas,
Simon Horman, Russell King
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Horman <horms@verge.net.au>
commit 7253b85cc62d6ff84143d96fe6cd54f73736f4d7 upstream.
arm: Add ARM ERRATA 775420 workaround
Workaround for the 775420 Cortex-A9 (r2p2, r2p6,r2p8,r2p10,r3p0) erratum.
In case a date cache maintenance operation aborts with MMU exception, it
might cause the processor to deadlock. This workaround puts DSB before
executing ISB if an abort may occur on cache maintenance.
Based on work by Kouei Abe and feedback from Catalin Marinas.
Signed-off-by: Kouei Abe <kouei.abe.cp@rms.renesas.com>
[ horms@verge.net.au: Changed to implementation
suggested by catalin.marinas@arm.com ]
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/Kconfig | 10 ++++++++++
arch/arm/mm/cache-v7.S | 3 +++
2 files changed, 13 insertions(+)
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1405,6 +1405,16 @@ config PL310_ERRATA_769419
on systems with an outer cache, the store buffer is drained
explicitly.
+config ARM_ERRATA_775420
+ bool "ARM errata: A data cache maintenance operation which aborts, might lead to deadlock"
+ depends on CPU_V7
+ help
+ This option enables the workaround for the 775420 Cortex-A9 (r2p2,
+ r2p6,r2p8,r2p10,r3p0) erratum. In case a date cache maintenance
+ operation aborts with MMU exception, it might cause the processor
+ to deadlock. This workaround puts DSB before executing ISB if
+ an abort may occur on cache maintenance.
+
endmenu
source "arch/arm/common/Kconfig"
--- a/arch/arm/mm/cache-v7.S
+++ b/arch/arm/mm/cache-v7.S
@@ -211,6 +211,9 @@ ENTRY(v7_coherent_user_range)
* isn't mapped, just try the next page.
*/
9001:
+#ifdef CONFIG_ARM_ERRATA_775420
+ dsb
+#endif
mov r12, r12, lsr #12
mov r12, r12, lsl #12
add r12, r12, #4096
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 19/62] firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (17 preceding siblings ...)
2012-10-19 2:44 ` [ 18/62] ARM: 7541/1: Add ARM ERRATA 775420 workaround Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 20/62] SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT Greg Kroah-Hartman
` (42 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Simon Kirby, Stefan Richter
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
commit 790198f74c9d1b46b6a89504361b1a844670d050 upstream.
Fix two bugs of the /dev/fw* character device concerning the
FW_CDEV_IOC_GET_INFO ioctl with nonzero fw_cdev_get_info.bus_reset.
(Practically all /dev/fw* clients issue this ioctl right after opening
the device.)
Both bugs are caused by sizeof(struct fw_cdev_event_bus_reset) being 36
without natural alignment and 40 with natural alignment.
1) Memory corruption, affecting i386 userland on amd64 kernel:
Userland reserves a 36 bytes large buffer, kernel writes 40 bytes.
This has been first found and reported against libraw1394 if
compiled with gcc 4.7 which happens to order libraw1394's stack such
that the bug became visible as data corruption.
2) Information leak, affecting all kernel architectures except i386:
4 bytes of random kernel stack data were leaked to userspace.
Hence limit the respective copy_to_user() to the 32-bit aligned size of
struct fw_cdev_event_bus_reset.
Reported-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/firewire/core-cdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -471,8 +471,8 @@ static int ioctl_get_info(struct client
client->bus_reset_closure = a->bus_reset_closure;
if (a->bus_reset != 0) {
fill_bus_reset_event(&bus_reset, client);
- ret = copy_to_user(u64_to_uptr(a->bus_reset),
- &bus_reset, sizeof(bus_reset));
+ /* unaligned size of bus_reset is 36 bytes */
+ ret = copy_to_user(u64_to_uptr(a->bus_reset), &bus_reset, 36);
}
if (ret == 0 && list_empty(&client->link))
list_add_tail(&client->link, &client->device->client_list);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 20/62] SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (18 preceding siblings ...)
2012-10-19 2:44 ` [ 19/62] firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel) Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 21/62] target: fix return code in target_core_init_configfs error path Greg Kroah-Hartman
` (41 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Trond Myklebust, Simon Kirby
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit a519fc7a70d1a918574bb826cc6905b87b482eb9 upstream.
Instead of doing a shutdown() call, we need to do an actual close().
Ditto if/when the server is sending us junk RPC headers.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sunrpc/xprtsock.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1028,6 +1028,16 @@ static void xs_udp_data_ready(struct soc
read_unlock_bh(&sk->sk_callback_lock);
}
+/*
+ * Helper function to force a TCP close if the server is sending
+ * junk and/or it has put us in CLOSE_WAIT
+ */
+static void xs_tcp_force_close(struct rpc_xprt *xprt)
+{
+ set_bit(XPRT_CONNECTION_CLOSE, &xprt->state);
+ xprt_force_disconnect(xprt);
+}
+
static inline void xs_tcp_read_fraghdr(struct rpc_xprt *xprt, struct xdr_skb_reader *desc)
{
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
@@ -1054,7 +1064,7 @@ static inline void xs_tcp_read_fraghdr(s
/* Sanity check of the record length */
if (unlikely(transport->tcp_reclen < 8)) {
dprintk("RPC: invalid TCP record fragment length\n");
- xprt_force_disconnect(xprt);
+ xs_tcp_force_close(xprt);
return;
}
dprintk("RPC: reading TCP record fragment of length %d\n",
@@ -1135,7 +1145,7 @@ static inline void xs_tcp_read_calldir(s
break;
default:
dprintk("RPC: invalid request message type\n");
- xprt_force_disconnect(&transport->xprt);
+ xs_tcp_force_close(&transport->xprt);
}
xs_tcp_check_fraghdr(transport);
}
@@ -1458,6 +1468,8 @@ static void xs_tcp_cancel_linger_timeout
static void xs_sock_mark_closed(struct rpc_xprt *xprt)
{
smp_mb__before_clear_bit();
+ clear_bit(XPRT_CONNECTION_ABORT, &xprt->state);
+ clear_bit(XPRT_CONNECTION_CLOSE, &xprt->state);
clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
clear_bit(XPRT_CLOSING, &xprt->state);
smp_mb__after_clear_bit();
@@ -1515,8 +1527,8 @@ static void xs_tcp_state_change(struct s
break;
case TCP_CLOSE_WAIT:
/* The server initiated a shutdown of the socket */
- xprt_force_disconnect(xprt);
xprt->connect_cookie++;
+ xs_tcp_force_close(xprt);
case TCP_CLOSING:
/*
* If the server closed down the connection, make sure that
@@ -2159,8 +2171,7 @@ static void xs_tcp_setup_socket(struct w
/* We're probably in TIME_WAIT. Get rid of existing socket,
* and retry
*/
- set_bit(XPRT_CONNECTION_CLOSE, &xprt->state);
- xprt_force_disconnect(xprt);
+ xs_tcp_force_close(xprt);
break;
case -ECONNREFUSED:
case -ECONNRESET:
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 21/62] target: fix return code in target_core_init_configfs error path
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (19 preceding siblings ...)
2012-10-19 2:44 ` [ 20/62] SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 22/62] xen/bootup: allow {read|write}_cr8 pvops call Greg Kroah-Hartman
` (40 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Peter Senna Tschudin,
Nicholas Bellinger
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Senna Tschudin <peter.senna@gmail.com>
commit 37bb7899ca366dc212b71b150e78566d04808cc0 upstream.
This patch fixes error cases within target_core_init_configfs() to
properly set ret = -ENOMEM before jumping to the out_global exception
path.
This was originally discovered with the following Coccinelle semantic
match information:
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function. A simplified version of the semantic match
that finds this problem is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/target_core_configfs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -3115,6 +3115,7 @@ static int __init target_core_init_confi
GFP_KERNEL);
if (!target_cg->default_groups) {
pr_err("Unable to allocate target_cg->default_groups\n");
+ ret = -ENOMEM;
goto out_global;
}
@@ -3130,6 +3131,7 @@ static int __init target_core_init_confi
GFP_KERNEL);
if (!hba_cg->default_groups) {
pr_err("Unable to allocate hba_cg->default_groups\n");
+ ret = -ENOMEM;
goto out_global;
}
config_group_init_type_name(&alua_group,
@@ -3145,6 +3147,7 @@ static int __init target_core_init_confi
GFP_KERNEL);
if (!alua_cg->default_groups) {
pr_err("Unable to allocate alua_cg->default_groups\n");
+ ret = -ENOMEM;
goto out_global;
}
@@ -3156,14 +3159,17 @@ static int __init target_core_init_confi
* Add core/alua/lu_gps/default_lu_gp
*/
lu_gp = core_alua_allocate_lu_gp("default_lu_gp", 1);
- if (IS_ERR(lu_gp))
+ if (IS_ERR(lu_gp)) {
+ ret = -ENOMEM;
goto out_global;
+ }
lu_gp_cg = &alua_lu_gps_group;
lu_gp_cg->default_groups = kzalloc(sizeof(struct config_group) * 2,
GFP_KERNEL);
if (!lu_gp_cg->default_groups) {
pr_err("Unable to allocate lu_gp_cg->default_groups\n");
+ ret = -ENOMEM;
goto out_global;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 22/62] xen/bootup: allow {read|write}_cr8 pvops call.
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (20 preceding siblings ...)
2012-10-19 2:44 ` [ 21/62] target: fix return code in target_core_init_configfs error path Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 23/62] xen/bootup: allow read_tscp call for Xen PV guests Greg Kroah-Hartman
` (39 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Konrad Rzeszutek Wilk
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
commit 1a7bbda5b1ab0e02622761305a32dc38735b90b2 upstream.
We actually do not do anything about it. Just return a default
value of zero and if the kernel tries to write anything but 0
we BUG_ON.
This fixes the case when an user tries to suspend the machine
and it blows up in save_processor_state b/c 'read_cr8' is set
to NULL and we get:
kernel BUG at /home/konrad/ssd/linux/arch/x86/include/asm/paravirt.h:100!
invalid opcode: 0000 [#1] SMP
Pid: 2687, comm: init.late Tainted: G O 3.6.0upstream-00002-gac264ac-dirty #4 Bochs Bochs
RIP: e030:[<ffffffff814d5f42>] [<ffffffff814d5f42>] save_processor_state+0x212/0x270
.. snip..
Call Trace:
[<ffffffff810733bf>] do_suspend_lowlevel+0xf/0xac
[<ffffffff8107330c>] ? x86_acpi_suspend_lowlevel+0x10c/0x150
[<ffffffff81342ee2>] acpi_suspend_enter+0x57/0xd5
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/xen/enlighten.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -942,7 +942,16 @@ static void xen_write_cr4(unsigned long
native_write_cr4(cr4);
}
-
+#ifdef CONFIG_X86_64
+static inline unsigned long xen_read_cr8(void)
+{
+ return 0;
+}
+static inline void xen_write_cr8(unsigned long val)
+{
+ BUG_ON(val);
+}
+#endif
static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
{
int ret;
@@ -1111,6 +1120,11 @@ static const struct pv_cpu_ops xen_cpu_o
.read_cr4_safe = native_read_cr4_safe,
.write_cr4 = xen_write_cr4,
+#ifdef CONFIG_X86_64
+ .read_cr8 = xen_read_cr8,
+ .write_cr8 = xen_write_cr8,
+#endif
+
.wbinvd = native_wbinvd,
.read_msr = native_read_msr_safe,
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 23/62] xen/bootup: allow read_tscp call for Xen PV guests.
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (21 preceding siblings ...)
2012-10-19 2:44 ` [ 22/62] xen/bootup: allow {read|write}_cr8 pvops call Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 24/62] block: fix request_queue->flags initialization Greg Kroah-Hartman
` (38 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Konrad Rzeszutek Wilk
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
commit cd0608e71e9757f4dae35bcfb4e88f4d1a03a8ab upstream.
The hypervisor will trap it. However without this patch,
we would crash as the .read_tscp is set to NULL. This patch
fixes it and sets it to the native_read_tscp call.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/xen/enlighten.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1135,6 +1135,8 @@ static const struct pv_cpu_ops xen_cpu_o
.read_tsc = native_read_tsc,
.read_pmc = native_read_pmc,
+ .read_tscp = native_read_tscp,
+
.iret = xen_iret,
.irq_enable_sysexit = xen_sysexit,
#ifdef CONFIG_X86_64
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 24/62] block: fix request_queue->flags initialization
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (22 preceding siblings ...)
2012-10-19 2:44 ` [ 23/62] xen/bootup: allow read_tscp call for Xen PV guests Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 25/62] autofs4 - fix reset pending flag on mount fail Greg Kroah-Hartman
` (37 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Tejun Heo, Vivek Goyal, Jens Axboe
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <tj@kernel.org>
commit 60ea8226cbd5c8301f9a39edc574ddabcb8150e0 upstream.
A queue newly allocated with blk_alloc_queue_node() has only
QUEUE_FLAG_BYPASS set. For request-based drivers,
blk_init_allocated_queue() is called and q->queue_flags is overwritten
with QUEUE_FLAG_DEFAULT which doesn't include BYPASS even though the
initial bypass is still in effect.
In blk_init_allocated_queue(), or QUEUE_FLAG_DEFAULT to q->queue_flags
instead of overwriting.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -601,7 +601,7 @@ blk_init_allocated_queue(struct request_
q->request_fn = rfn;
q->prep_rq_fn = NULL;
q->unprep_rq_fn = NULL;
- q->queue_flags = QUEUE_FLAG_DEFAULT;
+ q->queue_flags |= QUEUE_FLAG_DEFAULT;
/* Override internal queue lock with supplied lock pointer */
if (lock)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 25/62] autofs4 - fix reset pending flag on mount fail
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (23 preceding siblings ...)
2012-10-19 2:44 ` [ 24/62] block: fix request_queue->flags initialization Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 26/62] module: taint kernel when lve module is loaded Greg Kroah-Hartman
` (36 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Ian Kent, Linus Torvalds
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Kent <raven@themaw.net>
commit 49999ab27eab6289a8e4f450e148bdab521361b2 upstream.
In autofs4_d_automount(), if a mount fail occurs the AUTOFS_INF_PENDING
mount pending flag is not cleared.
One effect of this is when using the "browse" option, directory entry
attributes show up with all "?"s due to the incorrect callback and
subsequent failure return (when in fact no callback should be made).
Signed-off-by: Ian Kent <ikent@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/autofs4/root.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -392,10 +392,12 @@ static struct vfsmount *autofs4_d_automo
ino->flags |= AUTOFS_INF_PENDING;
spin_unlock(&sbi->fs_lock);
status = autofs4_mount_wait(dentry);
- if (status)
- return ERR_PTR(status);
spin_lock(&sbi->fs_lock);
ino->flags &= ~AUTOFS_INF_PENDING;
+ if (status) {
+ spin_unlock(&sbi->fs_lock);
+ return ERR_PTR(status);
+ }
}
done:
if (!(ino->flags & AUTOFS_INF_EXPIRING)) {
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 26/62] module: taint kernel when lve module is loaded
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (24 preceding siblings ...)
2012-10-19 2:44 ` [ 25/62] autofs4 - fix reset pending flag on mount fail Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 27/62] video/udlfb: fix line counting in fb_write Greg Kroah-Hartman
` (35 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Matthew Garrett, Alex Lyashkov,
Rusty Russell
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Garrett <mjg59@srcf.ucam.org>
commit c99af3752bb52ba3aece5315279a57a477edfaf1 upstream.
Cloudlinux have a product called lve that includes a kernel module. This
was previously GPLed but is now under a proprietary license, but the
module continues to declare MODULE_LICENSE("GPL") and makes use of some
EXPORT_SYMBOL_GPL symbols. Forcibly taint it in order to avoid this.
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Alex Lyashkov <umka@cloudlinux.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/module.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2729,6 +2729,10 @@ static int check_module_license_and_vers
if (strcmp(mod->name, "driverloader") == 0)
add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
+ /* lve claims to be GPL but upstream won't provide source */
+ if (strcmp(mod->name, "lve") == 0)
+ add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
+
#ifdef CONFIG_MODVERSIONS
if ((mod->num_syms && !mod->crcs)
|| (mod->num_gpl_syms && !mod->gpl_crcs)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 27/62] video/udlfb: fix line counting in fb_write
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (25 preceding siblings ...)
2012-10-19 2:44 ` [ 26/62] module: taint kernel when lve module is loaded Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 28/62] viafb: dont touch clock state on OLPC XO-1.5 Greg Kroah-Hartman
` (34 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Alexander Holler, Bernie Thompson,
Florian Tobias Schandinat
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Holler <holler@ahsoftware.de>
commit b8c4321f3d194469007f5f5f2b34ec278c264a04 upstream.
Line 0 and 1 were both written to line 0 (on the display) and all subsequent
lines had an offset of -1. The result was that the last line on the display
was never overwritten by writes to /dev/fbN.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/udlfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -647,7 +647,7 @@ static ssize_t dlfb_ops_write(struct fb_
result = fb_sys_write(info, buf, count, ppos);
if (result > 0) {
- int start = max((int)(offset / info->fix.line_length) - 1, 0);
+ int start = max((int)(offset / info->fix.line_length), 0);
int lines = min((u32)((result / info->fix.line_length) + 1),
(u32)info->var.yres);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 28/62] viafb: dont touch clock state on OLPC XO-1.5
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (26 preceding siblings ...)
2012-10-19 2:44 ` [ 27/62] video/udlfb: fix line counting in fb_write Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 29/62] timers: Fix endless looping between cascade() and internal_add_timer() Greg Kroah-Hartman
` (33 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Daniel Drake, Florian Tobias Schandinat
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Drake <dsd@laptop.org>
commit 012a1211845eab69a5488d59eb87d24cc518c627 upstream.
As detailed in the thread titled "viafb PLL/clock tweaking causes XO-1.5
instability," enabling or disabling the IGA1/IGA2 clocks causes occasional
stability problems during suspend/resume cycles on this platform.
This is rather odd, as the documentation suggests that clocks have two
states (on/off) and the default (stable) configuration is configured to
enable the clock only when it is needed. However, explicitly enabling *or*
disabling the clock triggers this system instability, suggesting that there
is a 3rd state at play here.
Leaving the clock enable/disable registers alone solves this problem.
This fixes spurious reboots during suspend/resume behaviour introduced by
commit b692a63a.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/via/via_clock.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--- a/drivers/video/via/via_clock.c
+++ b/drivers/video/via/via_clock.c
@@ -25,6 +25,7 @@
#include <linux/kernel.h>
#include <linux/via-core.h>
+#include <asm/olpc.h>
#include "via_clock.h"
#include "global.h"
#include "debug.h"
@@ -289,6 +290,10 @@ static void dummy_set_pll(struct via_pll
printk(KERN_INFO "Using undocumented set PLL.\n%s", via_slap);
}
+static void noop_set_clock_state(u8 state)
+{
+}
+
void via_clock_init(struct via_clock *clock, int gfx_chip)
{
switch (gfx_chip) {
@@ -346,4 +351,18 @@ void via_clock_init(struct via_clock *cl
break;
}
+
+ if (machine_is_olpc()) {
+ /* The OLPC XO-1.5 cannot suspend/resume reliably if the
+ * IGA1/IGA2 clocks are set as on or off (memory rot
+ * occasionally happens during suspend under such
+ * configurations).
+ *
+ * The only known stable scenario is to leave this bits as-is,
+ * which in their default states are documented to enable the
+ * clock only when it is needed.
+ */
+ clock->set_primary_clock_state = noop_set_clock_state;
+ clock->set_secondary_clock_state = noop_set_clock_state;
+ }
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 29/62] timers: Fix endless looping between cascade() and internal_add_timer()
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (27 preceding siblings ...)
2012-10-19 2:44 ` [ 28/62] viafb: dont touch clock state on OLPC XO-1.5 Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 30/62] ath9k: use ieee80211_free_txskb Greg Kroah-Hartman
` (32 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Christian Hildner, Jan Kiszka,
Thomas Gleixner
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Hildner, Christian" <christian.hildner@siemens.com>
commit 26cff4e2aa4d666dc6a120ea34336b5057e3e187 upstream.
Adding two (or more) timers with large values for "expires" (they have
to reside within tv5 in the same list) leads to endless looping
between cascade() and internal_add_timer() in case CONFIG_BASE_SMALL
is one and jiffies are crossing the value 1 << 18. The bug was
introduced between 2.6.11 and 2.6.12 (and survived for quite some
time).
This patch ensures that when cascade() is called timers within tv5 are
not added endlessly to their own list again, instead they are added to
the next lower tv level tv4 (as expected).
Signed-off-by: Christian Hildner <christian.hildner@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Link: http://lkml.kernel.org/r/98673C87CB31274881CFFE0B65ECC87B0F5FC1963E@DEFTHW99EA4MSX.ww902.siemens.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/timer.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -63,6 +63,7 @@ EXPORT_SYMBOL(jiffies_64);
#define TVR_SIZE (1 << TVR_BITS)
#define TVN_MASK (TVN_SIZE - 1)
#define TVR_MASK (TVR_SIZE - 1)
+#define MAX_TVAL ((unsigned long)((1ULL << (TVR_BITS + 4*TVN_BITS)) - 1))
struct tvec {
struct list_head vec[TVN_SIZE];
@@ -356,11 +357,12 @@ static void internal_add_timer(struct tv
vec = base->tv1.vec + (base->timer_jiffies & TVR_MASK);
} else {
int i;
- /* If the timeout is larger than 0xffffffff on 64-bit
- * architectures then we use the maximum timeout:
+ /* If the timeout is larger than MAX_TVAL (on 64-bit
+ * architectures or with CONFIG_BASE_SMALL=1) then we
+ * use the maximum timeout.
*/
- if (idx > 0xffffffffUL) {
- idx = 0xffffffffUL;
+ if (idx > MAX_TVAL) {
+ idx = MAX_TVAL;
expires = idx + base->timer_jiffies;
}
i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 30/62] ath9k: use ieee80211_free_txskb
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (28 preceding siblings ...)
2012-10-19 2:44 ` [ 29/62] timers: Fix endless looping between cascade() and internal_add_timer() Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:44 ` [ 31/62] md/raid10: use correct limit variable Greg Kroah-Hartman
` (31 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Felix Fietkau, John W. Linville
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Fietkau <nbd@openwrt.org>
commit 249ee72249140fe5b9adc988f97298f0aa5db2fc upstream.
Using ieee80211_free_txskb for tx frames is required, since mac80211 clones
skbs for which socket tx status is requested.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/ath/ath9k/beacon.c | 2 -
drivers/net/wireless/ath/ath9k/main.c | 2 -
drivers/net/wireless/ath/ath9k/xmit.c | 53 +++++++++++++++++---------------
3 files changed, 31 insertions(+), 26 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -121,7 +121,7 @@ static void ath_tx_cabq(struct ieee80211
if (ath_tx_start(hw, skb, &txctl) != 0) {
ath_dbg(common, XMIT, "CABQ TX failed\n");
- dev_kfree_skb_any(skb);
+ ieee80211_free_txskb(hw, skb);
}
}
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1147,7 +1147,7 @@ static void ath9k_tx(struct ieee80211_hw
return;
exit:
- dev_kfree_skb_any(skb);
+ ieee80211_free_txskb(hw, skb);
}
static void ath9k_stop(struct ieee80211_hw *hw)
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -64,8 +64,7 @@ static void ath_tx_update_baw(struct ath
static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
struct ath_txq *txq,
struct ath_atx_tid *tid,
- struct sk_buff *skb,
- bool dequeue);
+ struct sk_buff *skb);
enum {
MCS_HT20,
@@ -201,7 +200,15 @@ static void ath_tx_flush_tid(struct ath_
fi = get_frame_info(skb);
bf = fi->bf;
- if (bf && fi->retries) {
+ if (!bf) {
+ bf = ath_tx_setup_buffer(sc, txq, tid, skb);
+ if (!bf) {
+ ieee80211_free_txskb(sc->hw, skb);
+ continue;
+ }
+ }
+
+ if (fi->retries) {
list_add_tail(&bf->list, &bf_head);
ath_tx_update_baw(sc, tid, bf->bf_state.seqno);
ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
@@ -812,10 +819,13 @@ static enum ATH_AGGR_STATUS ath_tx_form_
fi = get_frame_info(skb);
bf = fi->bf;
if (!fi->bf)
- bf = ath_tx_setup_buffer(sc, txq, tid, skb, true);
+ bf = ath_tx_setup_buffer(sc, txq, tid, skb);
- if (!bf)
+ if (!bf) {
+ __skb_unlink(skb, &tid->buf_q);
+ ieee80211_free_txskb(sc->hw, skb);
continue;
+ }
bf->bf_state.bf_type = BUF_AMPDU | BUF_AGGR;
seqno = bf->bf_state.seqno;
@@ -1717,9 +1727,11 @@ static void ath_tx_send_ampdu(struct ath
return;
}
- bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false);
- if (!bf)
+ bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb);
+ if (!bf) {
+ ieee80211_free_txskb(sc->hw, skb);
return;
+ }
bf->bf_state.bf_type = BUF_AMPDU;
INIT_LIST_HEAD(&bf_head);
@@ -1743,11 +1755,6 @@ static void ath_tx_send_normal(struct at
struct ath_buf *bf;
bf = fi->bf;
- if (!bf)
- bf = ath_tx_setup_buffer(sc, txq, tid, skb, false);
-
- if (!bf)
- return;
INIT_LIST_HEAD(&bf_head);
list_add_tail(&bf->list, &bf_head);
@@ -1820,8 +1827,7 @@ u8 ath_txchainmask_reduction(struct ath_
static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
struct ath_txq *txq,
struct ath_atx_tid *tid,
- struct sk_buff *skb,
- bool dequeue)
+ struct sk_buff *skb)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_frame_info *fi = get_frame_info(skb);
@@ -1833,7 +1839,7 @@ static struct ath_buf *ath_tx_setup_buff
bf = ath_tx_get_buffer(sc);
if (!bf) {
ath_dbg(common, XMIT, "TX buffers are full\n");
- goto error;
+ return NULL;
}
ATH_TXBUF_RESET(bf);
@@ -1862,18 +1868,12 @@ static struct ath_buf *ath_tx_setup_buff
ath_err(ath9k_hw_common(sc->sc_ah),
"dma_mapping_error() on TX\n");
ath_tx_return_buffer(sc, bf);
- goto error;
+ return NULL;
}
fi->bf = bf;
return bf;
-
-error:
- if (dequeue)
- __skb_unlink(skb, &tid->buf_q);
- dev_kfree_skb_any(skb);
- return NULL;
}
/* FIXME: tx power */
@@ -1902,9 +1902,14 @@ static void ath_tx_start_dma(struct ath_
*/
ath_tx_send_ampdu(sc, tid, skb, txctl);
} else {
- bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false);
- if (!bf)
+ bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb);
+ if (!bf) {
+ if (txctl->paprd)
+ dev_kfree_skb_any(skb);
+ else
+ ieee80211_free_txskb(sc->hw, skb);
return;
+ }
bf->bf_state.bfs_paprd = txctl->paprd;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 31/62] md/raid10: use correct limit variable
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (29 preceding siblings ...)
2012-10-19 2:44 ` [ 30/62] ath9k: use ieee80211_free_txskb Greg Kroah-Hartman
@ 2012-10-19 2:44 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 32/62] kdb,vt_console: Fix missed data due to pager overruns Greg Kroah-Hartman
` (30 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Dan Carpenter, NeilBrown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 91502f099dfc5a1e8812898e26ee280713e1d002 upstream.
Clang complains that we are assigning a variable to itself. This should
be using bad_sectors like the similar earlier check does.
Bug has been present since 3.1-rc1. It is minor but could
conceivably cause corruption or other bad behaviour.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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
@@ -3019,7 +3019,7 @@ static sector_t sync_request(struct mdde
else {
bad_sectors -= (sector - first_bad);
if (max_sync > bad_sectors)
- max_sync = max_sync;
+ max_sync = bad_sectors;
continue;
}
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 32/62] kdb,vt_console: Fix missed data due to pager overruns
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (30 preceding siblings ...)
2012-10-19 2:44 ` [ 31/62] md/raid10: use correct limit variable Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 21:39 ` Ben Hutchings
2012-10-19 2:45 ` [ 33/62] pktgen: fix crash when generating IPv6 packets Greg Kroah-Hartman
` (29 subsequent siblings)
61 siblings, 1 reply; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Jason Wessel
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wessel <jason.wessel@windriver.com>
commit 17b572e82032bc246324ce136696656b66d4e3f1 upstream.
It is possible to miss data when using the kdb pager. The kdb pager
does not pay attention to the maximum column constraint of the screen
or serial terminal. This result is not incrementing the shown lines
correctly and the pager will print more lines that fit on the screen.
Obviously that is less than useful when using a VGA console where you
cannot scroll back.
The pager will now look at the kdb_buffer string to see how many
characters are printed. It might not be perfect considering you can
output ASCII that might move the cursor position, but it is a
substantially better approximation for viewing dmesg and trace logs.
This also means that the vt screen needs to set the kdb COLUMNS
variable.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/vt/vt.c | 13 +++++++++++++
kernel/debug/kdb/kdb_io.c | 33 ++++++++++++++++++++++++++++-----
2 files changed, 41 insertions(+), 5 deletions(-)
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3475,6 +3475,19 @@ int con_debug_enter(struct vc_data *vc)
kdb_set(2, setargs);
}
}
+ if (vc->vc_cols < 999) {
+ int colcount;
+ char cols[4];
+ const char *setargs[3] = {
+ "set",
+ "COLUMNS",
+ cols,
+ };
+ if (kdbgetintenv(setargs[0], &colcount)) {
+ snprintf(cols, 4, "%i", vc->vc_cols);
+ kdb_set(2, setargs);
+ }
+ }
#endif /* CONFIG_KGDB_KDB */
return ret;
}
--- a/kernel/debug/kdb/kdb_io.c
+++ b/kernel/debug/kdb/kdb_io.c
@@ -552,6 +552,7 @@ int vkdb_printf(const char *fmt, va_list
{
int diag;
int linecount;
+ int colcount;
int logging, saved_loglevel = 0;
int saved_trap_printk;
int got_printf_lock = 0;
@@ -584,6 +585,10 @@ int vkdb_printf(const char *fmt, va_list
if (diag || linecount <= 1)
linecount = 24;
+ diag = kdbgetintenv("COLUMNS", &colcount);
+ if (diag || colcount <= 1)
+ colcount = 80;
+
diag = kdbgetintenv("LOGGING", &logging);
if (diag)
logging = 0;
@@ -690,7 +695,7 @@ kdb_printit:
gdbstub_msg_write(kdb_buffer, retlen);
} else {
if (dbg_io_ops && !dbg_io_ops->is_console) {
- len = strlen(kdb_buffer);
+ len = retlen;
cp = kdb_buffer;
while (len--) {
dbg_io_ops->write_char(*cp);
@@ -709,11 +714,29 @@ kdb_printit:
printk(KERN_INFO "%s", kdb_buffer);
}
- if (KDB_STATE(PAGER) && strchr(kdb_buffer, '\n'))
- kdb_nextline++;
+ if (KDB_STATE(PAGER)) {
+ /*
+ * Check printed string to decide how to bump the
+ * kdb_nextline to control when the more prompt should
+ * show up.
+ */
+ int got = 0;
+ len = retlen;
+ while (len--) {
+ if (kdb_buffer[len] == '\n') {
+ kdb_nextline++;
+ got = 0;
+ } else if (kdb_buffer[len] == '\r') {
+ got = 0;
+ } else {
+ got++;
+ }
+ }
+ kdb_nextline += got / (colcount + 1);
+ }
/* check for having reached the LINES number of printed lines */
- if (kdb_nextline == linecount) {
+ if (kdb_nextline >= linecount) {
char buf1[16] = "";
#if defined(CONFIG_SMP)
char buf2[32];
@@ -776,7 +799,7 @@ kdb_printit:
kdb_grepping_flag = 0;
kdb_printf("\n");
} else if (buf1[0] == ' ') {
- kdb_printf("\n");
+ kdb_printf("\r");
suspend_grep = 1; /* for this recursion */
} else if (buf1[0] == '\n') {
kdb_nextline = linecount - 1;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 33/62] pktgen: fix crash when generating IPv6 packets
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (31 preceding siblings ...)
2012-10-19 2:45 ` [ 32/62] kdb,vt_console: Fix missed data due to pager overruns Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 34/62] ipvs: fix oops in ip_vs_dst_event on rmmod Greg Kroah-Hartman
` (28 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Cong Wang, David S. Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amerigo Wang <amwang@redhat.com>
commit 5aa8b572007c4bca1e6d3dd4c4820f1ae49d6bb2 upstream.
For IPv6, sizeof(struct ipv6hdr) = 40, thus the following
expression will result negative:
datalen = pkt_dev->cur_pkt_size - 14 -
sizeof(struct ipv6hdr) - sizeof(struct udphdr) -
pkt_dev->pkt_overhead;
And, the check "if (datalen < sizeof(struct pktgen_hdr))" will be
passed as "datalen" is promoted to unsigned, therefore will cause
a crash later.
This is a quick fix by checking if "datalen" is negative. The following
patch will increase the default value of 'min_pkt_size' for IPv6.
This bug should exist for a long time, so Cc -stable too.
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/core/pktgen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2932,7 +2932,7 @@ static struct sk_buff *fill_packet_ipv6(
sizeof(struct ipv6hdr) - sizeof(struct udphdr) -
pkt_dev->pkt_overhead;
- if (datalen < sizeof(struct pktgen_hdr)) {
+ if (datalen < 0 || datalen < sizeof(struct pktgen_hdr)) {
datalen = sizeof(struct pktgen_hdr);
if (net_ratelimit())
pr_info("increased datalen to %d\n", datalen);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 34/62] ipvs: fix oops in ip_vs_dst_event on rmmod
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (32 preceding siblings ...)
2012-10-19 2:45 ` [ 33/62] pktgen: fix crash when generating IPv6 packets Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 35/62] netfilter: nf_conntrack: fix racy timer handling with reliable events Greg Kroah-Hartman
` (27 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Julian Anastasov, Simon Horman,
Pablo Neira Ayuso, David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julian Anastasov <ja@ssi.bg>
commit 283283c4da91adc44b03519f434ee1e7e91d6fdb upstream.
After commit 39f618b4fd95ae243d940ec64c961009c74e3333 (3.4)
"ipvs: reset ipvs pointer in netns" we can oops in
ip_vs_dst_event on rmmod ip_vs because ip_vs_control_cleanup
is called after the ipvs_core_ops subsys is unregistered and
net->ipvs is NULL. Fix it by exiting early from ip_vs_dst_event
if ipvs is NULL. It is safe because all services and dests
for the net are already freed.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/netfilter/ipvs/ip_vs_ctl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1521,11 +1521,12 @@ static int ip_vs_dst_event(struct notifi
{
struct net_device *dev = ptr;
struct net *net = dev_net(dev);
+ struct netns_ipvs *ipvs = net_ipvs(net);
struct ip_vs_service *svc;
struct ip_vs_dest *dest;
unsigned int idx;
- if (event != NETDEV_UNREGISTER)
+ if (event != NETDEV_UNREGISTER || !ipvs)
return NOTIFY_DONE;
IP_VS_DBG(3, "%s() dev=%s\n", __func__, dev->name);
EnterFunction(2);
@@ -1551,7 +1552,7 @@ static int ip_vs_dst_event(struct notifi
}
}
- list_for_each_entry(dest, &net_ipvs(net)->dest_trash, n_list) {
+ list_for_each_entry(dest, &ipvs->dest_trash, n_list) {
__ip_vs_dev_reset(dest, dev);
}
mutex_unlock(&__ip_vs_mutex);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 35/62] netfilter: nf_conntrack: fix racy timer handling with reliable events
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (33 preceding siblings ...)
2012-10-19 2:45 ` [ 34/62] ipvs: fix oops in ip_vs_dst_event on rmmod Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 36/62] netfilter: ipset: fix timeout value overflow bug Greg Kroah-Hartman
` (26 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Oliver Smith, Pablo Neira Ayuso,
David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <pablo@netfilter.org>
commit 5b423f6a40a0327f9d40bc8b97ce9be266f74368 upstream.
Existing code assumes that del_timer returns true for alive conntrack
entries. However, this is not true if reliable events are enabled.
In that case, del_timer may return true for entries that were
just inserted in the dying list. Note that packets / ctnetlink may
hold references to conntrack entries that were just inserted to such
list.
This patch fixes the issue by adding an independent timer for
event delivery. This increases the size of the ecache extension.
Still we can revisit this later and use variable size extensions
to allocate this area on demand.
Tested-by: Oliver Smith <olipro@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/netfilter/nf_conntrack_ecache.h | 1 +
net/netfilter/nf_conntrack_core.c | 16 +++++++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
--- a/include/net/netfilter/nf_conntrack_ecache.h
+++ b/include/net/netfilter/nf_conntrack_ecache.h
@@ -18,6 +18,7 @@ struct nf_conntrack_ecache {
u16 ctmask; /* bitmask of ct events to be delivered */
u16 expmask; /* bitmask of expect events to be delivered */
u32 pid; /* netlink pid of destroyer */
+ struct timer_list timeout;
};
static inline struct nf_conntrack_ecache *
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -249,12 +249,15 @@ static void death_by_event(unsigned long
{
struct nf_conn *ct = (void *)ul_conntrack;
struct net *net = nf_ct_net(ct);
+ struct nf_conntrack_ecache *ecache = nf_ct_ecache_find(ct);
+
+ BUG_ON(ecache == NULL);
if (nf_conntrack_event(IPCT_DESTROY, ct) < 0) {
/* bad luck, let's retry again */
- ct->timeout.expires = jiffies +
+ ecache->timeout.expires = jiffies +
(random32() % net->ct.sysctl_events_retry_timeout);
- add_timer(&ct->timeout);
+ add_timer(&ecache->timeout);
return;
}
/* we've got the event delivered, now it's dying */
@@ -268,6 +271,9 @@ static void death_by_event(unsigned long
void nf_ct_insert_dying_list(struct nf_conn *ct)
{
struct net *net = nf_ct_net(ct);
+ struct nf_conntrack_ecache *ecache = nf_ct_ecache_find(ct);
+
+ BUG_ON(ecache == NULL);
/* add this conntrack to the dying list */
spin_lock_bh(&nf_conntrack_lock);
@@ -275,10 +281,10 @@ void nf_ct_insert_dying_list(struct nf_c
&net->ct.dying);
spin_unlock_bh(&nf_conntrack_lock);
/* set a new timer to retry event delivery */
- setup_timer(&ct->timeout, death_by_event, (unsigned long)ct);
- ct->timeout.expires = jiffies +
+ setup_timer(&ecache->timeout, death_by_event, (unsigned long)ct);
+ ecache->timeout.expires = jiffies +
(random32() % net->ct.sysctl_events_retry_timeout);
- add_timer(&ct->timeout);
+ add_timer(&ecache->timeout);
}
EXPORT_SYMBOL_GPL(nf_ct_insert_dying_list);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 36/62] netfilter: ipset: fix timeout value overflow bug
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (34 preceding siblings ...)
2012-10-19 2:45 ` [ 35/62] netfilter: nf_conntrack: fix racy timer handling with reliable events Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 37/62] netfilter: ipset: timeout fixing bug broke SET target special timeout value Greg Kroah-Hartman
` (25 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Jozsef Kadlecsik, Pablo Neira Ayuso,
David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
commit 127f559127f5175e4bec3dab725a34845d956591 upstream.
Large timeout parameters could result wrong timeout values due to
an overflow at msec to jiffies conversion (reported by Andreas Herz)
[ This patch was mangled by Pablo Neira Ayuso since David Laight and
Eric Dumazet noticed that we were using hardcoded 1000 instead of
MSEC_PER_SEC to calculate the timeout ]
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/netfilter/ipset/ip_set_timeout.h | 4 ++++
net/netfilter/xt_set.c | 15 +++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
--- a/include/linux/netfilter/ipset/ip_set_timeout.h
+++ b/include/linux/netfilter/ipset/ip_set_timeout.h
@@ -30,6 +30,10 @@ ip_set_timeout_uget(struct nlattr *tb)
{
unsigned int timeout = ip_set_get_h32(tb);
+ /* Normalize to fit into jiffies */
+ if (timeout > UINT_MAX/MSEC_PER_SEC)
+ timeout = UINT_MAX/MSEC_PER_SEC;
+
/* Userspace supplied TIMEOUT parameter: adjust crazy size */
return timeout == IPSET_NO_TIMEOUT ? IPSET_NO_TIMEOUT - 1 : timeout;
}
--- a/net/netfilter/xt_set.c
+++ b/net/netfilter/xt_set.c
@@ -44,6 +44,14 @@ const struct ip_set_adt_opt n = { \
.cmdflags = cfs, \
.timeout = t, \
}
+#define ADT_MOPT(n, f, d, fs, cfs, t) \
+struct ip_set_adt_opt n = { \
+ .family = f, \
+ .dim = d, \
+ .flags = fs, \
+ .cmdflags = cfs, \
+ .timeout = t, \
+}
/* Revision 0 interface: backward compatible with netfilter/iptables */
@@ -296,11 +304,14 @@ static unsigned int
set_target_v2(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct xt_set_info_target_v2 *info = par->targinfo;
- ADT_OPT(add_opt, par->family, info->add_set.dim,
- info->add_set.flags, info->flags, info->timeout);
+ ADT_MOPT(add_opt, par->family, info->add_set.dim,
+ info->add_set.flags, info->flags, info->timeout);
ADT_OPT(del_opt, par->family, info->del_set.dim,
info->del_set.flags, 0, UINT_MAX);
+ /* Normalize to fit into jiffies */
+ if (add_opt.timeout > UINT_MAX/MSEC_PER_SEC)
+ add_opt.timeout = UINT_MAX/MSEC_PER_SEC;
if (info->add_set.index != IPSET_INVALID_ID)
ip_set_add(info->add_set.index, skb, par, &add_opt);
if (info->del_set.index != IPSET_INVALID_ID)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 37/62] netfilter: ipset: timeout fixing bug broke SET target special timeout value
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (35 preceding siblings ...)
2012-10-19 2:45 ` [ 36/62] netfilter: ipset: fix timeout value overflow bug Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 38/62] ipvs: fix oops on NAT reply in br_nf context Greg Kroah-Hartman
` (24 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Jean-Philippe Menil, Jozsef Kadlecsik,
Pablo Neira Ayuso, David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
commit a73f89a61f92b364f0b4a3be412b5b70553afc23 upstream.
The patch "127f559 netfilter: ipset: fix timeout value overflow bug"
broke the SET target when no timeout was specified.
Reported-by: Jean-Philippe Menil <jean-philippe.menil@univ-nantes.fr>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/netfilter/xt_set.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/netfilter/xt_set.c
+++ b/net/netfilter/xt_set.c
@@ -16,6 +16,7 @@
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter/xt_set.h>
+#include <linux/netfilter/ipset/ip_set_timeout.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
@@ -310,7 +311,8 @@ set_target_v2(struct sk_buff *skb, const
info->del_set.flags, 0, UINT_MAX);
/* Normalize to fit into jiffies */
- if (add_opt.timeout > UINT_MAX/MSEC_PER_SEC)
+ if (add_opt.timeout != IPSET_NO_TIMEOUT &&
+ add_opt.timeout > UINT_MAX/MSEC_PER_SEC)
add_opt.timeout = UINT_MAX/MSEC_PER_SEC;
if (info->add_set.index != IPSET_INVALID_ID)
ip_set_add(info->add_set.index, skb, par, &add_opt);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 38/62] ipvs: fix oops on NAT reply in br_nf context
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (36 preceding siblings ...)
2012-10-19 2:45 ` [ 37/62] netfilter: ipset: timeout fixing bug broke SET target special timeout value Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 39/62] netfilter: nf_nat_sip: fix incorrect handling of EBUSY for RTCP expectation Greg Kroah-Hartman
` (23 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Lin Ming, Julian Anastasov,
Simon Horman, Pablo Neira Ayuso, David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lin Ming <mlin@ss.pku.edu.cn>
commit 9e33ce453f8ac8452649802bee1f410319408f4b upstream.
IPVS should not reset skb->nf_bridge in FORWARD hook
by calling nf_reset for NAT replies. It triggers oops in
br_nf_forward_finish.
[ 579.781508] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
[ 579.781669] IP: [<ffffffff817b1ca5>] br_nf_forward_finish+0x58/0x112
[ 579.781792] PGD 218f9067 PUD 0
[ 579.781865] Oops: 0000 [#1] SMP
[ 579.781945] CPU 0
[ 579.781983] Modules linked in:
[ 579.782047]
[ 579.782080]
[ 579.782114] Pid: 4644, comm: qemu Tainted: G W 3.5.0-rc5-00006-g95e69f9 #282 Hewlett-Packard /30E8
[ 579.782300] RIP: 0010:[<ffffffff817b1ca5>] [<ffffffff817b1ca5>] br_nf_forward_finish+0x58/0x112
[ 579.782455] RSP: 0018:ffff88007b003a98 EFLAGS: 00010287
[ 579.782541] RAX: 0000000000000008 RBX: ffff8800762ead00 RCX: 000000000001670a
[ 579.782653] RDX: 0000000000000000 RSI: 000000000000000a RDI: ffff8800762ead00
[ 579.782845] RBP: ffff88007b003ac8 R08: 0000000000016630 R09: ffff88007b003a90
[ 579.782957] R10: ffff88007b0038e8 R11: ffff88002da37540 R12: ffff88002da01a02
[ 579.783066] R13: ffff88002da01a80 R14: ffff88002d83c000 R15: ffff88002d82a000
[ 579.783177] FS: 0000000000000000(0000) GS:ffff88007b000000(0063) knlGS:00000000f62d1b70
[ 579.783306] CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b
[ 579.783395] CR2: 0000000000000004 CR3: 00000000218fe000 CR4: 00000000000027f0
[ 579.783505] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 579.783684] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 579.783795] Process qemu (pid: 4644, threadinfo ffff880021b20000, task ffff880021aba760)
[ 579.783919] Stack:
[ 579.783959] ffff88007693cedc ffff8800762ead00 ffff88002da01a02 ffff8800762ead00
[ 579.784110] ffff88002da01a02 ffff88002da01a80 ffff88007b003b18 ffffffff817b26c7
[ 579.784260] ffff880080000000 ffffffff81ef59f0 ffff8800762ead00 ffffffff81ef58b0
[ 579.784477] Call Trace:
[ 579.784523] <IRQ>
[ 579.784562]
[ 579.784603] [<ffffffff817b26c7>] br_nf_forward_ip+0x275/0x2c8
[ 579.784707] [<ffffffff81704b58>] nf_iterate+0x47/0x7d
[ 579.784797] [<ffffffff817ac32e>] ? br_dev_queue_push_xmit+0xae/0xae
[ 579.784906] [<ffffffff81704bfb>] nf_hook_slow+0x6d/0x102
[ 579.784995] [<ffffffff817ac32e>] ? br_dev_queue_push_xmit+0xae/0xae
[ 579.785175] [<ffffffff8187fa95>] ? _raw_write_unlock_bh+0x19/0x1b
[ 579.785179] [<ffffffff817ac417>] __br_forward+0x97/0xa2
[ 579.785179] [<ffffffff817ad366>] br_handle_frame_finish+0x1a6/0x257
[ 579.785179] [<ffffffff817b2386>] br_nf_pre_routing_finish+0x26d/0x2cb
[ 579.785179] [<ffffffff817b2cf0>] br_nf_pre_routing+0x55d/0x5c1
[ 579.785179] [<ffffffff81704b58>] nf_iterate+0x47/0x7d
[ 579.785179] [<ffffffff817ad1c0>] ? br_handle_local_finish+0x44/0x44
[ 579.785179] [<ffffffff81704bfb>] nf_hook_slow+0x6d/0x102
[ 579.785179] [<ffffffff817ad1c0>] ? br_handle_local_finish+0x44/0x44
[ 579.785179] [<ffffffff81551525>] ? sky2_poll+0xb35/0xb54
[ 579.785179] [<ffffffff817ad62a>] br_handle_frame+0x213/0x229
[ 579.785179] [<ffffffff817ad417>] ? br_handle_frame_finish+0x257/0x257
[ 579.785179] [<ffffffff816e3b47>] __netif_receive_skb+0x2b4/0x3f1
[ 579.785179] [<ffffffff816e69fc>] process_backlog+0x99/0x1e2
[ 579.785179] [<ffffffff816e6800>] net_rx_action+0xdf/0x242
[ 579.785179] [<ffffffff8107e8a8>] __do_softirq+0xc1/0x1e0
[ 579.785179] [<ffffffff8135a5ba>] ? trace_hardirqs_off_thunk+0x3a/0x6c
[ 579.785179] [<ffffffff8188812c>] call_softirq+0x1c/0x30
The steps to reproduce as follow,
1. On Host1, setup brige br0(192.168.1.106)
2. Boot a kvm guest(192.168.1.105) on Host1 and start httpd
3. Start IPVS service on Host1
ipvsadm -A -t 192.168.1.106:80 -s rr
ipvsadm -a -t 192.168.1.106:80 -r 192.168.1.105:80 -m
4. Run apache benchmark on Host2(192.168.1.101)
ab -n 1000 http://192.168.1.106/
ip_vs_reply4
ip_vs_out
handle_response
ip_vs_notrack
nf_reset()
{
skb->nf_bridge = NULL;
}
Actually, IPVS wants in this case just to replace nfct
with untracked version. So replace the nf_reset(skb) call
in ip_vs_notrack() with a nf_conntrack_put(skb->nfct) call.
Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/ip_vs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1356,7 +1356,7 @@ static inline void ip_vs_notrack(struct
struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
if (!ct || !nf_ct_is_untracked(ct)) {
- nf_reset(skb);
+ nf_conntrack_put(skb->nfct);
skb->nfct = &nf_ct_untracked_get()->ct_general;
skb->nfctinfo = IP_CT_NEW;
nf_conntrack_get(skb->nfct);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 39/62] netfilter: nf_nat_sip: fix incorrect handling of EBUSY for RTCP expectation
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (37 preceding siblings ...)
2012-10-19 2:45 ` [ 38/62] ipvs: fix oops on NAT reply in br_nf context Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 40/62] netfilter: nf_nat_sip: fix via header translation with multiple parameters Greg Kroah-Hartman
` (22 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Rafal Fitt, David Miller,
Pablo Neira Ayuso
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <pablo@netfilter.org>
commit 3f509c689a07a4aa989b426893d8491a7ffcc410 upstream.
We're hitting bug while trying to reinsert an already existing
expectation:
kernel BUG at kernel/timer.c:895!
invalid opcode: 0000 [#1] SMP
[...]
Call Trace:
<IRQ>
[<ffffffffa0069563>] nf_ct_expect_related_report+0x4a0/0x57a [nf_conntrack]
[<ffffffff812d423a>] ? in4_pton+0x72/0x131
[<ffffffffa00ca69e>] ip_nat_sdp_media+0xeb/0x185 [nf_nat_sip]
[<ffffffffa00b5b9b>] set_expected_rtp_rtcp+0x32d/0x39b [nf_conntrack_sip]
[<ffffffffa00b5f15>] process_sdp+0x30c/0x3ec [nf_conntrack_sip]
[<ffffffff8103f1eb>] ? irq_exit+0x9a/0x9c
[<ffffffffa00ca738>] ? ip_nat_sdp_media+0x185/0x185 [nf_nat_sip]
We have to remove the RTP expectation if the RTCP expectation hits EBUSY
since we keep trying with other ports until we succeed.
Reported-by: Rafal Fitt <rafalf@aplusc.com.pl>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/netfilter/nf_nat_sip.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -501,7 +501,10 @@ static unsigned int ip_nat_sdp_media(str
ret = nf_ct_expect_related(rtcp_exp);
if (ret == 0)
break;
- else if (ret != -EBUSY) {
+ else if (ret == -EBUSY) {
+ nf_ct_unexpect_related(rtp_exp);
+ continue;
+ } else if (ret < 0) {
nf_ct_unexpect_related(rtp_exp);
port = 0;
break;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 40/62] netfilter: nf_nat_sip: fix via header translation with multiple parameters
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (38 preceding siblings ...)
2012-10-19 2:45 ` [ 39/62] netfilter: nf_nat_sip: fix incorrect handling of EBUSY for RTCP expectation Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 41/62] netfilter: nf_ct_expect: fix possible access to uninitialized timer Greg Kroah-Hartman
` (21 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Patrick McHardy, Pablo Neira Ayuso,
David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Patrick McHardy <kaber@trash.net>
commit f22eb25cf5b1157b29ef88c793b71972efc47143 upstream.
Via-headers are parsed beginning at the first character after the Via-address.
When the address is translated first and its length decreases, the offset to
start parsing at is incorrect and header parameters might be missed.
Update the offset after translating the Via-address to fix this.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/netfilter/nf_nat_sip.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -148,7 +148,7 @@ static unsigned int ip_nat_sip(struct sk
if (ct_sip_parse_header_uri(ct, *dptr, NULL, *datalen,
hdr, NULL, &matchoff, &matchlen,
&addr, &port) > 0) {
- unsigned int matchend, poff, plen, buflen, n;
+ unsigned int olen, matchend, poff, plen, buflen, n;
char buffer[sizeof("nnn.nnn.nnn.nnn:nnnnn")];
/* We're only interested in headers related to this
@@ -163,11 +163,12 @@ static unsigned int ip_nat_sip(struct sk
goto next;
}
+ olen = *datalen;
if (!map_addr(skb, dataoff, dptr, datalen, matchoff, matchlen,
&addr, port))
return NF_DROP;
- matchend = matchoff + matchlen;
+ matchend = matchoff + matchlen + *datalen - olen;
/* The maddr= parameter (RFC 2361) specifies where to send
* the reply. */
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 41/62] netfilter: nf_ct_expect: fix possible access to uninitialized timer
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (39 preceding siblings ...)
2012-10-19 2:45 ` [ 40/62] netfilter: nf_nat_sip: fix via header translation with multiple parameters Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 42/62] netfilter: limit, hashlimit: avoid duplicated inline Greg Kroah-Hartman
` (20 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Rafal Fitt, Patrick McHardy,
Pablo Neira Ayuso, David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <pablo@netfilter.org>
commit 2614f86490122bf51eb7c12ec73927f1900f4e7d upstream.
In __nf_ct_expect_check, the function refresh_timer returns 1
if a matching expectation is found and its timer is successfully
refreshed. This results in nf_ct_expect_related returning 0.
Note that at this point:
- the passed expectation is not inserted in the expectation table
and its timer was not initialized, since we have refreshed one
matching/existing expectation.
- nf_ct_expect_alloc uses kmem_cache_alloc, so the expectation
timer is in some undefined state just after the allocation,
until it is appropriately initialized.
This can be a problem for the SIP helper during the expectation
addition:
...
if (nf_ct_expect_related(rtp_exp) == 0) {
if (nf_ct_expect_related(rtcp_exp) != 0)
nf_ct_unexpect_related(rtp_exp);
...
Note that nf_ct_expect_related(rtp_exp) may return 0 for the timer refresh
case that is detailed above. Then, if nf_ct_unexpect_related(rtcp_exp)
returns != 0, nf_ct_unexpect_related(rtp_exp) is called, which does:
spin_lock_bh(&nf_conntrack_lock);
if (del_timer(&exp->timeout)) {
nf_ct_unlink_expect(exp);
nf_ct_expect_put(exp);
}
spin_unlock_bh(&nf_conntrack_lock);
Note that del_timer always returns false if the timer has been
initialized. However, the timer was not initialized since setup_timer
was not called, therefore, the expectation timer remains in some
undefined state. If I'm not missing anything, this may lead to the
removal an unexistent expectation.
To fix this, the optimization that allows refreshing an expectation
is removed. Now nf_conntrack_expect_related looks more consistent
to me since it always add the expectation in case that it returns
success.
Thanks to Patrick McHardy for participating in the discussion of
this patch.
I think this may be the source of the problem described by:
http://marc.info/?l=netfilter-devel&m=134073514719421&w=2
Reported-by: Rafal Fitt <rafalf@aplusc.com.pl>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/netfilter/nf_conntrack_expect.c | 29 ++++++-----------------------
1 file changed, 6 insertions(+), 23 deletions(-)
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -361,23 +361,6 @@ static void evict_oldest_expect(struct n
}
}
-static inline int refresh_timer(struct nf_conntrack_expect *i)
-{
- struct nf_conn_help *master_help = nfct_help(i->master);
- const struct nf_conntrack_expect_policy *p;
-
- if (!del_timer(&i->timeout))
- return 0;
-
- p = &rcu_dereference_protected(
- master_help->helper,
- lockdep_is_held(&nf_conntrack_lock)
- )->expect_policy[i->class];
- i->timeout.expires = jiffies + p->timeout * HZ;
- add_timer(&i->timeout);
- return 1;
-}
-
static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect)
{
const struct nf_conntrack_expect_policy *p;
@@ -386,7 +369,7 @@ static inline int __nf_ct_expect_check(s
struct nf_conn_help *master_help = nfct_help(master);
struct nf_conntrack_helper *helper;
struct net *net = nf_ct_exp_net(expect);
- struct hlist_node *n;
+ struct hlist_node *n, *next;
unsigned int h;
int ret = 1;
@@ -395,12 +378,12 @@ static inline int __nf_ct_expect_check(s
goto out;
}
h = nf_ct_expect_dst_hash(&expect->tuple);
- hlist_for_each_entry(i, n, &net->ct.expect_hash[h], hnode) {
+ hlist_for_each_entry_safe(i, n, next, &net->ct.expect_hash[h], hnode) {
if (expect_matches(i, expect)) {
- /* Refresh timer: if it's dying, ignore.. */
- if (refresh_timer(i)) {
- ret = 0;
- goto out;
+ if (del_timer(&i->timeout)) {
+ nf_ct_unlink_expect(i);
+ nf_ct_expect_put(i);
+ break;
}
} else if (expect_clash(i, expect)) {
ret = -EBUSY;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 42/62] netfilter: limit, hashlimit: avoid duplicated inline
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (40 preceding siblings ...)
2012-10-19 2:45 ` [ 41/62] netfilter: nf_ct_expect: fix possible access to uninitialized timer Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 43/62] netfilter: xt_limit: have r->cost != 0 case work Greg Kroah-Hartman
` (19 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Florian Westphal, Pablo Neira Ayuso,
David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <fw@strlen.de>
commit 7a909ac70f6b0823d9f23a43f19598d4b57ac901 upstream.
credit_cap can be set to credit, which avoids inlining user2credits
twice. Also, remove inline keyword and let compiler decide.
old:
684 192 0 876 36c net/netfilter/xt_limit.o
4927 344 32 5303 14b7 net/netfilter/xt_hashlimit.o
now:
668 192 0 860 35c net/netfilter/xt_limit.o
4793 344 32 5169 1431 net/netfilter/xt_hashlimit.o
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/netfilter/xt_hashlimit.c | 8 +++-----
net/netfilter/xt_limit.c | 5 ++---
2 files changed, 5 insertions(+), 8 deletions(-)
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -389,8 +389,7 @@ static void htable_put(struct xt_hashlim
#define CREDITS_PER_JIFFY POW2_BELOW32(MAX_CPJ)
/* Precision saver. */
-static inline u_int32_t
-user2credits(u_int32_t user)
+static u32 user2credits(u32 user)
{
/* If multiplying would overflow... */
if (user > 0xFFFFFFFF / (HZ*CREDITS_PER_JIFFY))
@@ -400,7 +399,7 @@ user2credits(u_int32_t user)
return (user * HZ * CREDITS_PER_JIFFY) / XT_HASHLIMIT_SCALE;
}
-static inline void rateinfo_recalc(struct dsthash_ent *dh, unsigned long now)
+static void rateinfo_recalc(struct dsthash_ent *dh, unsigned long now)
{
dh->rateinfo.credit += (now - dh->rateinfo.prev) * CREDITS_PER_JIFFY;
if (dh->rateinfo.credit > dh->rateinfo.credit_cap)
@@ -535,8 +534,7 @@ hashlimit_mt(const struct sk_buff *skb,
dh->rateinfo.prev = jiffies;
dh->rateinfo.credit = user2credits(hinfo->cfg.avg *
hinfo->cfg.burst);
- dh->rateinfo.credit_cap = user2credits(hinfo->cfg.avg *
- hinfo->cfg.burst);
+ dh->rateinfo.credit_cap = dh->rateinfo.credit;
dh->rateinfo.cost = user2credits(hinfo->cfg.avg);
} else {
/* update expiration timeout */
--- a/net/netfilter/xt_limit.c
+++ b/net/netfilter/xt_limit.c
@@ -88,8 +88,7 @@ limit_mt(const struct sk_buff *skb, stru
}
/* Precision saver. */
-static u_int32_t
-user2credits(u_int32_t user)
+static u32 user2credits(u32 user)
{
/* If multiplying would overflow... */
if (user > 0xFFFFFFFF / (HZ*CREDITS_PER_JIFFY))
@@ -123,7 +122,7 @@ static int limit_mt_check(const struct x
128. */
priv->prev = jiffies;
priv->credit = user2credits(r->avg * r->burst); /* Credits full. */
- r->credit_cap = user2credits(r->avg * r->burst); /* Credits full. */
+ r->credit_cap = priv->credit; /* Credits full. */
r->cost = user2credits(r->avg);
}
return 0;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 43/62] netfilter: xt_limit: have r->cost != 0 case work
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (41 preceding siblings ...)
2012-10-19 2:45 ` [ 42/62] netfilter: limit, hashlimit: avoid duplicated inline Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 44/62] Add CDC-ACM support for the CX93010-2x UCMxx USB Modem Greg Kroah-Hartman
` (18 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Jan Engelhardt, Pablo Neira Ayuso,
David Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Engelhardt <jengelh@inai.de>
commit 82e6bfe2fbc4d48852114c4f979137cd5bf1d1a8 upstream.
Commit v2.6.19-rc1~1272^2~41 tells us that r->cost != 0 can happen when
a running state is saved to userspace and then reinstated from there.
Make sure that private xt_limit area is initialized with correct values.
Otherwise, random matchings due to use of uninitialized memory.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/netfilter/xt_limit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/net/netfilter/xt_limit.c
+++ b/net/netfilter/xt_limit.c
@@ -117,11 +117,11 @@ static int limit_mt_check(const struct x
/* For SMP, we only want to use one set of state. */
r->master = priv;
+ /* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies *
+ 128. */
+ priv->prev = jiffies;
+ priv->credit = user2credits(r->avg * r->burst); /* Credits full. */
if (r->cost == 0) {
- /* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies *
- 128. */
- priv->prev = jiffies;
- priv->credit = user2credits(r->avg * r->burst); /* Credits full. */
r->credit_cap = priv->credit; /* Credits full. */
r->cost = user2credits(r->avg);
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 44/62] Add CDC-ACM support for the CX93010-2x UCMxx USB Modem
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (42 preceding siblings ...)
2012-10-19 2:45 ` [ 43/62] netfilter: xt_limit: have r->cost != 0 case work Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 45/62] drm/radeon: Dont destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy() Greg Kroah-Hartman
` (17 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Jean-Christian de Rivaz,
David S. Miller
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jean-Christian de Rivaz <jc@eclis.ch>
commit e7d491a19d3e3aac544070293891a2542ae0c565 upstream.
This USB V.92/V.32bis Controllered Modem have the USB vendor ID 0x0572
and device ID 0x1340. It need the NO_UNION_NORMAL quirk to be recognized.
Reference:
http://www.conexant.com/servlets/DownloadServlet/DSH-201723-005.pdf?docid=1725&revid=5
See idVendor and idProduct in table 6-1. Device Descriptors
Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/class/cdc-acm.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1551,6 +1551,9 @@ static const struct usb_device_id acm_id
Maybe we should define a new
quirk for this. */
},
+ { USB_DEVICE(0x0572, 0x1340), /* Conexant CX93010-2x UCMxx */
+ .driver_info = NO_UNION_NORMAL,
+ },
{ USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 45/62] drm/radeon: Dont destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy().
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (43 preceding siblings ...)
2012-10-19 2:45 ` [ 44/62] Add CDC-ACM support for the CX93010-2x UCMxx USB Modem Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 46/62] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag Greg Kroah-Hartman
` (16 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Egbert Eich, Alex Deucher
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Egbert Eich <eich@suse.de>
commit 082918471139b07964967cfe5f70230909c82ae1 upstream.
radeon_i2c_fini() walks thru the list of I2C bus recs rdev->i2c_bus[]
to destroy each of them.
radeon_ext_tmds_enc_destroy() however also has code to destroy it's
associated I2C bus rec which has been obtained by radeon_i2c_lookup()
and is therefore also in the i2c_bus[] list.
This causes a double free resulting in a kernel panic when unloading
the radeon driver.
Removing destroy code from radeon_ext_tmds_enc_destroy() fixes this
problem.
agd5f: fix compiler warning
Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -973,11 +973,7 @@ static void radeon_legacy_tmds_ext_mode_
static void radeon_ext_tmds_enc_destroy(struct drm_encoder *encoder)
{
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
- struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv;
- if (tmds) {
- if (tmds->i2c_bus)
- radeon_i2c_destroy(tmds->i2c_bus);
- }
+ /* don't destroy the i2c bus record here, this will be done in radeon_i2c_fini */
kfree(radeon_encoder->enc_priv);
drm_encoder_cleanup(encoder);
kfree(radeon_encoder);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 46/62] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (44 preceding siblings ...)
2012-10-19 2:45 ` [ 45/62] drm/radeon: Dont destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy() Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 47/62] jbd: Fix assertion failure in commit code due to lacking transaction credits Greg Kroah-Hartman
` (15 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Adam Jackson, Jani Nikula,
Daniel Vetter
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jani Nikula <jani.nikula@intel.com>
commit 0c96c65b48fba3ffe9822a554cbc0cd610765cd5 upstream.
The dithering introduced in
commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Dec 13 15:41:00 2011 -0800
drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the INTEL_MODE_DP_FORCE_6BPC flag in the private_flags of the
adjusted mode, while i9xx_crtc_mode_set() and ironlake_crtc_mode_set() use
the original mode, without the flag, so it would never have any
effect. However, the BPC was clamped by VBT settings, making things work by
coincidence, until that part was removed in
commit 4344b813f105a19f793f1fd93ad775b784648b95
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Fri Aug 10 11:10:20 2012 +0200
Use adjusted_mode instead of mode when checking for
INTEL_MODE_DP_FORCE_6BPC to make the flag have effect.
v2: Don't forget to fix this in i9xx_crtc_mode_set() also, pointed out by
Daniel both before and after sending the first patch.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47621
CC: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5318,7 +5318,7 @@ static int i9xx_crtc_mode_set(struct drm
/* default to 8bpc */
pipeconf &= ~(PIPECONF_BPP_MASK | PIPECONF_DITHER_EN);
if (is_dp) {
- if (mode->private_flags & INTEL_MODE_DP_FORCE_6BPC) {
+ if (adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC) {
pipeconf |= PIPECONF_BPP_6 |
PIPECONF_DITHER_EN |
PIPECONF_DITHER_TYPE_SP;
@@ -5782,7 +5782,7 @@ static int ironlake_crtc_mode_set(struct
/* determine panel color depth */
temp = I915_READ(PIPECONF(pipe));
temp &= ~PIPE_BPC_MASK;
- dither = intel_choose_pipe_bpp_dither(crtc, &pipe_bpp, mode);
+ dither = intel_choose_pipe_bpp_dither(crtc, &pipe_bpp, adjusted_mode);
switch (pipe_bpp) {
case 18:
temp |= PIPE_6BPC;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 47/62] jbd: Fix assertion failure in commit code due to lacking transaction credits
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (45 preceding siblings ...)
2012-10-19 2:45 ` [ 46/62] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 48/62] e1000e: Change wthresh to 1 to avoid possible Tx stalls Greg Kroah-Hartman
` (14 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Josef Bacik, Jan Kara
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <jack@suse.cz>
commit 09e05d4805e6c524c1af74e524e5d0528bb3fef3 upstream.
ext3 users of data=journal mode with blocksize < pagesize were occasionally
hitting assertion failure in journal_commit_transaction() checking whether the
transaction has at least as many credits reserved as buffers attached. The
core of the problem is that when a file gets truncated, buffers that still need
checkpointing or that are attached to the committing transaction are left with
buffer_mapped set. When this happens to buffers beyond i_size attached to a
page stradding i_size, subsequent write extending the file will see these
buffers and as they are mapped (but underlying blocks were freed) things go
awry from here.
The assertion failure just coincidentally (and in this case luckily as we would
start corrupting filesystem) triggers due to journal_head not being properly
cleaned up as well.
Under some rare circumstances this bug could even hit data=ordered mode users.
There the assertion won't trigger and we would end up corrupting the
filesystem.
We fix the problem by unmapping buffers if possible (in lots of cases we just
need a buffer attached to a transaction as a place holder but it must not be
written out anyway). And in one case, we just have to bite the bullet and wait
for transaction commit to finish.
Reviewed-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/jbd/commit.c | 45 +++++++++++++++++++++++++++--------
fs/jbd/transaction.c | 64 +++++++++++++++++++++++++++++++++++----------------
2 files changed, 78 insertions(+), 31 deletions(-)
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -86,7 +86,12 @@ nope:
static void release_data_buffer(struct buffer_head *bh)
{
if (buffer_freed(bh)) {
+ WARN_ON_ONCE(buffer_dirty(bh));
clear_buffer_freed(bh);
+ clear_buffer_mapped(bh);
+ clear_buffer_new(bh);
+ clear_buffer_req(bh);
+ bh->b_bdev = NULL;
release_buffer_page(bh);
} else
put_bh(bh);
@@ -853,17 +858,35 @@ restart_loop:
* there's no point in keeping a checkpoint record for
* it. */
- /* A buffer which has been freed while still being
- * journaled by a previous transaction may end up still
- * being dirty here, but we want to avoid writing back
- * that buffer in the future after the "add to orphan"
- * operation been committed, That's not only a performance
- * gain, it also stops aliasing problems if the buffer is
- * left behind for writeback and gets reallocated for another
- * use in a different page. */
- if (buffer_freed(bh) && !jh->b_next_transaction) {
- clear_buffer_freed(bh);
- clear_buffer_jbddirty(bh);
+ /*
+ * A buffer which has been freed while still being journaled by
+ * a previous transaction.
+ */
+ if (buffer_freed(bh)) {
+ /*
+ * If the running transaction is the one containing
+ * "add to orphan" operation (b_next_transaction !=
+ * NULL), we have to wait for that transaction to
+ * commit before we can really get rid of the buffer.
+ * So just clear b_modified to not confuse transaction
+ * credit accounting and refile the buffer to
+ * BJ_Forget of the running transaction. If the just
+ * committed transaction contains "add to orphan"
+ * operation, we can completely invalidate the buffer
+ * now. We are rather throughout in that since the
+ * buffer may be still accessible when blocksize <
+ * pagesize and it is attached to the last partial
+ * page.
+ */
+ jh->b_modified = 0;
+ if (!jh->b_next_transaction) {
+ clear_buffer_freed(bh);
+ clear_buffer_jbddirty(bh);
+ clear_buffer_mapped(bh);
+ clear_buffer_new(bh);
+ clear_buffer_req(bh);
+ bh->b_bdev = NULL;
+ }
}
if (buffer_jbddirty(bh)) {
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1845,15 +1845,16 @@ static int __dispose_buffer(struct journ
* We're outside-transaction here. Either or both of j_running_transaction
* and j_committing_transaction may be NULL.
*/
-static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh)
+static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh,
+ int partial_page)
{
transaction_t *transaction;
struct journal_head *jh;
int may_free = 1;
- int ret;
BUFFER_TRACE(bh, "entry");
+retry:
/*
* It is safe to proceed here without the j_list_lock because the
* buffers cannot be stolen by try_to_free_buffers as long as we are
@@ -1881,10 +1882,18 @@ static int journal_unmap_buffer(journal_
* clear the buffer dirty bit at latest at the moment when the
* transaction marking the buffer as freed in the filesystem
* structures is committed because from that moment on the
- * buffer can be reallocated and used by a different page.
+ * block can be reallocated and used by a different page.
* Since the block hasn't been freed yet but the inode has
* already been added to orphan list, it is safe for us to add
* the buffer to BJ_Forget list of the newest transaction.
+ *
+ * Also we have to clear buffer_mapped flag of a truncated buffer
+ * because the buffer_head may be attached to the page straddling
+ * i_size (can happen only when blocksize < pagesize) and thus the
+ * buffer_head can be reused when the file is extended again. So we end
+ * up keeping around invalidated buffers attached to transactions'
+ * BJ_Forget list just to stop checkpointing code from cleaning up
+ * the transaction this buffer was modified in.
*/
transaction = jh->b_transaction;
if (transaction == NULL) {
@@ -1911,13 +1920,9 @@ static int journal_unmap_buffer(journal_
* committed, the buffer won't be needed any
* longer. */
JBUFFER_TRACE(jh, "checkpointed: add to BJ_Forget");
- ret = __dispose_buffer(jh,
+ may_free = __dispose_buffer(jh,
journal->j_running_transaction);
- journal_put_journal_head(jh);
- spin_unlock(&journal->j_list_lock);
- jbd_unlock_bh_state(bh);
- spin_unlock(&journal->j_state_lock);
- return ret;
+ goto zap_buffer;
} else {
/* There is no currently-running transaction. So the
* orphan record which we wrote for this file must have
@@ -1925,13 +1930,9 @@ static int journal_unmap_buffer(journal_
* the committing transaction, if it exists. */
if (journal->j_committing_transaction) {
JBUFFER_TRACE(jh, "give to committing trans");
- ret = __dispose_buffer(jh,
+ may_free = __dispose_buffer(jh,
journal->j_committing_transaction);
- journal_put_journal_head(jh);
- spin_unlock(&journal->j_list_lock);
- jbd_unlock_bh_state(bh);
- spin_unlock(&journal->j_state_lock);
- return ret;
+ goto zap_buffer;
} else {
/* The orphan record's transaction has
* committed. We can cleanse this buffer */
@@ -1952,10 +1953,24 @@ static int journal_unmap_buffer(journal_
}
/*
* The buffer is committing, we simply cannot touch
- * it. So we just set j_next_transaction to the
- * running transaction (if there is one) and mark
- * buffer as freed so that commit code knows it should
- * clear dirty bits when it is done with the buffer.
+ * it. If the page is straddling i_size we have to wait
+ * for commit and try again.
+ */
+ if (partial_page) {
+ tid_t tid = journal->j_committing_transaction->t_tid;
+
+ journal_put_journal_head(jh);
+ spin_unlock(&journal->j_list_lock);
+ jbd_unlock_bh_state(bh);
+ spin_unlock(&journal->j_state_lock);
+ log_wait_commit(journal, tid);
+ goto retry;
+ }
+ /*
+ * OK, buffer won't be reachable after truncate. We just set
+ * j_next_transaction to the running transaction (if there is
+ * one) and mark buffer as freed so that commit code knows it
+ * should clear dirty bits when it is done with the buffer.
*/
set_buffer_freed(bh);
if (journal->j_running_transaction && buffer_jbddirty(bh))
@@ -1978,6 +1993,14 @@ static int journal_unmap_buffer(journal_
}
zap_buffer:
+ /*
+ * This is tricky. Although the buffer is truncated, it may be reused
+ * if blocksize < pagesize and it is attached to the page straddling
+ * EOF. Since the buffer might have been added to BJ_Forget list of the
+ * running transaction, journal_get_write_access() won't clear
+ * b_modified and credit accounting gets confused. So clear b_modified
+ * here. */
+ jh->b_modified = 0;
journal_put_journal_head(jh);
zap_buffer_no_jh:
spin_unlock(&journal->j_list_lock);
@@ -2026,7 +2049,8 @@ void journal_invalidatepage(journal_t *j
if (offset <= curr_off) {
/* This block is wholly outside the truncation point */
lock_buffer(bh);
- may_free &= journal_unmap_buffer(journal, bh);
+ may_free &= journal_unmap_buffer(journal, bh,
+ offset > 0);
unlock_buffer(bh);
}
curr_off = next_off;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 48/62] e1000e: Change wthresh to 1 to avoid possible Tx stalls
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (46 preceding siblings ...)
2012-10-19 2:45 ` [ 47/62] jbd: Fix assertion failure in commit code due to lacking transaction credits Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 49/62] tpm: Propagate error from tpm_transmit to fix a timeout hang Greg Kroah-Hartman
` (13 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Denys Fedoryshchenko, Hiroaki SHIMODA,
Jesse Brandeburg, David S. Miller, eric.dumazet, therbert
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
commit 8edc0e624db3756783233e464879eb2e3b904c13 upstream.
This patch originated from Hiroaki SHIMODA but has been modified
by Intel with some minor cleanups and additional commit log text.
Denys Fedoryshchenko and others reported Tx stalls on e1000e with
BQL enabled. Issue was root caused to hardware delays. They were
introduced because some of the e1000e hardware with transmit
writeback bursting enabled, waits until the driver does an
explict flush OR there are WTHRESH descriptors to write back.
Sometimes the delays in question were on the order of seconds,
causing visible lag for ssh sessions and unacceptable tx
completion latency, especially for BQL enabled kernels.
To avoid possible Tx stalls, change WTHRESH back to 1.
The current plan is to investigate a method for re-enabling
WTHRESH while not harming BQL, but those patches will be later
for net-next if they work.
please enqueue for stable since v3.3 as this bug was introduced in
commit 3f0cfa3bc11e7f00c9994e0f469cbc0e7da7b00c
Author: Tom Herbert <therbert@google.com>
Date: Mon Nov 28 16:33:16 2011 +0000
e1000e: Support for byte queue limits
Changes to e1000e to use byte queue limits.
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Tested-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
CC: eric.dumazet@gmail.com
CC: therbert@google.com
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/intel/e1000e/e1000.h | 6 +++---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -175,13 +175,13 @@ struct e1000_info;
/*
* in the case of WTHRESH, it appears at least the 82571/2 hardware
* writes back 4 descriptors when WTHRESH=5, and 3 descriptors when
- * WTHRESH=4, and since we want 64 bytes at a time written back, set
- * it to 5
+ * WTHRESH=4, so a setting of 5 gives the most efficient bus
+ * utilization but to avoid possible Tx stalls, set it to 1
*/
#define E1000_TXDCTL_DMA_BURST_ENABLE \
(E1000_TXDCTL_GRAN | /* set descriptor granularity */ \
E1000_TXDCTL_COUNT_DESC | \
- (5 << 16) | /* wthresh must be +1 more than desired */\
+ (1 << 16) | /* wthresh must be +1 more than desired */\
(1 << 8) | /* hthresh */ \
0x1f) /* pthresh */
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -2806,7 +2806,7 @@ static void e1000_configure_tx(struct e1
* set up some performance related parameters to encourage the
* hardware to use the bus more efficiently in bursts, depends
* on the tx_int_delay to be enabled,
- * wthresh = 5 ==> burst write a cacheline (64 bytes) at a time
+ * wthresh = 1 ==> burst write is disabled to avoid Tx stalls
* hthresh = 1 ==> prefetch when one or more available
* pthresh = 0x1f ==> prefetch if internal cache 31 or less
* BEWARE: this seems to work but should be considered first if
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 49/62] tpm: Propagate error from tpm_transmit to fix a timeout hang
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (47 preceding siblings ...)
2012-10-19 2:45 ` [ 48/62] e1000e: Change wthresh to 1 to avoid possible Tx stalls Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 50/62] eCryptfs: Unlink lower inode when ecryptfs_create() fails Greg Kroah-Hartman
` (12 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Peter Huewe, Kent Yoder
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Huewe <peter.huewe@infineon.com>
commit abce9ac292e13da367bbd22c1f7669f988d931ac upstream.
tpm_write calls tpm_transmit without checking the return value and
assigns the return value unconditionally to chip->pending_data, even if
it's an error value.
This causes three bugs.
So if we write to /dev/tpm0 with a tpm_param_size bigger than
TPM_BUFSIZE=0x1000 (e.g. 0x100a)
and a bufsize also bigger than TPM_BUFSIZE (e.g. 0x100a)
tpm_transmit returns -E2BIG which is assigned to chip->pending_data as
-7, but tpm_write returns that TPM_BUFSIZE bytes have been successfully
been written to the TPM, altough this is not true (bug #1).
As we did write more than than TPM_BUFSIZE bytes but tpm_write reports
that only TPM_BUFSIZE bytes have been written the vfs tries to write
the remaining bytes (in this case 10 bytes) to the tpm device driver via
tpm_write which then blocks at
/* cannot perform a write until the read has cleared
either via tpm_read or a user_read_timer timeout */
while (atomic_read(&chip->data_pending) != 0)
msleep(TPM_TIMEOUT);
for 60 seconds, since data_pending is -7 and nobody is able to
read it (since tpm_read luckily checks if data_pending is greater than
0) (#bug 2).
After that the remaining bytes are written to the TPM which are
interpreted by the tpm as a normal command. (bug #3)
So if the last bytes of the command stream happen to be a e.g.
tpm_force_clear this gets accidentally sent to the TPM.
This patch fixes all three bugs, by propagating the error code of
tpm_write and returning -E2BIG if the input buffer is too big,
since the response from the tpm for a truncated value is bogus anyway.
Moreover it returns -EBUSY to userspace if there is a response ready to be
read.
Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/tpm/tpm.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -1186,17 +1186,20 @@ ssize_t tpm_write(struct file *file, con
size_t size, loff_t *off)
{
struct tpm_chip *chip = file->private_data;
- size_t in_size = size, out_size;
+ size_t in_size = size;
+ ssize_t out_size;
/* cannot perform a write until the read has cleared
- either via tpm_read or a user_read_timer timeout */
- while (atomic_read(&chip->data_pending) != 0)
- msleep(TPM_TIMEOUT);
-
- mutex_lock(&chip->buffer_mutex);
+ either via tpm_read or a user_read_timer timeout.
+ This also prevents splitted buffered writes from blocking here.
+ */
+ if (atomic_read(&chip->data_pending) != 0)
+ return -EBUSY;
if (in_size > TPM_BUFSIZE)
- in_size = TPM_BUFSIZE;
+ return -E2BIG;
+
+ mutex_lock(&chip->buffer_mutex);
if (copy_from_user
(chip->data_buffer, (void __user *) buf, in_size)) {
@@ -1206,6 +1209,10 @@ ssize_t tpm_write(struct file *file, con
/* atomic tpm command send and result receive */
out_size = tpm_transmit(chip, chip->data_buffer, TPM_BUFSIZE);
+ if (out_size < 0) {
+ mutex_unlock(&chip->buffer_mutex);
+ return out_size;
+ }
atomic_set(&chip->data_pending, out_size);
mutex_unlock(&chip->buffer_mutex);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 50/62] eCryptfs: Unlink lower inode when ecryptfs_create() fails
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (48 preceding siblings ...)
2012-10-19 2:45 ` [ 49/62] tpm: Propagate error from tpm_transmit to fix a timeout hang Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 51/62] eCryptfs: Initialize empty lower files when opening them Greg Kroah-Hartman
` (11 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Tyler Hicks, John Johansen,
Colin Ian King, Jonathan Nieder
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <tyhicks@canonical.com>
commit 8bc2d3cf612994a960c2e8eaea37f6676f67082a upstream.
ecryptfs_create() creates a lower inode, allocates an eCryptfs inode,
initializes the eCryptfs inode and cryptographic metadata attached to
the inode, and then writes the metadata to the header of the file.
If an error was to occur after the lower inode was created, an empty
lower file would be left in the lower filesystem. This is a problem
because ecryptfs_open() refuses to open any lower files which do not
have the appropriate metadata in the file header.
This patch properly unlinks the lower inode when an error occurs in the
later stages of ecryptfs_create(), reducing the chance that an empty
lower file will be left in the lower filesystem.
https://launchpad.net/bugs/872905
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: John Johansen <john.johansen@canonical.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ecryptfs/inode.c | 55 ++++++++++++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 23 deletions(-)
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -143,6 +143,31 @@ static int ecryptfs_interpose(struct den
return 0;
}
+static int ecryptfs_do_unlink(struct inode *dir, struct dentry *dentry,
+ struct inode *inode)
+{
+ struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
+ struct inode *lower_dir_inode = ecryptfs_inode_to_lower(dir);
+ struct dentry *lower_dir_dentry;
+ int rc;
+
+ dget(lower_dentry);
+ lower_dir_dentry = lock_parent(lower_dentry);
+ rc = vfs_unlink(lower_dir_inode, lower_dentry);
+ if (rc) {
+ printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
+ goto out_unlock;
+ }
+ fsstack_copy_attr_times(dir, lower_dir_inode);
+ set_nlink(inode, ecryptfs_inode_to_lower(inode)->i_nlink);
+ inode->i_ctime = dir->i_ctime;
+ d_drop(dentry);
+out_unlock:
+ unlock_dir(lower_dir_dentry);
+ dput(lower_dentry);
+ return rc;
+}
+
/**
* ecryptfs_do_create
* @directory_inode: inode of the new file's dentry's parent in ecryptfs
@@ -182,8 +207,10 @@ ecryptfs_do_create(struct inode *directo
}
inode = __ecryptfs_get_inode(lower_dentry->d_inode,
directory_inode->i_sb);
- if (IS_ERR(inode))
+ if (IS_ERR(inode)) {
+ vfs_unlink(lower_dir_dentry->d_inode, lower_dentry);
goto out_lock;
+ }
fsstack_copy_attr_times(directory_inode, lower_dir_dentry->d_inode);
fsstack_copy_inode_size(directory_inode, lower_dir_dentry->d_inode);
out_lock:
@@ -265,7 +292,9 @@ ecryptfs_create(struct inode *directory_
* that this on disk file is prepared to be an ecryptfs file */
rc = ecryptfs_initialize_file(ecryptfs_dentry, ecryptfs_inode);
if (rc) {
- drop_nlink(ecryptfs_inode);
+ ecryptfs_do_unlink(directory_inode, ecryptfs_dentry,
+ ecryptfs_inode);
+ make_bad_inode(ecryptfs_inode);
unlock_new_inode(ecryptfs_inode);
iput(ecryptfs_inode);
goto out;
@@ -477,27 +506,7 @@ out_lock:
static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry)
{
- int rc = 0;
- struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
- struct inode *lower_dir_inode = ecryptfs_inode_to_lower(dir);
- struct dentry *lower_dir_dentry;
-
- dget(lower_dentry);
- lower_dir_dentry = lock_parent(lower_dentry);
- rc = vfs_unlink(lower_dir_inode, lower_dentry);
- if (rc) {
- printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
- goto out_unlock;
- }
- fsstack_copy_attr_times(dir, lower_dir_inode);
- set_nlink(dentry->d_inode,
- ecryptfs_inode_to_lower(dentry->d_inode)->i_nlink);
- dentry->d_inode->i_ctime = dir->i_ctime;
- d_drop(dentry);
-out_unlock:
- unlock_dir(lower_dir_dentry);
- dput(lower_dentry);
- return rc;
+ return ecryptfs_do_unlink(dir, dentry, dentry->d_inode);
}
static int ecryptfs_symlink(struct inode *dir, struct dentry *dentry,
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 51/62] eCryptfs: Initialize empty lower files when opening them
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (49 preceding siblings ...)
2012-10-19 2:45 ` [ 50/62] eCryptfs: Unlink lower inode when ecryptfs_create() fails Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 52/62] eCryptfs: Revert to a writethrough cache model Greg Kroah-Hartman
` (10 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Tyler Hicks, John Johansen,
Colin Ian King, Jonathan Nieder
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <tyhicks@canonical.com>
commit e3ccaa9761200952cc269b1f4b7d7bb77a5e071b upstream.
Historically, eCryptfs has only initialized lower files in the
ecryptfs_create() path. Lower file initialization is the act of writing
the cryptographic metadata from the inode's crypt_stat to the header of
the file. The ecryptfs_open() path already expects that metadata to be
in the header of the file.
A number of users have reported empty lower files in beneath their
eCryptfs mounts. Most of the causes for those empty files being left
around have been addressed, but the presence of empty files causes
problems due to the lack of proper cryptographic metadata.
To transparently solve this problem, this patch initializes empty lower
files in the ecryptfs_open() error path. If the metadata is unreadable
due to the lower inode size being 0, plaintext passthrough support is
not in use, and the metadata is stored in the header of the file (as
opposed to the user.ecryptfs extended attribute), the lower file will be
initialized.
The number of nested conditionals in ecryptfs_open() was getting out of
hand, so a helper function was created. To avoid the same nested
conditional problem, the conditional logic was reversed inside of the
helper function.
https://launchpad.net/bugs/911507
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: John Johansen <john.johansen@canonical.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ecryptfs/ecryptfs_kernel.h | 2 +
fs/ecryptfs/file.c | 71 ++++++++++++++++++++++++++----------------
fs/ecryptfs/inode.c | 4 +-
3 files changed, 49 insertions(+), 28 deletions(-)
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -568,6 +568,8 @@ struct ecryptfs_open_req {
struct inode *ecryptfs_get_inode(struct inode *lower_inode,
struct super_block *sb);
void ecryptfs_i_size_init(const char *page_virt, struct inode *inode);
+int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
+ struct inode *ecryptfs_inode);
int ecryptfs_decode_and_decrypt_filename(char **decrypted_name,
size_t *decrypted_name_size,
struct dentry *ecryptfs_dentry,
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -161,6 +161,48 @@ static int ecryptfs_file_mmap(struct fil
struct kmem_cache *ecryptfs_file_info_cache;
+static int read_or_initialize_metadata(struct dentry *dentry)
+{
+ struct inode *inode = dentry->d_inode;
+ struct ecryptfs_mount_crypt_stat *mount_crypt_stat;
+ struct ecryptfs_crypt_stat *crypt_stat;
+ int rc;
+
+ crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat;
+ mount_crypt_stat = &ecryptfs_superblock_to_private(
+ inode->i_sb)->mount_crypt_stat;
+ mutex_lock(&crypt_stat->cs_mutex);
+
+ if (crypt_stat->flags & ECRYPTFS_POLICY_APPLIED &&
+ crypt_stat->flags & ECRYPTFS_KEY_VALID) {
+ rc = 0;
+ goto out;
+ }
+
+ rc = ecryptfs_read_metadata(dentry);
+ if (!rc)
+ goto out;
+
+ if (mount_crypt_stat->flags & ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED) {
+ crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED
+ | ECRYPTFS_ENCRYPTED);
+ rc = 0;
+ goto out;
+ }
+
+ if (!(mount_crypt_stat->flags & ECRYPTFS_XATTR_METADATA_ENABLED) &&
+ !i_size_read(ecryptfs_inode_to_lower(inode))) {
+ rc = ecryptfs_initialize_file(dentry, inode);
+ if (!rc)
+ goto out;
+ }
+
+ rc = -EIO;
+out:
+ mutex_unlock(&crypt_stat->cs_mutex);
+ return rc;
+}
+
/**
* ecryptfs_open
* @inode: inode speciying file to open
@@ -236,32 +278,9 @@ static int ecryptfs_open(struct inode *i
rc = 0;
goto out;
}
- mutex_lock(&crypt_stat->cs_mutex);
- if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)
- || !(crypt_stat->flags & ECRYPTFS_KEY_VALID)) {
- rc = ecryptfs_read_metadata(ecryptfs_dentry);
- if (rc) {
- ecryptfs_printk(KERN_DEBUG,
- "Valid headers not found\n");
- if (!(mount_crypt_stat->flags
- & ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED)) {
- rc = -EIO;
- printk(KERN_WARNING "Either the lower file "
- "is not in a valid eCryptfs format, "
- "or the key could not be retrieved. "
- "Plaintext passthrough mode is not "
- "enabled; returning -EIO\n");
- mutex_unlock(&crypt_stat->cs_mutex);
- goto out_put;
- }
- rc = 0;
- crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED
- | ECRYPTFS_ENCRYPTED);
- mutex_unlock(&crypt_stat->cs_mutex);
- goto out;
- }
- }
- mutex_unlock(&crypt_stat->cs_mutex);
+ rc = read_or_initialize_metadata(ecryptfs_dentry);
+ if (rc)
+ goto out_put;
ecryptfs_printk(KERN_DEBUG, "inode w/ addr = [0x%p], i_ino = "
"[0x%.16lx] size: [0x%.16llx]\n", inode, inode->i_ino,
(unsigned long long)i_size_read(inode));
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -227,8 +227,8 @@ out:
*
* Returns zero on success
*/
-static int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
- struct inode *ecryptfs_inode)
+int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
+ struct inode *ecryptfs_inode)
{
struct ecryptfs_crypt_stat *crypt_stat =
&ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 52/62] eCryptfs: Revert to a writethrough cache model
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (50 preceding siblings ...)
2012-10-19 2:45 ` [ 51/62] eCryptfs: Initialize empty lower files when opening them Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 53/62] eCryptfs: Write out all dirty pages just before releasing the lower file Greg Kroah-Hartman
` (9 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Tyler Hicks, Colin King, Thieu Le,
Jonathan Nieder
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <tyhicks@canonical.com>
commit 821f7494a77627fb1ab539591c57b22cdca702d6 upstream.
A change was made about a year ago to get eCryptfs to better utilize its
page cache during writes. The idea was to do the page encryption
operations during page writeback, rather than doing them when initially
writing into the page cache, to reduce the number of page encryption
operations during sequential writes. This meant that the encrypted page
would only be written to the lower filesystem during page writeback,
which was a change from how eCryptfs had previously wrote to the lower
filesystem in ecryptfs_write_end().
The change caused a few eCryptfs-internal bugs that were shook out.
Unfortunately, more grave side effects have been identified that will
force changes outside of eCryptfs. Because the lower filesystem isn't
consulted until page writeback, eCryptfs has no way to pass lower write
errors (ENOSPC, mainly) back to userspace. Additionaly, it was reported
that quotas could be bypassed because of the way eCryptfs may sometimes
open the lower filesystem using a privileged kthread.
It would be nice to resolve the latest issues, but it is best if the
eCryptfs commits be reverted to the old behavior in the meantime.
This reverts:
32001d6f "eCryptfs: Flush file in vma close"
5be79de2 "eCryptfs: Flush dirty pages in setattr"
57db4e8d "ecryptfs: modify write path to encrypt page in writepage"
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Tested-by: Colin King <colin.king@canonical.com>
Cc: Colin King <colin.king@canonical.com>
Cc: Thieu Le <thieule@google.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ecryptfs/file.c | 33 ++-------------------------------
fs/ecryptfs/inode.c | 6 ------
fs/ecryptfs/mmap.c | 39 +++++++++++++--------------------------
3 files changed, 15 insertions(+), 63 deletions(-)
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -138,27 +138,6 @@ out:
return rc;
}
-static void ecryptfs_vma_close(struct vm_area_struct *vma)
-{
- filemap_write_and_wait(vma->vm_file->f_mapping);
-}
-
-static const struct vm_operations_struct ecryptfs_file_vm_ops = {
- .close = ecryptfs_vma_close,
- .fault = filemap_fault,
-};
-
-static int ecryptfs_file_mmap(struct file *file, struct vm_area_struct *vma)
-{
- int rc;
-
- rc = generic_file_mmap(file, vma);
- if (!rc)
- vma->vm_ops = &ecryptfs_file_vm_ops;
-
- return rc;
-}
-
struct kmem_cache *ecryptfs_file_info_cache;
static int read_or_initialize_metadata(struct dentry *dentry)
@@ -311,15 +290,7 @@ static int ecryptfs_release(struct inode
static int
ecryptfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{
- int rc = 0;
-
- rc = generic_file_fsync(file, start, end, datasync);
- if (rc)
- goto out;
- rc = vfs_fsync_range(ecryptfs_file_to_lower(file), start, end,
- datasync);
-out:
- return rc;
+ return vfs_fsync(ecryptfs_file_to_lower(file), datasync);
}
static int ecryptfs_fasync(int fd, struct file *file, int flag)
@@ -388,7 +359,7 @@ const struct file_operations ecryptfs_ma
#ifdef CONFIG_COMPAT
.compat_ioctl = ecryptfs_compat_ioctl,
#endif
- .mmap = ecryptfs_file_mmap,
+ .mmap = generic_file_mmap,
.open = ecryptfs_open,
.flush = ecryptfs_flush,
.release = ecryptfs_release,
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -1016,12 +1016,6 @@ static int ecryptfs_setattr(struct dentr
goto out;
}
- if (S_ISREG(inode->i_mode)) {
- rc = filemap_write_and_wait(inode->i_mapping);
- if (rc)
- goto out;
- fsstack_copy_attr_all(inode, lower_inode);
- }
memcpy(&lower_ia, ia, sizeof(lower_ia));
if (ia->ia_valid & ATTR_FILE)
lower_ia.ia_file = ecryptfs_file_to_lower(ia->ia_file);
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -66,18 +66,6 @@ static int ecryptfs_writepage(struct pag
{
int rc;
- /*
- * Refuse to write the page out if we are called from reclaim context
- * since our writepage() path may potentially allocate memory when
- * calling into the lower fs vfs_write() which may in turn invoke
- * us again.
- */
- if (current->flags & PF_MEMALLOC) {
- redirty_page_for_writepage(wbc, page);
- rc = 0;
- goto out;
- }
-
rc = ecryptfs_encrypt_page(page);
if (rc) {
ecryptfs_printk(KERN_WARNING, "Error encrypting "
@@ -498,7 +486,6 @@ static int ecryptfs_write_end(struct fil
struct ecryptfs_crypt_stat *crypt_stat =
&ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat;
int rc;
- int need_unlock_page = 1;
ecryptfs_printk(KERN_DEBUG, "Calling fill_zeros_to_end_of_page"
"(page w/ index = [0x%.16lx], to = [%d])\n", index, to);
@@ -519,26 +506,26 @@ static int ecryptfs_write_end(struct fil
"zeros in page with index = [0x%.16lx]\n", index);
goto out;
}
- set_page_dirty(page);
- unlock_page(page);
- need_unlock_page = 0;
+ rc = ecryptfs_encrypt_page(page);
+ if (rc) {
+ ecryptfs_printk(KERN_WARNING, "Error encrypting page (upper "
+ "index [0x%.16lx])\n", index);
+ goto out;
+ }
if (pos + copied > i_size_read(ecryptfs_inode)) {
i_size_write(ecryptfs_inode, pos + copied);
ecryptfs_printk(KERN_DEBUG, "Expanded file size to "
"[0x%.16llx]\n",
(unsigned long long)i_size_read(ecryptfs_inode));
- balance_dirty_pages_ratelimited(mapping);
- rc = ecryptfs_write_inode_size_to_metadata(ecryptfs_inode);
- if (rc) {
- printk(KERN_ERR "Error writing inode size to metadata; "
- "rc = [%d]\n", rc);
- goto out;
- }
}
- rc = copied;
+ rc = ecryptfs_write_inode_size_to_metadata(ecryptfs_inode);
+ if (rc)
+ printk(KERN_ERR "Error writing inode size to metadata; "
+ "rc = [%d]\n", rc);
+ else
+ rc = copied;
out:
- if (need_unlock_page)
- unlock_page(page);
+ unlock_page(page);
page_cache_release(page);
return rc;
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 53/62] eCryptfs: Write out all dirty pages just before releasing the lower file
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (51 preceding siblings ...)
2012-10-19 2:45 ` [ 52/62] eCryptfs: Revert to a writethrough cache model Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 54/62] eCryptfs: Call lower ->flush() from ecryptfs_flush() Greg Kroah-Hartman
` (8 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Tyler Hicks, Artemy Tregubenko,
Colin Ian King
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <tyhicks@canonical.com>
commit 7149f2558d5b5b988726662fe58b1c388337805b upstream.
Fixes a regression caused by:
821f749 eCryptfs: Revert to a writethrough cache model
That patch reverted some code (specifically, 32001d6f) that was
necessary to properly handle open() -> mmap() -> close() -> dirty pages
-> munmap(), because the lower file could be closed before the dirty
pages are written out.
Rather than reapplying 32001d6f, this approach is a better way of
ensuring that the lower file is still open in order to handle writing
out the dirty pages. It is called from ecryptfs_release(), while we have
a lock on the lower file pointer, just before the lower file gets the
final fput() and we overwrite the pointer.
https://launchpad.net/bugs/1047261
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Artemy Tregubenko <me@arty.name>
Tested-by: Artemy Tregubenko <me@arty.name>
Tested-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ecryptfs/main.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -162,6 +162,7 @@ void ecryptfs_put_lower_file(struct inod
inode_info = ecryptfs_inode_to_private(inode);
if (atomic_dec_and_mutex_lock(&inode_info->lower_file_count,
&inode_info->lower_file_mutex)) {
+ filemap_write_and_wait(inode->i_mapping);
fput(inode_info->lower_file);
inode_info->lower_file = NULL;
mutex_unlock(&inode_info->lower_file_mutex);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 54/62] eCryptfs: Call lower ->flush() from ecryptfs_flush()
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (52 preceding siblings ...)
2012-10-19 2:45 ` [ 53/62] eCryptfs: Write out all dirty pages just before releasing the lower file Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 55/62] usb: gadget: at91_udc: fix dt support Greg Kroah-Hartman
` (7 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Tyler Hicks
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <tyhicks@canonical.com>
commit 64e6651dcc10e9d2cc6230208a8e6c2cfd19ae18 upstream.
Since eCryptfs only calls fput() on the lower file in
ecryptfs_release(), eCryptfs should call the lower filesystem's
->flush() from ecryptfs_flush().
If the lower filesystem implements ->flush(), then eCryptfs should try
to flush out any dirty pages prior to calling the lower ->flush(). If
the lower filesystem does not implement ->flush(), then eCryptfs has no
need to do anything in ecryptfs_flush() since dirty pages are now
written out to the lower filesystem in ecryptfs_release().
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ecryptfs/file.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -275,8 +275,14 @@ out:
static int ecryptfs_flush(struct file *file, fl_owner_t td)
{
- return file->f_mode & FMODE_WRITE
- ? filemap_write_and_wait(file->f_mapping) : 0;
+ struct file *lower_file = ecryptfs_file_to_lower(file);
+
+ if (lower_file->f_op && lower_file->f_op->flush) {
+ filemap_write_and_wait(file->f_mapping);
+ return lower_file->f_op->flush(lower_file, td);
+ }
+
+ return 0;
}
static int ecryptfs_release(struct inode *inode, struct file *file)
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 55/62] usb: gadget: at91_udc: fix dt support
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (53 preceding siblings ...)
2012-10-19 2:45 ` [ 54/62] eCryptfs: Call lower ->flush() from ecryptfs_flush() Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 56/62] ALSA: hda - Always check array bounds in alc_get_line_out_pfx Greg Kroah-Hartman
` (6 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Fabio Porcedda, Felipe Balbi
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio Porcedda <fabio.porcedda@gmail.com>
commit 9c6d196d5aa35e07482f23c3e37755e7a82140e0 upstream.
Don't fail the initialization check for the platform_data
if there is avaiable an associated device tree node.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/gadget/at91_udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1735,7 +1735,7 @@ static int __devinit at91udc_probe(struc
int retval;
struct resource *res;
- if (!dev->platform_data) {
+ if (!dev->platform_data && !pdev->dev.of_node) {
/* small (so we copy it) but critical! */
DBG("missing platform_data\n");
return -ENODEV;
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 56/62] ALSA: hda - Always check array bounds in alc_get_line_out_pfx
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (54 preceding siblings ...)
2012-10-19 2:45 ` [ 55/62] usb: gadget: at91_udc: fix dt support Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 57/62] ASoC: fsi: dont reschedule DMA from an atomic context Greg Kroah-Hartman
` (5 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 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 71aa5ebe36a4e936eff281b375a4707b6a8320f2 upstream.
Even when CONFIG_SND_DEBUG is not enabled, we don't want to
return an arbitrary memory location when the channel count is
larger than we expected.
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 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2665,8 +2665,10 @@ static const char *alc_get_line_out_pfx(
return "PCM";
break;
}
- if (snd_BUG_ON(ch >= ARRAY_SIZE(channel_name)))
+ if (ch >= ARRAY_SIZE(channel_name)) {
+ snd_BUG();
return "PCM";
+ }
return channel_name[ch];
}
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 57/62] ASoC: fsi: dont reschedule DMA from an atomic context
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (55 preceding siblings ...)
2012-10-19 2:45 ` [ 56/62] ALSA: hda - Always check array bounds in alc_get_line_out_pfx Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 58/62] ASoC: wm2200: Use rev A register patches on rev B Greg Kroah-Hartman
` (4 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Do Q.Thang, Guennadi Liakhovetski,
Mark Brown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
commit 57451e437796548d658d03c2c4aab659eafcd799 upstream.
shdma doesn't support transfer re-scheduling or triggering from callbacks
or from atomic context. The fsi driver issues DMA transfers from a tasklet
context, which is a bug. To fix it convert tasklet to a work.
Reported-by: Do Q.Thang <dq-thang@jinso.co.jp>
Tested-by: Do Q.Thang <dq-thang@jinso.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/sh/fsi.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -20,6 +20,7 @@
#include <linux/sh_dma.h>
#include <linux/slab.h>
#include <linux/module.h>
+#include <linux/workqueue.h>
#include <sound/soc.h>
#include <sound/sh_fsi.h>
@@ -199,7 +200,7 @@ struct fsi_stream {
*/
struct dma_chan *chan;
struct sh_dmae_slave slave; /* see fsi_handler_init() */
- struct tasklet_struct tasklet;
+ struct work_struct work;
dma_addr_t dma;
};
@@ -968,9 +969,9 @@ static dma_addr_t fsi_dma_get_area(struc
return io->dma + samples_to_bytes(runtime, io->buff_sample_pos);
}
-static void fsi_dma_do_tasklet(unsigned long data)
+static void fsi_dma_do_work(struct work_struct *work)
{
- struct fsi_stream *io = (struct fsi_stream *)data;
+ struct fsi_stream *io = container_of(work, struct fsi_stream, work);
struct fsi_priv *fsi = fsi_stream_to_priv(io);
struct dma_chan *chan;
struct snd_soc_dai *dai;
@@ -1023,7 +1024,7 @@ static void fsi_dma_do_tasklet(unsigned
* FIXME
*
* In DMAEngine case, codec and FSI cannot be started simultaneously
- * since FSI is using tasklet.
+ * since FSI is using the scheduler work queue.
* Therefore, in capture case, probably FSI FIFO will have got
* overflow error in this point.
* in that case, DMA cannot start transfer until error was cleared.
@@ -1047,7 +1048,7 @@ static bool fsi_dma_filter(struct dma_ch
static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io)
{
- tasklet_schedule(&io->tasklet);
+ schedule_work(&io->work);
return 0;
}
@@ -1087,14 +1088,14 @@ static int fsi_dma_probe(struct fsi_priv
if (!io->chan)
return -EIO;
- tasklet_init(&io->tasklet, fsi_dma_do_tasklet, (unsigned long)io);
+ INIT_WORK(&io->work, fsi_dma_do_work);
return 0;
}
static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io)
{
- tasklet_kill(&io->tasklet);
+ cancel_work_sync(&io->work);
fsi_stream_stop(fsi, io);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 58/62] ASoC: wm2200: Use rev A register patches on rev B
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (56 preceding siblings ...)
2012-10-19 2:45 ` [ 57/62] ASoC: fsi: dont reschedule DMA from an atomic context Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 59/62] ASoC: wm2200: Fix non-inverted OUT2 mute control Greg Kroah-Hartman
` (3 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Mark Brown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit 5ae9eb4cbdfd640269dbd66aa3c92ea8e11cc838 upstream.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/wm2200.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -2091,6 +2091,7 @@ static __devinit int wm2200_i2c_probe(st
switch (wm2200->rev) {
case 0:
+ case 1:
ret = regmap_register_patch(wm2200->regmap, wm2200_reva_patch,
ARRAY_SIZE(wm2200_reva_patch));
if (ret != 0) {
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 59/62] ASoC: wm2200: Fix non-inverted OUT2 mute control
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (57 preceding siblings ...)
2012-10-19 2:45 ` [ 58/62] ASoC: wm2200: Use rev A register patches on rev B Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 60/62] ASoC: omap-abe-twl6040: Fix typo of Vibrator Greg Kroah-Hartman
` (2 subsequent siblings)
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Mark Brown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit a1b98e12b7f8fad2f0aa3c08a3302bcac7ae1ec7 upstream.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/wm2200.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -1028,7 +1028,7 @@ SOC_DOUBLE_R_TLV("OUT2 Digital Volume",
WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0,
digital_tlv),
SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT,
- WM2200_SPK1R_MUTE_SHIFT, 1, 0),
+ WM2200_SPK1R_MUTE_SHIFT, 1, 1),
};
WM2200_MIXER_ENUMS(OUT1L, WM2200_OUT1LMIX_INPUT_1_SOURCE);
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 60/62] ASoC: omap-abe-twl6040: Fix typo of Vibrator
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (58 preceding siblings ...)
2012-10-19 2:45 ` [ 59/62] ASoC: wm2200: Fix non-inverted OUT2 mute control Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 61/62] ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new() Greg Kroah-Hartman
2012-10-19 2:45 ` [ 62/62] ALSA: emu10k1: add chip details for E-mu 1010 PCIe card Greg Kroah-Hartman
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Peter Ujfalusi, Mark Brown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
commit 034940a6b3afbe79022ab6922dd9d2982b78e6d5 upstream.
It is not Vinrator but Vibrator.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/omap/omap-abe-twl6040.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/soc/omap/omap-abe-twl6040.c
+++ b/sound/soc/omap/omap-abe-twl6040.c
@@ -181,7 +181,7 @@ static int omap_abe_twl6040_init(struct
twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk");
twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk");
twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out");
- twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator");
+ twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator");
twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic");
twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic");
twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic");
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 61/62] ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (59 preceding siblings ...)
2012-10-19 2:45 ` [ 60/62] ASoC: omap-abe-twl6040: Fix typo of Vibrator Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
2012-10-19 2:45 ` [ 62/62] ALSA: emu10k1: add chip details for E-mu 1010 PCIe card Greg Kroah-Hartman
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Takashi Iwai
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 733a48e5ae5bf28b046fad984d458c747cbb8c21 upstream.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44721
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/ac97/ac97_codec.c | 2 ++
1 file changed, 2 insertions(+)
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_
tmp.index = ac97->num;
kctl = snd_ctl_new1(&tmp, ac97);
}
+ if (!kctl)
+ return -ENOMEM;
if (reg >= AC97_PHONE && reg <= AC97_PCM)
set_tlv_db_scale(kctl, db_scale_5bit_12db_max);
else
^ permalink raw reply [flat|nested] 64+ messages in thread
* [ 62/62] ALSA: emu10k1: add chip details for E-mu 1010 PCIe card
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
` (60 preceding siblings ...)
2012-10-19 2:45 ` [ 61/62] ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new() Greg Kroah-Hartman
@ 2012-10-19 2:45 ` Greg Kroah-Hartman
61 siblings, 0 replies; 64+ messages in thread
From: Greg Kroah-Hartman @ 2012-10-19 2:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Maxim Kachur, Takashi Iwai
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maxim Kachur <mcdebugger@duganet.ru>
commit 10f571d09106c3eb85951896522c9650596eff2e upstream.
Add chip details for E-mu 1010 PCIe card. It has the same
chip as found in E-mu 1010b but it uses different PCI id.
Signed-off-by: Maxim Kachur <mcdebugger@duganet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/emu10k1/emu10k1_main.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -1416,6 +1416,15 @@ static struct snd_emu_chip_details emu_c
.ca0108_chip = 1,
.spk71 = 1,
.emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */
+ /* Tested by Maxim Kachur <mcdebugger@duganet.ru> 17th Oct 2012. */
+ /* This is MAEM8986, 0202 is MAEM8980 */
+ {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102,
+ .driver = "Audigy2", .name = "E-mu 1010 PCIe [MAEM8986]",
+ .id = "EMU1010",
+ .emu10k2_chip = 1,
+ .ca0108_chip = 1,
+ .spk71 = 1,
+ .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 PCIe */
/* Tested by James@superbug.co.uk 8th July 2005. */
/* This is MAEM8810, 0202 is MAEM8820 */
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102,
^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [ 32/62] kdb,vt_console: Fix missed data due to pager overruns
2012-10-19 2:45 ` [ 32/62] kdb,vt_console: Fix missed data due to pager overruns Greg Kroah-Hartman
@ 2012-10-19 21:39 ` Ben Hutchings
0 siblings, 0 replies; 64+ messages in thread
From: Ben Hutchings @ 2012-10-19 21:39 UTC (permalink / raw)
To: Jason Wessel; +Cc: Greg Kroah-Hartman, linux-kernel, stable, alan
On Thu, Oct 18, 2012 at 07:45:00PM -0700, Greg Kroah-Hartman wrote:
> 3.4-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Jason Wessel <jason.wessel@windriver.com>
>
> commit 17b572e82032bc246324ce136696656b66d4e3f1 upstream.
[...]
> This also means that the vt screen needs to set the kdb COLUMNS
> variable.
[...]
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -3475,6 +3475,19 @@ int con_debug_enter(struct vc_data *vc)
> kdb_set(2, setargs);
> }
> }
> + if (vc->vc_cols < 999) {
> + int colcount;
> + char cols[4];
> + const char *setargs[3] = {
> + "set",
> + "COLUMNS",
> + cols,
> + };
> + if (kdbgetintenv(setargs[0], &colcount)) {
> + snprintf(cols, 4, "%i", vc->vc_cols);
> + kdb_set(2, setargs);
> + }
> + }
Presumably the idea here was to avoid overriding the 'COLUMNS'
variable if it is already set, but it's actually testing whether the
variable 'set' is set. (Besides which, there should be a kdbsetenv()
instead of this gross hack of faking up a user command. And whyever
did kdb have to make argc off-by-one from the usual C convention?)
[...]
> + if (KDB_STATE(PAGER)) {
> + /*
> + * Check printed string to decide how to bump the
> + * kdb_nextline to control when the more prompt should
> + * show up.
> + */
> + int got = 0;
> + len = retlen;
> + while (len--) {
> + if (kdb_buffer[len] == '\n') {
> + kdb_nextline++;
> + got = 0;
> + } else if (kdb_buffer[len] == '\r') {
> + got = 0;
> + } else {
> + got++;
> + }
> + }
> + kdb_nextline += got / (colcount + 1);
What if more than one logical line is wrapped?
Why divide by colcount + 1? Shouldn't it be (got - 1) / colcount?
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
^ permalink raw reply [flat|nested] 64+ messages in thread
end of thread, other threads:[~2012-10-19 21:39 UTC | newest]
Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19 2:44 [ 00/62] 3.4.15-stable review Greg Kroah-Hartman
2012-10-19 2:44 ` [ 01/62] ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels Greg Kroah-Hartman
2012-10-19 2:44 ` [ 02/62] nfsd4: fix nfs4 stateid leak Greg Kroah-Hartman
2012-10-19 2:44 ` [ 03/62] NFSD: pass null terminated buf to kstrtouint() Greg Kroah-Hartman
2012-10-19 2:44 ` [ 04/62] lockd: use rpc clients cl_nodename for id encoding Greg Kroah-Hartman
2012-10-19 2:44 ` [ 05/62] ACPI: EC: Make the GPE storm threshold a module parameter Greg Kroah-Hartman
2012-10-19 2:44 ` [ 06/62] ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop Greg Kroah-Hartman
2012-10-19 2:44 ` [ 07/62] ALSA: hda - do not detect jack on internal speakers for Realtek Greg Kroah-Hartman
2012-10-19 2:44 ` [ 08/62] ALSA: hda - Fix memory leaks at error path in patch_cirrus.c Greg Kroah-Hartman
2012-10-19 2:44 ` [ 09/62] mips,kgdb: fix recursive page fault with CONFIG_KPROBES Greg Kroah-Hartman
2012-10-19 2:44 ` [ 10/62] tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking Greg Kroah-Hartman
2012-10-19 2:44 ` [ 11/62] SCSI: hpsa: dial down lockup detection during firmware flash Greg Kroah-Hartman
2012-10-19 2:44 ` [ 12/62] iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU Greg Kroah-Hartman
2012-10-19 2:44 ` [ 13/62] iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp Greg Kroah-Hartman
2012-10-19 2:44 ` [ 14/62] iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode Greg Kroah-Hartman
2012-10-19 2:44 ` [ 15/62] iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values Greg Kroah-Hartman
2012-10-19 2:44 ` [ 16/62] SCSI: storvsc: Account for in-transit packets in the RESET path Greg Kroah-Hartman
2012-10-19 2:44 ` [ 17/62] SCSI: scsi_debug: Fix off-by-one bug when unmapping region Greg Kroah-Hartman
2012-10-19 2:44 ` [ 18/62] ARM: 7541/1: Add ARM ERRATA 775420 workaround Greg Kroah-Hartman
2012-10-19 2:44 ` [ 19/62] firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel) Greg Kroah-Hartman
2012-10-19 2:44 ` [ 20/62] SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT Greg Kroah-Hartman
2012-10-19 2:44 ` [ 21/62] target: fix return code in target_core_init_configfs error path Greg Kroah-Hartman
2012-10-19 2:44 ` [ 22/62] xen/bootup: allow {read|write}_cr8 pvops call Greg Kroah-Hartman
2012-10-19 2:44 ` [ 23/62] xen/bootup: allow read_tscp call for Xen PV guests Greg Kroah-Hartman
2012-10-19 2:44 ` [ 24/62] block: fix request_queue->flags initialization Greg Kroah-Hartman
2012-10-19 2:44 ` [ 25/62] autofs4 - fix reset pending flag on mount fail Greg Kroah-Hartman
2012-10-19 2:44 ` [ 26/62] module: taint kernel when lve module is loaded Greg Kroah-Hartman
2012-10-19 2:44 ` [ 27/62] video/udlfb: fix line counting in fb_write Greg Kroah-Hartman
2012-10-19 2:44 ` [ 28/62] viafb: dont touch clock state on OLPC XO-1.5 Greg Kroah-Hartman
2012-10-19 2:44 ` [ 29/62] timers: Fix endless looping between cascade() and internal_add_timer() Greg Kroah-Hartman
2012-10-19 2:44 ` [ 30/62] ath9k: use ieee80211_free_txskb Greg Kroah-Hartman
2012-10-19 2:44 ` [ 31/62] md/raid10: use correct limit variable Greg Kroah-Hartman
2012-10-19 2:45 ` [ 32/62] kdb,vt_console: Fix missed data due to pager overruns Greg Kroah-Hartman
2012-10-19 21:39 ` Ben Hutchings
2012-10-19 2:45 ` [ 33/62] pktgen: fix crash when generating IPv6 packets Greg Kroah-Hartman
2012-10-19 2:45 ` [ 34/62] ipvs: fix oops in ip_vs_dst_event on rmmod Greg Kroah-Hartman
2012-10-19 2:45 ` [ 35/62] netfilter: nf_conntrack: fix racy timer handling with reliable events Greg Kroah-Hartman
2012-10-19 2:45 ` [ 36/62] netfilter: ipset: fix timeout value overflow bug Greg Kroah-Hartman
2012-10-19 2:45 ` [ 37/62] netfilter: ipset: timeout fixing bug broke SET target special timeout value Greg Kroah-Hartman
2012-10-19 2:45 ` [ 38/62] ipvs: fix oops on NAT reply in br_nf context Greg Kroah-Hartman
2012-10-19 2:45 ` [ 39/62] netfilter: nf_nat_sip: fix incorrect handling of EBUSY for RTCP expectation Greg Kroah-Hartman
2012-10-19 2:45 ` [ 40/62] netfilter: nf_nat_sip: fix via header translation with multiple parameters Greg Kroah-Hartman
2012-10-19 2:45 ` [ 41/62] netfilter: nf_ct_expect: fix possible access to uninitialized timer Greg Kroah-Hartman
2012-10-19 2:45 ` [ 42/62] netfilter: limit, hashlimit: avoid duplicated inline Greg Kroah-Hartman
2012-10-19 2:45 ` [ 43/62] netfilter: xt_limit: have r->cost != 0 case work Greg Kroah-Hartman
2012-10-19 2:45 ` [ 44/62] Add CDC-ACM support for the CX93010-2x UCMxx USB Modem Greg Kroah-Hartman
2012-10-19 2:45 ` [ 45/62] drm/radeon: Dont destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy() Greg Kroah-Hartman
2012-10-19 2:45 ` [ 46/62] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag Greg Kroah-Hartman
2012-10-19 2:45 ` [ 47/62] jbd: Fix assertion failure in commit code due to lacking transaction credits Greg Kroah-Hartman
2012-10-19 2:45 ` [ 48/62] e1000e: Change wthresh to 1 to avoid possible Tx stalls Greg Kroah-Hartman
2012-10-19 2:45 ` [ 49/62] tpm: Propagate error from tpm_transmit to fix a timeout hang Greg Kroah-Hartman
2012-10-19 2:45 ` [ 50/62] eCryptfs: Unlink lower inode when ecryptfs_create() fails Greg Kroah-Hartman
2012-10-19 2:45 ` [ 51/62] eCryptfs: Initialize empty lower files when opening them Greg Kroah-Hartman
2012-10-19 2:45 ` [ 52/62] eCryptfs: Revert to a writethrough cache model Greg Kroah-Hartman
2012-10-19 2:45 ` [ 53/62] eCryptfs: Write out all dirty pages just before releasing the lower file Greg Kroah-Hartman
2012-10-19 2:45 ` [ 54/62] eCryptfs: Call lower ->flush() from ecryptfs_flush() Greg Kroah-Hartman
2012-10-19 2:45 ` [ 55/62] usb: gadget: at91_udc: fix dt support Greg Kroah-Hartman
2012-10-19 2:45 ` [ 56/62] ALSA: hda - Always check array bounds in alc_get_line_out_pfx Greg Kroah-Hartman
2012-10-19 2:45 ` [ 57/62] ASoC: fsi: dont reschedule DMA from an atomic context Greg Kroah-Hartman
2012-10-19 2:45 ` [ 58/62] ASoC: wm2200: Use rev A register patches on rev B Greg Kroah-Hartman
2012-10-19 2:45 ` [ 59/62] ASoC: wm2200: Fix non-inverted OUT2 mute control Greg Kroah-Hartman
2012-10-19 2:45 ` [ 60/62] ASoC: omap-abe-twl6040: Fix typo of Vibrator Greg Kroah-Hartman
2012-10-19 2:45 ` [ 61/62] ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new() Greg Kroah-Hartman
2012-10-19 2:45 ` [ 62/62] ALSA: emu10k1: add chip details for E-mu 1010 PCIe card Greg Kroah-Hartman
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).