sched: change find_busiest_queue to h_nr_running

Date    Sun, 18 Aug 2013 16:25:20 +0800

Since find_busiest_queue try to avoid do load balance for runqueue
which has only one cfs task and its load is above the imbalance
value calculated, we should use h_nr_running of cfs instead of
nr_running of rq.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Signed-off-by: Paul Reioux <reioux@gmail.com>
(cherry picked from commit 09f1d0fbc0664be6aaf387997954670dcda7e8b6)
sched: document the difference between nr_running and h_nr_running

Date    Sun, 18 Aug 2013 16:25:22 +0800

Signed-off-by: Lei Wen <leiwen@marvell.com>

Signed-off-by: Paul Reioux <reioux@gmail.com>
(cherry picked from commit 8ef35148c476a220540e3a55b4b69b7f54ba0d78)
USB: hub: Avoid NULL pointer dereference when hub doesn't have any ports

Return an error if hub->descriptor->bNbrPorts==0. Without this additional
check, we can end up doing a "hub->ports = kzalloc(0, GFP_KERNEL)".
This hub->ports pointer will therefore be non-NULL and will be used.
Example of dmesg:
   INIT: usb 1-1: New USB device found, idVendor=0424, idProduct=2512
   usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
   hub 1-1:1.0: USB hub found
   version 2.86 bootinghub 1-1:1.0: 0 ports detected
   Unable to handle kernel NULL pointer dereference at virtual address 00000010

Signed-off-by: David Linares <dlinares.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
(cherry picked from commit e5fb834464d475b1e542c6ad641ad0c8f4b53fe6)
msm-camera: Fix various small issues in Actuator driver

Bound check and validate userspace parameters direction,
number of steps and direction sign. Also fix possible
memory leak in certain error cases.

CRs-Fixed: 511349

Conflicts:
        drivers/media/video/msm/actuators/msm_actuator.c

Change-Id: I05a3f63583845851df36b122f2079d345657cb99
Signed-off-by: Abhinay Reddy Vanipally <avanip@codeaurora.org>
(cherry picked from commit 555756e6de946e18812b15bb7867148b1054a2a1)
Fix for compilation issues.

Change-Id: I255c8378fd8b573cef3e938ca67e10d6e7de1e6e
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
(cherry picked from commit 3ffef73a3b8806ea5155d4210d071e64752aa29d)

Conflicts:
	drivers/media/radio/radio-tavarua.c
msm-camera: Fix to prevent kernel heap buffer overflow in actuator

Fix to prevent kernel heap buffer overflow allows user
controlled data to be written to the heap via the
msm_camera actuator IOCTLs

Change-Id: I5d511e8c1aa2f76f4209a6712a58d8757bc53367
CRs-Fixed: 545979
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
(cherry picked from commit bc73ffdbdba24fdf5bdc0b81ecde7053f2794214)
msm-camera:  Return from DQBUF ioctl in case of error.

Incase the vb2_dqbuf call returns error, we are continuing
ahead and trying to access the fields of the vb2 buffer which
may not be initialized yet. Avoid this by checking the
return value of vb2_dqbuf and return immediately in case of
errors.

CRs-Fixed: 495635

Change-Id: Iaf8173247d44b457e7800d283e699a1514bb5ae5
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
(cherry picked from commit 1947f953bd05958d6d160ebdab25334a367376d4)
net: ipv4: current group_info should be put after using.

Plug a group_info refcount leak in ping_init.
group_info is only needed during initialization and
the code failed to release the reference on exit.
While here move grabbing the reference to a place
where it is actually needed.

Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
Signed-off-by: Zhang Dongxing <dongxing.zhang@intel.com>
Signed-off-by: xiaoming wang <xiaoming.wang@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	net/ipv4/ping.c

Change-Id: I51931e439cce7f19b4179f5828d7355bb3b1dcfa
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
(cherry picked from commit 63543675c31dd3674318b079a686a23a29c6ac2a)
binder: NULL pointer reference

This fix handles a possible NULL pointer reference in
debug message.

Signed-off-by: Paresh Nakhe <pnakhe@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
(cherry picked from commit 56a5173cba41b8a9f27df0560b3de5c849d8136f)
selinux: Report permissive mode in avc: denied messages.

We cannot presently tell from an avc: denied message whether access was in
fact denied or was allowed due to global or per-domain permissive mode.
Add a permissive= field to the avc message to reflect this information.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
(cherry picked from commit de6797f9f63f0043b2c47fe62f12160bc3ee46ae)
sched: Disabled Gentle Fair Sleepers for better UI performance

(cherry picked from commit 7dc818b0d4ee944387288be39349b2248055095b)

Conflicts:
	block/Kconfig.iosched
	block/Makefile
enable sio and sio plus io

(cherry picked from commit 41711db0eb549354683decd0311fc675036fe9e2)

Conflicts:
	arch/arm/configs/cyanogenmod_u0_nonfc_defconfig
ZEN IO Scheduler

(cherry picked from commit 7da35f795e42b9b62ec9e80490c14f066a12174a)