msm: rotator: Add secure session flag to rotator start data

Add flag for handling secure session to rotator data passed during
start ioctl call.

Change-Id: I58e2107dfc5c9956691a3defa7364fc220cfe079
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Revert "msm8660: set REQUIRES_SEC for proper build of scm.c"

This reverts commit f02c035e3d3aa15a8ebe0071eb037d2b111ac60f.
msm8660: Set as-instr to use printf intsead of echo

as-instr was hardcoded to use /bin/echo with the -e option.
Non-GNU systems like MacOSX would fail and cause compiler errors.

Since BSD echo does not have the -e option (escape backslashes)
prinf was used instead would should be more friendly cross-platform

Specifically with the new OSX toolchain it caused the following
error:
  Error: selected processor does not support ARM mode `smc #0'

This was caused by $(call as-instr,.arch_extension sec,+sec) failing
since it was using echo -e.

See: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html

  "It is not possible to use echo portably across all POSIX systems
   unless both -n (as the first argument) and escape sequences are
   omitted.

  The printf utility can be used portably to emulate any of the
  traditional behaviors of the echo utility as follows (assuming
  that IFS has its standard value or is unset)

  New applications are encouraged to use printf instead of echo."

Change-Id: I558ec343e9bb8d449e1af710d329b4dc76743a05
CIFS: Fix incorrect max RFC1002 write size value

commit 94443f43404239c2a6dc4252a7cb9e77f5b1eb6e upstream.

..the length field has only 17 bits.

Acked-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
CIFS: Fix DFS handling in cifs_get_file_info

commit 42274bb22afc3e877ae5abed787b0b09d7dede52 upstream.

We should call cifs_all_info_to_fattr in rc == 0 case only.

Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cris: fix a build error in drivers/tty/serial/crisv10.c

commit 2f7861de111bb8e33e6ab9f9607583c6fbc00132 upstream.

This patch fixes the following build error:

drivers/tty/serial/crisv10.c:4453: error: 'if_ser0' undeclared (first use in this function): 2 errors in 2 logs
        v3.1-rc4/cris/cris-allmodconfig v3.1-rc4/cris/cris-allyesconfig
drivers/tty/serial/crisv10.c:4453: error: (Each undeclared identifier is reported only once: 2 errors in 2 logs
        v3.1-rc4/cris/cris-allmodconfig v3.1-rc4/cris/cris-allyesconfig
drivers/tty/serial/crisv10.c:4453: error: for each function it appears in.): 2 errors in 2 logs
        v3.1-rc4/cris/cris-allmodconfig v3.1-rc4/cris/cris-allyesconfig

"if_ser0" is a typo, it should be "if_serial_0".

Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
TTY: drop driver reference in tty_open fail path

commit c290f8358acaeffd8e0c551ddcc24d1206143376 upstream.

When tty_driver_lookup_tty fails in tty_open, we forget to drop a
reference to the tty driver. This was added by commit 4a2b5fddd5 (Move
tty lookup/reopen to caller).

Fix that by adding tty_driver_kref_put to the fail path.

I will refactor the code later. This is for the ease of backporting to
stable.

Introduced-in: v2.6.28-rc2
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>