29 May, 2011
1 commit
-
le64 values should be swapped when accessing on
big-endian systems.Signed-off-by: Phillip Lougher
26 May, 2011
8 commits
-
My existing email address may stop working in a month or two, so update
email to one that will continue working.Signed-off-by: Phillip Lougher
-
Add some extra sanity checks of the inode and directory structures.
Signed-off-by: Phillip Lougher
-
Fsfuzzer generates corrupted filesystems which throw a warn_on in
kmalloc. One of these is due to a corrupted superblock fragments field.
Fix this by checking that the number of bytes to be read (and allocated)
does not extend into the next filesystem structure.Also add a couple of other sanity checks of the mount-time fragment table
structures.Signed-off-by: Phillip Lougher
-
Fsfuzzer generates corrupted filesystems which throw a warn_on in
kmalloc. One of these is due to a corrupted superblock inodes field.
Fix this by checking that the number of bytes to be read (and allocated)
does not extend into the next filesystem structure.Also add a couple of other sanity checks of the mount-time lookup table
structures.Signed-off-by: Phillip Lougher
-
Fsfuzzer generates corrupted filesystems which throw a warn_on in
kmalloc. One of these is due to a corrupted superblock no_ids field.
Fix this by checking that the number of bytes to be read (and allocated)
does not extend into the next filesystem structure.Also add a couple of other sanity checks of the mount-time id table
structures.Signed-off-by: Phillip Lougher
-
These checks add sanity checking of the mount-time xattr structures.
Signed-off-by: Phillip Lougher
-
Reverse order of table reading from mostly first to last in placement
order, to last to first. This is to enable extra superblock sanity
checks to be added in later patches.Signed-off-by: Phillip Lougher
-
This eliminates a lot of duplicate code.
Signed-off-by: Phillip Lougher
23 Mar, 2011
1 commit
-
Bugzilla bug 31422 reports occasional "page allocation failure. order:4"
at Squashfs mount time. Fix this by making zlib workspace allocation
use vmalloc rather than kmalloc.Reported-by: Mehmet Giritli
Signed-off-by: Phillip Lougher
16 Mar, 2011
1 commit
-
Handle the rare case where a directory metadata block is uncompressed and
corrupted, leading to a kernel oops in directory scanning (memcpy).
Normally corruption is detected at the decompression stage and dealt with
then, however, this will not happen if:- metadata isn't compressed (users can optionally request no metadata
compression), or
- the compressed metadata block was larger than the original, in which
case the uncompressed version was used, or
- the data was corrupt after decompressionThis patch fixes this by adding some sanity checks against known maximum
values.Signed-off-by: Phillip Lougher
01 Mar, 2011
6 commits
-
Squashfs_get_sb() to squashfs_mount() conversion (commit 152a0836)
results in line over 80 characters.Signed-off-by: Phillip Lougher
-
Signed-off-by: Phillip Lougher
-
Signed-off-by: Phillip Lougher
-
Signed-off-by: Phillip Lougher
-
Pass the dictionary size used to compress datablocks. Using a
dictionary size less than the block size saves memory overhead, in many
cases without adversely affecting compression ratio.Signed-off-by: Phillip Lougher
-
Extend decompressor framework to handle compression options stored in
the filesystem. These options can be used by the relevant decompressor
at initialisation time to over-ride defaults.The presence of compression options in the filesystem is indicated by
the COMP_OPT filesystem flag. If present the data is read from the
filesystem and passed to the decompressor init function. The decompressor
init function signature has been extended to take this data.Also update the init function signature in the glib, lzo and xz
decompressor wrappers.Signed-off-by: Phillip Lougher
08 Feb, 2011
12 commits
-
* master.kernel.org:/home/rmk/linux-2.6-arm:
ALSA: AACI: allow writes to MAINCR to take effect
ARM: Update mach-types
ARM: 6652/1: ep93xx: correct the end address of the AC97 memory resource
ARM: mxs/imx28: remove now unused clock lookup "fec.0"
ARM: mxs: fix clock base address missing
ARM: mxs: acknowledge gpio irq
ARM: mach-imx/mach-mx25_3ds: Fix section type
ARM: imx: Add VPR200 and MX51_3DS entries to uncompress.h
ARM i.MX23: use correct register for setting the rate
ARM i.MX23/28: remove secondary field from struct clk. It's unused
ARM i.MX28: use correct register for setting the rate
ARM i.MX28: fix bit operation -
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (33 commits)
Btrfs: Fix page count calculation
btrfs: Drop __exit attribute on btrfs_exit_compress
btrfs: cleanup error handling in btrfs_unlink_inode()
Btrfs: exclude super blocks when we read in block groups
Btrfs: make sure search_bitmap finds something in remove_from_bitmap
btrfs: fix return value check of btrfs_start_transaction()
btrfs: checking NULL or not in some functions
Btrfs: avoid uninit variable warnings in ordered-data.c
Btrfs: catch errors from btrfs_sync_log
Btrfs: make shrink_delalloc a little friendlier
Btrfs: handle no memory properly in prepare_pages
Btrfs: do error checking in btrfs_del_csums
Btrfs: use the global block reserve if we cannot reserve space
Btrfs: do not release more reserved bytes to the global_block_rsv than we need
Btrfs: fix check_path_shared so it returns the right value
btrfs: check return value of btrfs_start_ioctl_transaction() properly
btrfs: fix return value check of btrfs_join_transaction()
fs/btrfs/inode.c: Add missing IS_ERR test
btrfs: fix missing break in switch phrase
btrfs: fix several uncheck memory allocations
... -
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: Fix hcall tracepoint recursion
powerpc/numa: Fix bug in unmap_cpu_from_node
powerpc/numa: Disable VPHN on dedicated processor partitions
powerpc/numa: Add length when creating OF properties via VPHN
powerpc/numa: Check for all VPHN changes
powerpc/numa: Only use active VPHN count fields
powerpc/pseries: Remove unnecessary variable initializations in numa.c
powerpc/pseries: Fix brace placement in numa.c
powerpc/pseries: Fix typo in VPHN comments
powerpc: Fix some 6xx/7xxx CPU setup functions
powerpc: Pass the right cpu_spec to ->setup_cpu() on 64-bit
powerpc/book3e: Protect complex macro args in mmu-book3e.h
powerpc: Fix pfn_valid() when memory starts at a non-zero address -
…/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
arm: omap4: panda: remove usb_nop_xceiv_register(v1)
OMAP1: Fix non-working LCD on OMAP310
OMAP3: Devkit8000: Change lcd power pin
omap1: remove duplicated #include
arm: mach-omap2: mux: free allocated memory on error exit
arm: mach-omap2: board-rm680: fix rm680_vemmc regulator constraints
OMAP: PM: SmartReflex: Fix possible null pointer read access
OMAP: PM: SmartReflex: Fix possible memory leak
arm: mach-omap2: voltage: debugfs: fix memory leak
OMAP3: PM: fix save secure RAM to restore MPU power state
OMAP: PM: SmartReflex: Add missing IS_ERR test -
…git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, nx: Mark the ACPI resume trampoline code as +x -
In prepare_kernel_cred() since 2.6.29, put_cred(new) is called without
assigning new->usage when security_prepare_creds() returned an error. As a
result, memory for new and refcount for new->{user,group_info,tgcred} are
leaked because put_cred(new) won't call __put_cred() unless old->usage == 1.Fix these leaks by assigning new->usage (and new->subscribers which was added
in 2.6.32) before calling security_prepare_creds().Signed-off-by: Tetsuo Handa
Signed-off-by: David Howells
Signed-off-by: Linus Torvalds -
In cred_alloc_blank() since 2.6.32, abort_creds(new) is called with
new->security == NULL and new->magic == 0 when security_cred_alloc_blank()
returns an error. As a result, BUG() will be triggered if SELinux is enabled
or CONFIG_DEBUG_CREDENTIALS=y.If CONFIG_DEBUG_CREDENTIALS=y, BUG() is called from __invalid_creds() because
cred->magic == 0. Failing that, BUG() is called from selinux_cred_free()
because selinux_cred_free() is not expecting cred->security == NULL. This does
not affect smack_cred_free(), tomoyo_cred_free() or apparmor_cred_free().Fix these bugs by
(1) Set new->magic before calling security_cred_alloc_blank().
(2) Handle null cred->security in creds_are_invalid() and selinux_cred_free().
Signed-off-by: Tetsuo Handa
Signed-off-by: David Howells
Signed-off-by: Linus Torvalds -
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
cifs: remove checks for ses->status == CifsExiting
cifs: add check for kmalloc in parse_dacl
cifs: don't send an echo request unless NegProt has been done
cifs: enable signing flag in SMB header when server has it on
cifs: Possible slab memory corruption while updating extended stats (repost)
CIFS: Fix variable types in cifs_iovec_read/write (try #2)
cifs: fix length vs. total_read confusion in cifs_demultiplex_thread -
take offset of start position into account when calculating page count.
Signed-off-by: Yan, Zheng
Signed-off-by: Chris Mason -
ses->status is never set to CifsExiting, so these checks are
always false.Tested-by: JG
Signed-off-by: Jeff Layton
Signed-off-by: Steve French
07 Feb, 2011
11 commits
-
The AACI TRM requires the MAINCR enable bit to be held zero for two
bitclk cycles plus three apb_pclk cycles. Use a delay of 1us to
ensure this.Ensure that writes to MAINCR to change the addressed codec only happen
when required, and that they take effect in a similar manner to the
above, otherwise we seem to occasionally have stuck slot busy bits.Signed-off-by: Russell King
-
Signed-off-by: Russell King
-
We reserve lowmem for the things that need it, like the ACPI
wakeup code, way early to guarantee availability. This happens
before we set up the proper pagetables, so set_memory_x() has no
effect.Until we have a better solution, use an initcall to mark the
wakeup code executable.Originally-by: Matthieu Castet
Signed-off-by: H. Peter Anvin
Cc: Matthias Hopf
Cc: rjw@sisk.pl
Cc: Suresh Siddha
LKML-Reference:
Signed-off-by: Ingo Molnar -
Spinlocks on shared processor partitions use H_YIELD to notify the
hypervisor we are waiting on another virtual CPU. Unfortunately this means
the hcall tracepoints can recurse.The patch below adds a percpu depth and checks it on both the entry and
exit hcall tracepoints.Signed-off-by: Anton Blanchard
Acked-by: Steven Rostedt
Signed-off-by: Benjamin Herrenschmidt
CC: stable@kernel.org -
When converting to the new cpumask code I screwed up:
- if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) {
- cpu_clear(cpu, numa_cpumask_lookup_table[node]);
+ if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
+ cpumask_set_cpu(cpu, node_to_cpumask_map[node]);This was introduced in commit 25863de07af9 (powerpc/cpumask: Convert NUMA code
to new cpumask API)Fix it.
Signed-off-by: Anton Blanchard
Cc:
Signed-off-by: Benjamin Herrenschmidt -
There is no need to start up the timer and monitor topology changes on a
dedicated processor partition, so disable it.Signed-off-by: Anton Blanchard
Signed-off-by: Benjamin Herrenschmidt -
The rest of the NUMA code expects an OF associativity property with
the first cell containing the length. Without this fix all topology changes
cause us to misparse the property and put the cpu into node 0.Signed-off-by: Anton Blanchard
Signed-off-by: Benjamin Herrenschmidt -
The hypervisor uses unsigned 1 byte counters to signal topology changes to
the OS. Since they can wrap we need to check for any difference, not just if
the hypervisor count is greater than the previous count.Signed-off-by: Anton Blanchard
Signed-off-by: Benjamin Herrenschmidt -
VPHN supports up to 8 distance fields but the number of entries in
ibm,associativity-reference-points signifies how many are in use.
Don't look at all the VPHN counts, only distance_ref_points_depth
worth.Since we already cap our distance metrics at MAX_DISTANCE_REF_POINTS,
use that to size the VPHN arrays and add a BUILD_BUG_ON to avoid it growing
larger than the VPHN maximum of 8.Signed-off-by: Anton Blanchard
Signed-off-by: Benjamin Herrenschmidt -
Remove unnecessary variable initializations in VPHN functions.
Signed-off-by: Jesse Larrew
Signed-off-by: Benjamin Herrenschmidt