Sultan_defconfig: Don't build vibetonz as a module
USB: f_mass_storage: Added cdrom option to UMS-lun-devices

This patch allows programs to change the cdrom option at runtime
through sysfs.

Change-Id: I30a0ffc7f6e9a7f12d95ca1ab07949868aba440c
USB: f_mass_storage: 2048 block size for cdrom devices

Bios will recognize the cdrom device like most other cdrom
devices. This allows people to boot ISOs from their phone.

Original by Andreas Kemnade:
http://www.spinics.net/lists/linux-usb/msg25178.html

Change-Id: Id8fba96e1683f6daa6330b1e59f4a4ca4fe5c271
n_tty: Fix n_tty_write crash when echoing in raw mode

The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO & !OPOST.  And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashes when
concurrect writers call pty_write. In that case the following two
writers:
* the ECHOing from a workqueue and
* pty_write from the process
race and can overflow the corresponding TTY buffer like follows.

If we look into tty_insert_flip_string_fixed_flag, there is:
  int space = __tty_buffer_request_room(port, goal, flags);
  struct tty_buffer *tb = port->buf.tail;
  ...
  memcpy(char_buf_ptr(tb, tb->used), chars, space);
  ...
  tb->used += space;

so the race of the two can result in something like this:
              A                                B
__tty_buffer_request_room
                                  __tty_buffer_request_room
memcpy(buf(tb->used), ...)
tb->used += space;
                                  memcpy(buf(tb->used), ...) ->BOOM

B's memcpy is past the tty_buffer due to the previous A's tb->used
increment.

Since the N_TTY line discipline input processing can output
concurrently with a tty write, obtain the N_TTY ldisc output_lock to
serialize echo output with normal tty writes.  This ensures the tty
buffer helper tty_insert_flip_string is not called concurrently and
everything is fine.

Note that this is nicely reproducible by an ordinary user using
forkpty and some setup around that (raw termios + ECHO). And it is
present in kernels at least after commit
d945cb9cce20ac7143c2de8d88b187f62db99bdc (pty: Rework the pty layer to
use the normal buffering logic) in 2.6.31-rc3.

js: add more info to the commit log
js: switch to bool
js: lock unconditionally
js: lock only the tty->ops->write call

Change-Id: I7f5d6d28ff8bcfea9d1cdf9e628d4c5e32d2afe8
References: CVE-2014-0196
Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: output_lock is a member of struct tty_struct]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Revert "msm: kgsl: Cleanup the memory free list"

This reverts commit b023d9ddc04e349dd2df14e88cec1c208ba244c5.
Revert "kgsl: Sync with CAF kk_2.7-stable"

This reverts commit 69bf3fe7b1fd8a22abbecc599024cf158607b629.
Revert "Sultan_defconfig: Increase MSM_KGSL_PAGE_TABLE_COUNT to 48"

This reverts commit 1a5f312e9b575933680ef758be7f7c78b6edad5e.
sec_battery: Use AC charging for unknown cable types

Unknown cable types are charger type 6. This fixes the very annoying issue described in this thread: http://forum.xda-developers.com/showthread.php?t=1759541

Signed-off-by: Sultanxda <sultanxda@gmail.com>
drivers: power: Increase AC max current from 900mA to 1A+

Signed-off-by: Sultanxda <sultanxda@gmail.com>
drivers: power: Determine charge mode from actual cable type

CHG_MODE_UNKNOWN is now detected as CHG_MODE_AC, so remove it.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
smb328a_charger: Remove CHG_MODE_UNKNOWN

CHG_MODE_UNKNOWN is detected as CHG_MODE_AC instead.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
drivers: power: Enable 1A+ max charge current over USB

Signed-off-by: Sultanxda <sultanxda@gmail.com>