* [ 00/11] 3.4.67-stable review
@ 2013-10-18 19:53 Greg Kroah-Hartman
2013-10-18 19:53 ` [ 01/11] ALSA: snd-usb-usx2y: remove bogus frame checks Greg Kroah-Hartman
` (12 more replies)
0 siblings, 13 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, stable
This is the start of the stable review cycle for the 3.4.67 release.
There are 11 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 20 19:50:39 UTC 2013.
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.67-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 3.4.67-rc1
Linus Torvalds <torvalds@linux-foundation.org>
mm: do not grow the stack vma just because of an overrun on preceding vma
Cyril Hrubis <chrubis@suse.cz>
mm/mmap: check for RLIMIT_AS before unmapping
wojciech kapuscinski <wojtask9@wp.pl>
drm/radeon: fix hw contexts for SUMO2 asics
Dan Carpenter <dan.carpenter@oracle.com>
watchdog: ts72xx_wdt: locking bug in ioctl
Helge Deller <deller@gmx.de>
parisc: fix interruption handler to respect pagefault_disable()
Paul Mackerras <paulus@samba.org>
KVM: PPC: Book3S HV: Fix typo in saving DSCR
Dave Jones <davej@redhat.com>
ext4: fix memory leak in xattr
Linus Torvalds <torvalds@linux-foundation.org>
vfs: allow O_PATH file descriptors for fstatfs()
Theodore Ts'o <tytso@mit.edu>
random: run random_int_secret_init() run after all late_initcalls
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Add fixup for ASUS N56VZ
Daniel Mack <zonque@gmail.com>
ALSA: snd-usb-usx2y: remove bogus frame checks
-------------
Diffstat:
Makefile | 4 +-
arch/parisc/kernel/traps.c | 6 +--
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +-
drivers/char/random.c | 3 +-
drivers/gpu/drm/radeon/evergreen.c | 2 +-
drivers/watchdog/ts72xx_wdt.c | 3 +-
fs/ext4/xattr.c | 2 +
fs/statfs.c | 2 +-
include/linux/random.h | 1 +
init/main.c | 2 +
mm/mmap.c | 77 +++++++++++++++++++++++++++++++--
sound/pci/hda/patch_realtek.c | 1 +
sound/usb/usx2y/usbusx2yaudio.c | 22 ++--------
sound/usb/usx2y/usx2yhwdeppcm.c | 7 +--
14 files changed, 94 insertions(+), 40 deletions(-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 01/11] ALSA: snd-usb-usx2y: remove bogus frame checks
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 02/11] ALSA: hda - Add fixup for ASUS N56VZ Greg Kroah-Hartman
` (11 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dr Nicholas J Bailey, Takashi Iwai,
Daniel Mack, fzu
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Mack <zonque@gmail.com>
commit a9d14bc0b188a822e42787d01e56c06fe9750162 upstream.
The frame check in i_usX2Y_urb_complete() and
i_usX2Y_usbpcm_urb_complete() is bogus and produces false positives as
described in this LAU thread:
http://linuxaudio.org/mailarchive/lau/2013/5/20/200177
This patch removes the check code entirely.
Cc: fzu@wemgehoertderstaat.de
Reported-by: Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/usb/usx2y/usbusx2yaudio.c | 22 +++-------------------
sound/usb/usx2y/usx2yhwdeppcm.c | 7 +------
2 files changed, 4 insertions(+), 25 deletions(-)
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -295,19 +295,6 @@ static void usX2Y_error_urb_status(struc
usX2Y_clients_stop(usX2Y);
}
-static void usX2Y_error_sequence(struct usX2Ydev *usX2Y,
- struct snd_usX2Y_substream *subs, struct urb *urb)
-{
- snd_printk(KERN_ERR
-"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n"
-"Most probably some urb of usb-frame %i is still missing.\n"
-"Cause could be too long delays in usb-hcd interrupt handling.\n",
- usb_get_current_frame_number(usX2Y->dev),
- subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
- usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
- usX2Y_clients_stop(usX2Y);
-}
-
static void i_usX2Y_urb_complete(struct urb *urb)
{
struct snd_usX2Y_substream *subs = urb->context;
@@ -324,12 +311,9 @@ static void i_usX2Y_urb_complete(struct
usX2Y_error_urb_status(usX2Y, subs, urb);
return;
}
- if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
- subs->completed_urb = urb;
- else {
- usX2Y_error_sequence(usX2Y, subs, urb);
- return;
- }
+
+ subs->completed_urb = urb;
+
{
struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
*playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
--- a/sound/usb/usx2y/usx2yhwdeppcm.c
+++ b/sound/usb/usx2y/usx2yhwdeppcm.c
@@ -244,13 +244,8 @@ static void i_usX2Y_usbpcm_urb_complete(
usX2Y_error_urb_status(usX2Y, subs, urb);
return;
}
- if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
- subs->completed_urb = urb;
- else {
- usX2Y_error_sequence(usX2Y, subs, urb);
- return;
- }
+ subs->completed_urb = urb;
capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 02/11] ALSA: hda - Add fixup for ASUS N56VZ
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
2013-10-18 19:53 ` [ 01/11] ALSA: snd-usb-usx2y: remove bogus frame checks Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 03/11] random: run random_int_secret_init() run after all late_initcalls Greg Kroah-Hartman
` (10 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit c6cc3d58b4042f5cadae653ff8d3df26af1a0169 upstream.
ASUS N56VZ needs a fixup for the bass speaker pin, which was already
provided via model=asus-mode4.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=841645
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6832,6 +6832,7 @@ static const struct snd_pci_quirk alc662
SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
+ SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4),
SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 03/11] random: run random_int_secret_init() run after all late_initcalls
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
2013-10-18 19:53 ` [ 01/11] ALSA: snd-usb-usx2y: remove bogus frame checks Greg Kroah-Hartman
2013-10-18 19:53 ` [ 02/11] ALSA: hda - Add fixup for ASUS N56VZ Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 04/11] vfs: allow O_PATH file descriptors for fstatfs() Greg Kroah-Hartman
` (9 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Theodore Tso
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit 47d06e532e95b71c0db3839ebdef3fe8812fca2c upstream.
The some platforms (e.g., ARM) initializes their clocks as
late_initcalls for some unknown reason. So make sure
random_int_secret_init() is run after all of the late_initcalls are
run.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/random.c | 3 +--
include/linux/random.h | 1 +
init/main.c | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1435,12 +1435,11 @@ ctl_table random_table[] = {
static u32 random_int_secret[MD5_MESSAGE_BYTES / 4] ____cacheline_aligned;
-static int __init random_int_secret_init(void)
+int random_int_secret_init(void)
{
get_random_bytes(random_int_secret, sizeof(random_int_secret));
return 0;
}
-late_initcall(random_int_secret_init);
/*
* Get a random word for internal kernel use only. Similar to urandom but
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -56,6 +56,7 @@ extern void add_interrupt_randomness(int
extern void get_random_bytes(void *buf, int nbytes);
extern void get_random_bytes_arch(void *buf, int nbytes);
void generate_random_uuid(unsigned char uuid_out[16]);
+extern int random_int_secret_init(void);
#ifndef MODULE
extern const struct file_operations random_fops, urandom_fops;
--- a/init/main.c
+++ b/init/main.c
@@ -68,6 +68,7 @@
#include <linux/shmem_fs.h>
#include <linux/slab.h>
#include <linux/perf_event.h>
+#include <linux/random.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -779,6 +780,7 @@ static void __init do_basic_setup(void)
do_ctors();
usermodehelper_enable();
do_initcalls();
+ random_int_secret_init();
}
static void __init do_pre_smp_initcalls(void)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 04/11] vfs: allow O_PATH file descriptors for fstatfs()
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2013-10-18 19:53 ` [ 03/11] random: run random_int_secret_init() run after all late_initcalls Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 05/11] ext4: fix memory leak in xattr Greg Kroah-Hartman
` (8 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Al Viro, Linus Torvalds
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 9d05746e7b16d8565dddbe3200faa1e669d23bbf upstream.
Olga reported that file descriptors opened with O_PATH do not work with
fstatfs(), found during further development of ksh93's thread support.
There is no reason to not allow O_PATH file descriptors here (fstatfs is
very much a path operation), so use "fdget_raw()". See commit
55815f70147d ("vfs: make O_PATH file descriptors usable for 'fstat()'")
for a very similar issue reported for fstat() by the same team.
Reported-and-tested-by: ольга крыжановская <olga.kryzhanovska@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/statfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -87,7 +87,7 @@ int user_statfs(const char __user *pathn
int fd_statfs(int fd, struct kstatfs *st)
{
- struct file *file = fget(fd);
+ struct file *file = fget_raw(fd);
int error = -EBADF;
if (file) {
error = vfs_statfs(&file->f_path, st);
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 05/11] ext4: fix memory leak in xattr
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2013-10-18 19:53 ` [ 04/11] vfs: allow O_PATH file descriptors for fstatfs() Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-21 16:37 ` Dave Jones
2013-10-18 19:53 ` [ 06/11] KVM: PPC: Book3S HV: Fix typo in saving DSCR Greg Kroah-Hartman
` (7 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dave Jones, Theodore Tso,
Eric Sandeen
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jones <davej@redhat.com>
commit 6e4ea8e33b2057b85d75175dd89b93f5e26de3bc upstream.
If we take the 2nd retry path in ext4_expand_extra_isize_ea, we
potentionally return from the function without having freed these
allocations. If we don't do the return, we over-write the previous
allocation pointers, so we leak either way.
Spotted with Coverity.
[ Fixed by tytso to set is and bs to NULL after freeing these
pointers, in case in the retry loop we later end up triggering an
error causing a jump to cleanup, at which point we could have a double
free bug. -- Ted ]
Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/xattr.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1268,6 +1268,8 @@ retry:
s_min_extra_isize) {
tried_min_extra_isize++;
new_extra_isize = s_min_extra_isize;
+ kfree(is); is = NULL;
+ kfree(bs); bs = NULL;
goto retry;
}
error = -1;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 06/11] KVM: PPC: Book3S HV: Fix typo in saving DSCR
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2013-10-18 19:53 ` [ 05/11] ext4: fix memory leak in xattr Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 07/11] parisc: fix interruption handler to respect pagefault_disable() Greg Kroah-Hartman
` (6 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Paul Mackerras, Alexander Graf,
Paolo Bonzini
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Mackerras <paulus@samba.org>
commit cfc860253abd73e1681696c08ea268d33285a2c4 upstream.
This fixes a typo in the code that saves the guest DSCR (Data Stream
Control Register) into the kvm_vcpu_arch struct on guest exit. The
effect of the typo was that the DSCR value was saved in the wrong place,
so changes to the DSCR by the guest didn't persist across guest exit
and entry, and some host kernel memory got corrupted.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -935,7 +935,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
BEGIN_FTR_SECTION
mfspr r8, SPRN_DSCR
ld r7, HSTATE_DSCR(r13)
- std r8, VCPU_DSCR(r7)
+ std r8, VCPU_DSCR(r9)
mtspr SPRN_DSCR, r7
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 07/11] parisc: fix interruption handler to respect pagefault_disable()
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2013-10-18 19:53 ` [ 06/11] KVM: PPC: Book3S HV: Fix typo in saving DSCR Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 08/11] watchdog: ts72xx_wdt: locking bug in ioctl Greg Kroah-Hartman
` (5 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Helge Deller, John David Anglin
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <deller@gmx.de>
commit 59b33f148cc08fb33cbe823fca1e34f7f023765e upstream.
Running an "echo t > /proc/sysrq-trigger" crashes the parisc kernel. The
problem is, that in print_worker_info() we try to read the workqueue info via
the probe_kernel_read() functions which use pagefault_disable() to avoid
crashes like this:
probe_kernel_read(&pwq, &worker->current_pwq, sizeof(pwq));
probe_kernel_read(&wq, &pwq->wq, sizeof(wq));
probe_kernel_read(name, wq->name, sizeof(name) - 1);
The problem here is, that the first probe_kernel_read(&pwq) might return zero
in pwq and as such the following probe_kernel_reads() try to access contents of
the page zero which is read protected and generate a kernel segfault.
With this patch we fix the interruption handler to call parisc_terminate()
directly only if pagefault_disable() was not called (in which case
preempt_count()==0). Otherwise we hand over to the pagefault handler which
will try to look up the faulting address in the fixup tables.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/parisc/kernel/traps.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -810,14 +810,14 @@ void notrace handle_interruption(int cod
else {
/*
- * The kernel should never fault on its own address space.
+ * The kernel should never fault on its own address space,
+ * unless pagefault_disable() was called before.
*/
- if (fault_space == 0)
+ if (fault_space == 0 && !in_atomic())
{
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
parisc_terminate("Kernel Fault", regs, code, fault_address);
-
}
}
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 08/11] watchdog: ts72xx_wdt: locking bug in ioctl
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2013-10-18 19:53 ` [ 07/11] parisc: fix interruption handler to respect pagefault_disable() Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 09/11] drm/radeon: fix hw contexts for SUMO2 asics Greg Kroah-Hartman
` (4 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Guenter Roeck,
Wim Van Sebroeck, Jonghwan Choi
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 8612ed0d97abcf1c016d34755b7cf2060de71963 upstream.
Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
interruptible deadlock.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/watchdog/ts72xx_wdt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -310,7 +310,8 @@ static long ts72xx_wdt_ioctl(struct file
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
- return put_user(0, p);
+ error = put_user(0, p);
+ break;
case WDIOC_KEEPALIVE:
ts72xx_wdt_kick(wdt);
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 09/11] drm/radeon: fix hw contexts for SUMO2 asics
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2013-10-18 19:53 ` [ 08/11] watchdog: ts72xx_wdt: locking bug in ioctl Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 10/11] mm/mmap: check for RLIMIT_AS before unmapping Greg Kroah-Hartman
` (3 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, wojciech kapuscinski, Alex Deucher
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: wojciech kapuscinski <wojtask9@wp.pl>
commit 50b8f5aec04ebec7dbdf2adb17220b9148c99e63 upstream.
They have 4 rather than 8.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=63599
Signed-off-by: wojciech kapuscinski <wojtask9@wp.pl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/evergreen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -1912,7 +1912,7 @@ static void evergreen_gpu_init(struct ra
rdev->config.evergreen.sx_max_export_size = 256;
rdev->config.evergreen.sx_max_export_pos_size = 64;
rdev->config.evergreen.sx_max_export_smx_size = 192;
- rdev->config.evergreen.max_hw_contexts = 8;
+ rdev->config.evergreen.max_hw_contexts = 4;
rdev->config.evergreen.sq_num_cf_insts = 2;
rdev->config.evergreen.sc_prim_fifo_size = 0x40;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 10/11] mm/mmap: check for RLIMIT_AS before unmapping
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2013-10-18 19:53 ` [ 09/11] drm/radeon: fix hw contexts for SUMO2 asics Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 19:53 ` [ 11/11] mm: do not grow the stack vma just because of an overrun on preceding vma Greg Kroah-Hartman
` (2 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Cyril Hrubis, Mel Gorman, Wanpeng Li,
Andrew Morton, Linus Torvalds, Xishi Qiu
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cyril Hrubis <chrubis@suse.cz>
commit e8420a8ece80b3fe810415ecf061d54ca7fab266 upstream.
Fix a corner case for MAP_FIXED when requested mapping length is larger
than rlimit for virtual memory. In such case any overlapping mappings
are unmapped before we check for the limit and return ENOMEM.
The check is moved before the loop that unmaps overlapping parts of
existing mappings. When we are about to hit the limit (currently mapped
pages + len > limit) we scan for overlapping pages and check again
accounting for them.
This fixes situation when userspace program expects that the previous
mappings are preserved after the mmap() syscall has returned with error.
(POSIX clearly states that successfull mapping shall replace any
previous mappings.)
This corner case was found and can be tested with LTP testcase:
testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
In this case the mmap, which is clearly over current limit, unmaps
dynamic libraries and the testcase segfaults right after returning into
userspace.
I've also looked at the second instance of the unmapping loop in the
do_brk(). The do_brk() is called from brk() syscall and from vm_brk().
The brk() syscall checks for overlapping mappings and bails out when
there are any (so it can't be triggered from the brk syscall). The
vm_brk() is called only from binmft handlers so it shouldn't be
triggered unless binmft handler created overlapping mappings.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/mmap.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 46 insertions(+), 4 deletions(-)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -6,6 +6,7 @@
* Address space accounting code <alan@lxorguk.ukuu.org.uk>
*/
+#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/backing-dev.h>
#include <linux/mm.h>
@@ -392,6 +393,34 @@ find_vma_prepare(struct mm_struct *mm, u
return vma;
}
+static unsigned long count_vma_pages_range(struct mm_struct *mm,
+ unsigned long addr, unsigned long end)
+{
+ unsigned long nr_pages = 0;
+ struct vm_area_struct *vma;
+
+ /* Find first overlaping mapping */
+ vma = find_vma_intersection(mm, addr, end);
+ if (!vma)
+ return 0;
+
+ nr_pages = (min(end, vma->vm_end) -
+ max(addr, vma->vm_start)) >> PAGE_SHIFT;
+
+ /* Iterate over the rest of the overlaps */
+ for (vma = vma->vm_next; vma; vma = vma->vm_next) {
+ unsigned long overlap_len;
+
+ if (vma->vm_start > end)
+ break;
+
+ overlap_len = min(end, vma->vm_end) - vma->vm_start;
+ nr_pages += overlap_len >> PAGE_SHIFT;
+ }
+
+ return nr_pages;
+}
+
void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma,
struct rb_node **rb_link, struct rb_node *rb_parent)
{
@@ -1245,6 +1274,23 @@ unsigned long mmap_region(struct file *f
unsigned long charged = 0;
struct inode *inode = file ? file->f_path.dentry->d_inode : NULL;
+ /* Check against address space limit. */
+ if (!may_expand_vm(mm, len >> PAGE_SHIFT)) {
+ unsigned long nr_pages;
+
+ /*
+ * MAP_FIXED may remove pages of mappings that intersects with
+ * requested mapping. Account for the pages it would unmap.
+ */
+ if (!(vm_flags & MAP_FIXED))
+ return -ENOMEM;
+
+ nr_pages = count_vma_pages_range(mm, addr, addr + len);
+
+ if (!may_expand_vm(mm, (len >> PAGE_SHIFT) - nr_pages))
+ return -ENOMEM;
+ }
+
/* Clear old maps */
error = -ENOMEM;
munmap_back:
@@ -1255,10 +1301,6 @@ munmap_back:
goto munmap_back;
}
- /* Check against address space limit. */
- if (!may_expand_vm(mm, len >> PAGE_SHIFT))
- return -ENOMEM;
-
/*
* Set 'VM_NORESERVE' if we should not account for the
* memory use of this mapping.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [ 11/11] mm: do not grow the stack vma just because of an overrun on preceding vma
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2013-10-18 19:53 ` [ 10/11] mm/mmap: check for RLIMIT_AS before unmapping Greg Kroah-Hartman
@ 2013-10-18 19:53 ` Greg Kroah-Hartman
2013-10-18 20:49 ` [ 00/11] 3.4.67-stable review Guenter Roeck
2013-10-19 3:41 ` Shuah Khan
12 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 19:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Linus Torvalds, Xishi Qiu
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 09884964335e85e897876d17783c2ad33cf8a2e0 upstream.
The stack vma is designed to grow automatically (marked with VM_GROWSUP
or VM_GROWSDOWN depending on architecture) when an access is made beyond
the existing boundary. However, particularly if you have not limited
your stack at all ("ulimit -s unlimited"), this can cause the stack to
grow even if the access was really just one past *another* segment.
And that's wrong, especially since we first grow the segment, but then
immediately later enforce the stack guard page on the last page of the
segment. So _despite_ first growing the stack segment as a result of
the access, the kernel will then make the access cause a SIGSEGV anyway!
So do the same logic as the guard page check does, and consider an
access to within one page of the next segment to be a bad access, rather
than growing the stack to abut the next segment.
Reported-and-tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/mmap.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1875,9 +1875,28 @@ int expand_downwards(struct vm_area_stru
return error;
}
+/*
+ * Note how expand_stack() refuses to expand the stack all the way to
+ * abut the next virtual mapping, *unless* that mapping itself is also
+ * a stack mapping. We want to leave room for a guard page, after all
+ * (the guard page itself is not added here, that is done by the
+ * actual page faulting logic)
+ *
+ * This matches the behavior of the guard page logic (see mm/memory.c:
+ * check_stack_guard_page()), which only allows the guard page to be
+ * removed under these circumstances.
+ */
#ifdef CONFIG_STACK_GROWSUP
int expand_stack(struct vm_area_struct *vma, unsigned long address)
{
+ struct vm_area_struct *next;
+
+ address &= PAGE_MASK;
+ next = vma->vm_next;
+ if (next && next->vm_start == address + PAGE_SIZE) {
+ if (!(next->vm_flags & VM_GROWSUP))
+ return -ENOMEM;
+ }
return expand_upwards(vma, address);
}
@@ -1900,6 +1919,14 @@ find_extend_vma(struct mm_struct *mm, un
#else
int expand_stack(struct vm_area_struct *vma, unsigned long address)
{
+ struct vm_area_struct *prev;
+
+ address &= PAGE_MASK;
+ prev = vma->vm_prev;
+ if (prev && prev->vm_end == address) {
+ if (!(prev->vm_flags & VM_GROWSDOWN))
+ return -ENOMEM;
+ }
return expand_downwards(vma, address);
}
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ 00/11] 3.4.67-stable review
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (10 preceding siblings ...)
2013-10-18 19:53 ` [ 11/11] mm: do not grow the stack vma just because of an overrun on preceding vma Greg Kroah-Hartman
@ 2013-10-18 20:49 ` Guenter Roeck
2013-10-18 21:25 ` Greg Kroah-Hartman
2013-10-19 3:41 ` Shuah Khan
12 siblings, 1 reply; 17+ messages in thread
From: Guenter Roeck @ 2013-10-18 20:49 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, torvalds, akpm, stable
On Fri, Oct 18, 2013 at 12:53:29PM -0700, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.4.67 release.
> There are 11 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 20 19:50:39 UTC 2013.
> 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.67-rc1.gz
> and the diffstat can be found below.
>
Build results:
total: 103 pass: 89 skipped: 10 fail: 4
qemu tests all pass.
This matches the results seen with the previous 3.4 release, so everything
is as expected.
Details are available at http://server.roeck-us.net:8010/builders.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ 00/11] 3.4.67-stable review
2013-10-18 20:49 ` [ 00/11] 3.4.67-stable review Guenter Roeck
@ 2013-10-18 21:25 ` Greg Kroah-Hartman
0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-18 21:25 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-kernel, torvalds, akpm, stable
On Fri, Oct 18, 2013 at 01:49:17PM -0700, Guenter Roeck wrote:
> On Fri, Oct 18, 2013 at 12:53:29PM -0700, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 3.4.67 release.
> > There are 11 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 20 19:50:39 UTC 2013.
> > 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.67-rc1.gz
> > and the diffstat can be found below.
> >
> Build results:
> total: 103 pass: 89 skipped: 10 fail: 4
>
> qemu tests all pass.
>
> This matches the results seen with the previous 3.4 release, so everything
> is as expected.
Great, thanks for testing and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ 00/11] 3.4.67-stable review
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
` (11 preceding siblings ...)
2013-10-18 20:49 ` [ 00/11] 3.4.67-stable review Guenter Roeck
@ 2013-10-19 3:41 ` Shuah Khan
2013-10-19 4:49 ` Greg Kroah-Hartman
12 siblings, 1 reply; 17+ messages in thread
From: Shuah Khan @ 2013-10-19 3:41 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, torvalds, akpm, stable, Shuah Khan,
shuahkhan@gmail.com
On 10/18/2013 01:53 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.4.67 release.
> There are 11 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 20 19:50:39 UTC 2013.
> 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.67-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Patch applied cleanly yes
Compile testing passed
Boot testing passed
dmesg regression testing passed
Cross-compile testing passed
dmesgs look good. No regressions compared to the previous dmesgs for
this release. dmesg emerg, crit, alert, err are clean. No regressions
in warn.
Test systems
Samsung Series 9 900X4C Intel Corei5 (3.4 and later)
HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics
HP Compaq dc7700 SFF desktop: x86-64 Intel Core-i2 (cross-compile
testing)
alpha defconfig Passed
arm defconfig passed
arm64 defconfig Not applicable
blackfin defconfig Passed
c6x dsk6455_defconfig Passed
mips defconfig Passed
mipsel defconfig Passed
powerpc wii_defconfig Passed
sh defconfig Passed
sparc defconfig Passed
tile tilegx_defconfig Passed
-- Shuah
--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ 00/11] 3.4.67-stable review
2013-10-19 3:41 ` Shuah Khan
@ 2013-10-19 4:49 ` Greg Kroah-Hartman
0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-19 4:49 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-kernel, torvalds, akpm, stable, shuahkhan@gmail.com
On Fri, Oct 18, 2013 at 09:41:15PM -0600, Shuah Khan wrote:
> On 10/18/2013 01:53 PM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 3.4.67 release.
> > There are 11 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 20 19:50:39 UTC 2013.
> > 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.67-rc1.gz
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
>
> Patch applied cleanly yes
> Compile testing passed
> Boot testing passed
> dmesg regression testing passed
> Cross-compile testing passed
>
> dmesgs look good. No regressions compared to the previous dmesgs for
> this release. dmesg emerg, crit, alert, err are clean. No regressions
> in warn.
Thanks for testing and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ 05/11] ext4: fix memory leak in xattr
2013-10-18 19:53 ` [ 05/11] ext4: fix memory leak in xattr Greg Kroah-Hartman
@ 2013-10-21 16:37 ` Dave Jones
0 siblings, 0 replies; 17+ messages in thread
From: Dave Jones @ 2013-10-21 16:37 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, stable, Dave Jones, Theodore Tso, Eric Sandeen
On Fri, Oct 18, 2013 at 12:53:34PM -0700, Greg Kroah-Hartman wrote:
> 3.4-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Dave Jones <davej@redhat.com>
>
> commit 6e4ea8e33b2057b85d75175dd89b93f5e26de3bc upstream.
>
> If we take the 2nd retry path in ext4_expand_extra_isize_ea, we
> potentionally return from the function without having freed these
> allocations. If we don't do the return, we over-write the previous
> allocation pointers, so we leak either way.
>
> Spotted with Coverity.
>
> [ Fixed by tytso to set is and bs to NULL after freeing these
> pointers, in case in the retry loop we later end up triggering an
> error causing a jump to cleanup, at which point we could have a double
> free bug. -- Ted ]
>
> Signed-off-by: Dave Jones <davej@fedoraproject.org>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
I'm still waiting to hear if we also need this..
Ted ?
--
If we take the retry path here, we end up potentially overwriting bh, leaving
it with an elevated reference count.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 03e9beb..1423c48 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1352,6 +1352,7 @@ retry:
new_extra_isize = s_min_extra_isize;
kfree(is); is = NULL;
kfree(bs); bs = NULL;
+ brelse(bh);
goto retry;
}
error = -1;
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-10-21 16:37 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-18 19:53 [ 00/11] 3.4.67-stable review Greg Kroah-Hartman
2013-10-18 19:53 ` [ 01/11] ALSA: snd-usb-usx2y: remove bogus frame checks Greg Kroah-Hartman
2013-10-18 19:53 ` [ 02/11] ALSA: hda - Add fixup for ASUS N56VZ Greg Kroah-Hartman
2013-10-18 19:53 ` [ 03/11] random: run random_int_secret_init() run after all late_initcalls Greg Kroah-Hartman
2013-10-18 19:53 ` [ 04/11] vfs: allow O_PATH file descriptors for fstatfs() Greg Kroah-Hartman
2013-10-18 19:53 ` [ 05/11] ext4: fix memory leak in xattr Greg Kroah-Hartman
2013-10-21 16:37 ` Dave Jones
2013-10-18 19:53 ` [ 06/11] KVM: PPC: Book3S HV: Fix typo in saving DSCR Greg Kroah-Hartman
2013-10-18 19:53 ` [ 07/11] parisc: fix interruption handler to respect pagefault_disable() Greg Kroah-Hartman
2013-10-18 19:53 ` [ 08/11] watchdog: ts72xx_wdt: locking bug in ioctl Greg Kroah-Hartman
2013-10-18 19:53 ` [ 09/11] drm/radeon: fix hw contexts for SUMO2 asics Greg Kroah-Hartman
2013-10-18 19:53 ` [ 10/11] mm/mmap: check for RLIMIT_AS before unmapping Greg Kroah-Hartman
2013-10-18 19:53 ` [ 11/11] mm: do not grow the stack vma just because of an overrun on preceding vma Greg Kroah-Hartman
2013-10-18 20:49 ` [ 00/11] 3.4.67-stable review Guenter Roeck
2013-10-18 21:25 ` Greg Kroah-Hartman
2013-10-19 3:41 ` Shuah Khan
2013-10-19 4:49 ` 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).