~thopiekar/linux/+git/linux-stable:linux-3.8.y

Last commit made on 2013-05-11
Get this branch:
git clone -b linux-3.8.y https://git.launchpad.net/~thopiekar/linux/+git/linux-stable

Branch merges

Branch information

Name:
linux-3.8.y
Repository:
lp:~thopiekar/linux/+git/linux-stable

Recent commits

dbf932a... by Greg Kroah-Hartman <email address hidden>

Linux 3.8.13

34660a1... by Jerry Hoemann <email address hidden>

x86/mm: account for PGDIR_SIZE alignment

Patch for -stable. Function find_early_table_space removed upstream.

Fixes panic in alloc_low_page due to pgt_buf overflow during
init_memory_mapping.

find_early_table_space sizes pgt_buf based upon the size of the
memory being mapped, but it does not take into account the alignment
of the memory. When the region being mapped spans a 512GB (PGDIR_SIZE)
alignment, a panic from alloc_low_pages occurs.

kernel_physical_mapping_init takes into account PGDIR_SIZE alignment.
This causes an extra call to alloc_low_page to be made. This extra call
isn't accounted for by find_early_table_space and causes a kernel panic.

Change is to take into account PGDIR_SIZE alignment in find_early_table_space.

Signed-off-by: Jerry Hoemann <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

fccd6eb... by Chen Gang <email address hidden>

kernel/audit_tree.c: tree will leak memory when failure occurs in audit_trim_trees()

commit 12b2f117f3bf738c1a00a6f64393f1953a740bd4 upstream.

audit_trim_trees() calls get_tree(). If a failure occurs we must call
put_tree().

[<email address hidden>: run put_tree() before mutex_lock() for small scalability improvement]
Signed-off-by: Chen Gang <email address hidden>
Cc: Al Viro <email address hidden>
Cc: Eric Paris <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
Signed-off-by: Jonghwan Choi <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

76e7f47... by Trond Myklebust

NFSv4.x: Fix handling of partially delegated locks

commit c5a2a15f8146fdfe45078df7873a6dc1006b3869 upstream.

If a NFS client receives a delegation for a file after it has taken
a lock on that file, we can currently end up in a situation where
we mistakenly skip unlocking that file.

The following patch swaps an erroneous check in nfs4_proc_unlck for
whether or not the file has a delegation to one which checks whether
or not we hold a lock stateid for that file.

Reported-by: Chuck Lever <email address hidden>
Signed-off-by: Trond Myklebust <email address hidden>
Tested-by: Chuck Lever <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

5a3f1f3... by "Srivatsa S. Bhat" <email address hidden>

EDAC: Don't give write permission to read-only files

commit c8c64d165ccfd2274058ac84e0c680f9b48c4ec1 upstream.

I get the following warning on boot:

------------[ cut here ]------------
WARNING: at drivers/base/core.c:575 device_create_file+0x9a/0xa0()
Hardware name: -[8737R2A]-
Write permission without 'store'
...
</snip>

Drilling down, this is related to dynamic channel ce_count attribute
files sporting a S_IWUSR mode without a ->store() function. Looking
around, it appears that they aren't supposed to have a ->store()
function. So remove the bogus write permission to get rid of the
warning.

Signed-off-by: Srivatsa S. Bhat <email address hidden>
Cc: Mauro Carvalho Chehab <email address hidden>
[ shorten commit message ]
Signed-off-by: Borislav Petkov <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

c665070... by Josef Bacik <email address hidden>

Btrfs: fix extent logging with O_DIRECT into prealloc

commit eb384b55ae9c2055ea00c5cc87971e182d47aefa upstream.

This is the same as the fix from commit

Btrfs: fix bad extent logging

but for O_DIRECT. I missed this when I fixed the problem originally, we were
still using the em for the orig_start and orig_block_len, which would be the
merged extent. We need to use the actual extent from the on disk file extent
item, which we have to lookup to make sure it's ok to nocow anyway so just pass
in some pointers to hold this info. Thanks,

Signed-off-by: Josef Bacik <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

02cfa2a... by Josef Bacik <email address hidden>

Btrfs: compare relevant parts of delayed tree refs

commit 41b0fc42800569f63e029549b75c4c9cb63f2dfd upstream.

