Bluetooth: fix possible info leak in bt_sock_recvmsg()

In case the socket is already shutting down, bt_sock_recvmsg() returns
with 0 without updating msg_namelen leading to net/socket.c leaking the
local, uninitialized sockaddr_storage variable to userland -- 128 bytes
of kernel stack memory.

Fix this by moving the msg_namelen assignment in front of the shutdown
test.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
PM / tracing: remove deprecated power trace API

The text in Documentation said it would be removed in 2.6.41;
the text in the Kconfig said removal in the 3.1 release.  Either
way you look at it, we are well past both, so push it off a cliff.

Note that the POWER_CSTATE and the POWER_PSTATE are part of the
legacy tracing API.  Remove all tracepoints which use these flags.
As can be seen from context, most already have a trace entry via
trace_cpu_idle anyways.

Also, the cpufreq/cpufreq.c PSTATE one is actually unpaired, as
compared to the CSTATE ones which all have a clear start/stop.
As part of this, the trace_power_frequency also becomes orphaned,
so it too is deleted.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Conflicts:
	arch/x86/kernel/process.c
BACKLIGHT CONTROL v4: Allow custom mods only if min_backlight_reducer = 1

this will fix the backlight flick when no forced min enabled, and user set
some value, but ROM will set higher, and we see brightness flick..
 ASoC: sound_control: Rewrite cache reg logic

* Use cached reg to fetch locked value.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Revert "sched: LOAD_FREQ (4*HZ+61) avoids loadavg Moire"

This reverts commit 7d03b824de1016794cba25672e5ac629534dfce5.

Some strange hangs, screen is freezing for 2~4sec without any dmesg
logs, never was before. so i guess this should go out.
MSM THERMAL: allow Max 78C for CPU TEMP. and 79 for CORE ON/OFF
BACKLIGHT CONTROL v5: before changing backlight, check current LUX.

If we have higher than 100LUX then dont make any visable change.
Driver will wait till device is in dark.
Kernel 7.3
SOUND CONTROL: Clean locking functions. and use custom only.

*Set headphones locked gain to 0 as LG set it to 252 by default.
and that is very LOW.
*Set PA default boot gain to 6 that is 0 in faux app. and dont lock it.
it's will change to 32 when no sound.
Merge branch 'LG-STOCK-KK' of https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel into merge

Conflicts:
	arch/arm/configs/dorimanx_f320_defconfig
sched: LOAD_FREQ (4*HZ+61) avoids loadavg Moire

These values are applicable for 100 HZ device.
Check http://ripke.com/loadavg/moire for more details.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>