Fix race in process_vm_rw_core

This fixes the race in process_vm_core found by Oleg (see

  http://article.gmane.org/gmane.linux.kernel/1235667/

for details).

This has been updated since I last sent it as the creation of the new
mm_access() function did almost exactly the same thing as parts of the
previous version of this patch did.

In order to use mm_access() even when /proc isn't enabled, we move it to
kernel/fork.c where other related process mm access functions already
are.

Signed-off-by: Chris Yeoh <yeohc@au1.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Conflicts:
	mm/process_vm_access.c
Add UKSM 0.1.2

Conflicts:
	arch/arm/configs/KT747_d2att_defconfig
	arch/arm/configs/KT747_d2spr_defconfig
	arch/arm/configs/KT747_d2usc_defconfig
	arch/arm/configs/KT747_d2vzw_defconfig

Conflicts:
	include/linux/mm_types.h
UKSM: Upgrade to 0.1.2.2
Update Default Config
ext4: use atomic64_t for the per-flexbg free_clusters count

commit 90ba983f6889e65a3b506b30dc606aa9d1d46cd2 upstream.

A user who was using a 8TB+ file system and with a very large flexbg
size (> 65536) could cause the atomic_t used in the struct flex_groups
to overflow.  This was detected by PaX security patchset:

http://forums.grsecurity.net/viewtopic.php?f=3&t=3289&p=12551#p12551

This bug was introduced in commit 9f24e4208f7e, so it's been around
since 2.6.30.  :-(

Fix this by using an atomic64_t for struct orlav_stats's
free_clusters.

[Backported for 3.0-stable. Renamed free_clusters back to free_blocks;
fixed a few more atomic_read's of free_blocks left in 3.0.]

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Lingzhu Xiang <lxiang@redhat.com>
Reviewed-by: CAI Qian <caiqian@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ext4: fixup 64-bit divides in 3.0-stable backport of upstream fix

Replace C division operators with div64_u64 for divides introduced in:
commit 503f4bdcc078e7abee273a85ce322de81b18a224
ext4: use atomic64_t for the per-flexbg free_clusters count

Specific to the 3.0-stable backport of the upstream patch.

Change-Id: Id10180ed16f54f58fc18531092e88f52fc6de31c
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Linux 3.0.72
watchdog: omap_wdt: pet, do not disable, WDT at shutdown

Use WDT to recover from driver shutdown sequences that hang.

Change-Id: Ib794ea8ff7aa8f6f4b7e354f118b0d8f8eb98ddc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Linux 3.0.73
Revert "Added FSync Control version 1."

This reverts commit 34157fbd47a8cd24b59e311e662623d98a00f5db.

Conflicts:
	arch/arm/configs/tuna_defconfig
	drivers/misc/Kconfig
	drivers/misc/Makefile
switch do_fsync() to fget_light()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dyn_sync_cntrl: dynamic sync control - Thanks Faux123

Conflicts:
	arch/arm/configs/dualboot_defconfig
fs/dyn_fsync: check dyn fsync control's active prior to performing fsync ops

Signed-off-by: Andrew Bartholomew <andrewb03@gmail.com>
dynamic filesync: add some cache optimizations

and clean up file format and typos

bump version to 1.1

Signed-off-by: Paul Reioux <reioux@gmail.com>
3.0.74
OMAP4: PM: Handle LPDDR CLK IO errata during suspend/idle

There is a HW bug in CMD PHY which gives ISO signals as same for
both PADn and PADp on differential IO pad, because of which IO
leaks higher as pull controls are differential internally and
pull value does not match A value.
Though there is no functionality impact due to this bug, it is
seen that by disabling the pulls there is a savings ~500uA in
OSWR, but draws ~300uA more during OFF mode.

To save power during both idle/suspend following approach taken:
 1) Enable WA during boot-up.
 2) Disable WA while attempting suspend and enable during resume.

CDDS no: OMAP4460-1.0BUG00291
(OMAP official errata ID yet to be available).

Change-Id: Ic39f17be50ff602c71e714b05af3811b35c1a67f
Reported-by: Logan Lee <hklee@ti.com>
Signed-off-by: Shashi Shekar B.S. <shashi.shekar@ti.com>
Signed-off-by: Ambresh K <ambresh@ti.com>
drivers/gpu/pvr/pvr_governor: add a simple PVR GPU governor

this simple PVR GPU governor will scale between 3 speeds:
  idle -- GPU not active
  nominal -- GPU active with low graphical load
  turbo -- GPU active and boosted to max frequency

This should further save battery by intelligently selecting GPU frequency
based on GPU loading.

Signed-off-by: Paul Reioux <reioux@gmail.com>
drivers/gpu/pvr/pvr_governor: add sysfs entry to switch governor type

0 - "performance" ==> always return system turbo speed
1 - "ondemand" ==> return based on GPU loading (by default "ondemand"
governor is active)

Signed-off-by: Paul Reioux <reioux@gmail.com>
drivers/gpu/pvr/pvr_governor: add "powersave" governor as another option

    0 - "performance" ==> always return system turbo speed
    1 - "ondemand" ==> return based on GPU loading (by default "ondemand"
                       governor is active)
    2 - "powersave" ==> run alway at nominal speed

Signed-off-by: Paul Reioux <reioux@gmail.com>
drivers/gpu/pvr/pvr_governor: add sysfs interface for current GPU freqeuncy

Signed-off-by: Paul Reioux <reioux@gmail.com>