A user reported a panic while running a balance. What was happening was he was
relocating a block, which added the reference to the relocation tree. Then
relocation would walk through the relocation tree and drop that reference and
free that block, and then it would walk down a snapshot which referenced the
same block and add another ref to the block. The problem is this was all
happening in the same transaction, so the parent block was free'ed up when we
drop our reference which was immediately available for allocation, and then it
was used _again_ to add a reference for the same block from a different
snapshot. This resulted in something like this in the delayed ref tree

add ref to 90234880, parent=2067398656, ref_root 1766, level 1
del ref to 90234880, parent=2067398656, ref_root 18446744073709551608, level 1
add ref to 90234880, parent=2067398656, ref_root 1767, level 1

as you can see the ref_root's don't match, because when we inc the ref we use
the header owner, which is the original tree the block belonged to, instead of
the data reloc tree. Then when we remove the extent we use the reloc tree
objectid. But none of this matters, since it is a shared reference which means
only the parent matters. When the delayed ref stuff runs it adds all the
increments first, and then does all the drops, to make sure that we don't delete
the ref if we net a positive ref count. But tree blocks aren't allowed to have
multiple refs from the same block, so this panics when it tries to add the
second ref. We need the add and the drop to cancel each other out in memory so
we only do the final add.

So to fix this we need to adjust how the delayed refs are added to the tree.
Only the ref_root matters when it is a normal backref, and only the parent
matters when it is a shared backref. So make our decision based on what ref
type we have. This allows us to keep the ref_root in memory in case anybody
wants to use it for something else, and it allows the delayed refs to be merged
properly so we don't end up with this panic.

With this patch the users image no longer panics on mount, and it has a clean
fsck after a normal mount/umount cycle. Thanks,

Reported-by: Roman Mamedov <email address hidden>
Signed-off-by: Josef Bacik <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

bbc666f... by rostedt

tracing: Fix ftrace_dump()

commit 7fe70b579c9e3daba71635e31b6189394e7b79d3 upstream.

ftrace_dump() had a lot of issues. What ftrace_dump() does, is when
ftrace_dump_on_oops is set (via a kernel parameter or sysctl), it
will dump out the ftrace buffers to the console when either a oops,
panic, or a sysrq-z occurs.

This was written a long time ago when ftrace was fragile to recursion.
But it wasn't written well even for that.

There's a possible deadlock that can occur if a ftrace_dump() is happening
and an NMI triggers another dump. This is because it grabs a lock
before checking if the dump ran.

It also totally disables ftrace, and tracing for no good reasons.

As the ring_buffer now checks if it is read via a oops or NMI, where
there's a chance that the buffer gets corrupted, it will disable
itself. No need to have ftrace_dump() do the same.

ftrace_dump() is now cleaned up where it uses an atomic counter to
make sure only one dump happens at a time. A simple atomic_inc_return()
is enough that is needed for both other CPUs and NMIs. No need for
a spinlock, as if one CPU is running the dump, no other CPU needs
to do it too.

The tracing_on variable is turned off and not turned on. The original
code did this, but it wasn't pretty. By just disabling this variable
we get the result of not seeing traces that happen between crashes.

For sysrq-z, it doesn't get turned on, but the user can always write
a '1' to the tracing_on file. If they are using sysrq-z, then they should
know about tracing_on.

The new code is much easier to read and less error prone. No more
deadlock possibility when an NMI triggers here.

Reported-by: zhangwei(Jovi) <email address hidden>
Cc: Thomas Gleixner <email address hidden>
Cc: Peter Zijlstra <email address hidden>
Cc: Frederic Weisbecker <email address hidden>
Signed-off-by: Steven Rostedt <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

d7a0a30... by Alex Deucher

drm/radeon: fix handling of v6 power tables

commit 441e76ca83ac604eaf0f046def96d8e3a27eea28 upstream.

The code was mis-handling variable sized arrays.

Reported-by: Sylvain BERTRAND <email address hidden>
Signed-off-by: Alex Deucher <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

9c9a03e... by Alex Deucher

drm/radeon: add new richland pci ids

commit 62d1f92e06aef9665d71ca7e986b3047ecf0b3c7 upstream.

Signed-off-by: Alex Deucher <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>