sdk/emulator/emulator-kernel.git
7 years agopackage: update version (4.4.16) spin
Minkee Lee [Fri, 2 Dec 2016 02:29:50 +0000 (11:29 +0900)]
package: update version (4.4.16)

Change-Id: Iafd015fd9969e30affb44fa4d8dacd4e886523ec
Signed-off-by: Minkee Lee <minkee.lee@samsung.com>
7 years agosensor: add pedometer sensor device driver
Sooyoung Ha [Wed, 20 Jul 2016 06:13:03 +0000 (15:13 +0900)]
sensor: add pedometer sensor device driver

Change-Id: I284ce56f2f8ea9aa8909e6a3c1be044518f115b9
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
(cherry picked from commit 66ee7c4ee8cdc7afcb629ea3840eafddf5091a33)

7 years agokeyboard: fix keyboard input issue on 64bit guest
Munkyu Im [Wed, 30 Nov 2016 11:41:26 +0000 (20:41 +0900)]
keyboard: fix keyboard input issue on 64bit guest

Some keycodes do not work on 64bit guest.
So, reset previous keybit setting.

Change-Id: I3d16f9106fe79e0493369c4953272cbeb04ebb49
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
7 years agoMerge branch 'tizen' into develop
SeokYeon Hwang [Thu, 1 Dec 2016 02:05:16 +0000 (11:05 +0900)]
Merge branch 'tizen' into develop

Change-Id: I1332757228f4fdbb8ebc73bd27442772a516b34d
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
7 years agox86, pat: workaround to force PAT usage 30/100730/1
Vasiliy Ulyanov [Tue, 11 Oct 2016 12:49:04 +0000 (15:49 +0300)]
x86, pat: workaround to force PAT usage

When run under haxm certain CPU features appear inaccesible from guest
and at the moment there seems to be no proper way to set them up from the
host side. The patch allows to forcefully enable x86 Page Attribute
Table and therefore use different memory caching policies at the page
level granularity. PAT significantly improves performance when mmaped
device buffers are accessed.

WARNING: once a proper solution is figured out for haxm case the patch
should be reverted. Currently it is more like a hack to avoid terrible
performance on certain scenarios like decoding high resolution video
directly into the mmaped video buffer.

Change-Id: Ib626a93b2ff16cc8bbdee186cfe67cff6b29e618
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
7 years agox86: tizen_emul_defconfig: enable smack_netfilter 72/100172/1
jooseong lee [Fri, 25 Nov 2016 07:51:40 +0000 (16:51 +0900)]
x86: tizen_emul_defconfig: enable smack_netfilter

This patch enables smack netfilter to support nether serivce.
Nether is for network access control in Tizen3.0.

Change-Id: Id1fc9fdc34dbab674e0db1967c163cc32a8c5b0c
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agopackage: update version (4.4.15)
SeokYeon Hwang [Tue, 22 Nov 2016 09:40:40 +0000 (18:40 +0900)]
package: update version (4.4.15)

Change-Id: Ib741a651293ab442cb713ce2b06cdd6210e4e8ac
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
7 years agoarch: change 32bit kernel extension to x86
SeokYeon Hwang [Tue, 15 Nov 2016 05:30:23 +0000 (14:30 +0900)]
arch: change 32bit kernel extension to x86

Change-Id: Id628db3815676319640dc321a61f3c160d7af0f7
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
7 years agovirtio: wake up interrupt after all messages are added
Munkyu Im [Thu, 17 Nov 2016 10:02:07 +0000 (19:02 +0900)]
virtio: wake up interrupt after all messages are added

In case of using multiple message with list,
wake up interrupt should call after all messages are added to list.
Otherwise, synchronization problem can be occurred.

Change-Id: I808f54d8d08267e8038e6fe17187abaaa10edf56
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
8 years agotv: add device capability flag
Jinhyung Jo [Thu, 10 Nov 2016 04:54:56 +0000 (13:54 +0900)]
tv: add device capability flag

According to the policy of the V4L2,
the device drivers MUST fill in the device_caps.
If do not, warning messages & back-traces are print to the log.
Therefore add flags to the devices that do not have the device_caps.

Change-Id: I5d9ce4da56fc55ca81ca362b4f052339fec02f91
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
8 years agopackage: update version (4.4.14)
Sooyoung Ha [Tue, 8 Nov 2016 02:09:40 +0000 (11:09 +0900)]
package: update version (4.4.14)

Change-Id: I857f017fe64370d42407a33cef950d5adefc6794
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoconfig: re-enable dm-crypt
Sooyoung Ha [Mon, 7 Nov 2016 04:22:55 +0000 (13:22 +0900)]
config: re-enable dm-crypt

Change-Id: I937ae62cfeae0d0c1be90f37af4b5df3a389b25c
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agopackage: update version (4.4.13)
Jinhyung Jo [Tue, 18 Oct 2016 05:57:00 +0000 (14:57 +0900)]
package: update version (4.4.13)

Change-Id: Ifcd86a0a3021275b0dada0483349ce0ffaf41d9c
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
8 years agotablet: Bug fix for the kernel command breaking
jinhyung.jo [Tue, 27 Oct 2015 05:42:24 +0000 (14:42 +0900)]
tablet: Bug fix for the kernel command breaking

When getting the display resolution, some parameters are missing.
Because the driver directly uses the address of the kernel command line.
So it copies the kernel command line to temporary buffer and uses it.
And added some modification for the logs.

Change-Id: If8cffbed1cbb81200bf46ade862a5f38e0c3914c
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
(cherry picked from commit 9c4925034c0d3a474c51c7760e7fdd8f3637624c)

8 years agotablet: Applying the screen size in the driver probing.
jinhyung.jo [Wed, 14 Oct 2015 06:56:34 +0000 (15:56 +0900)]
tablet: Applying the screen size in the driver probing.

The screen size is required when the initializing driver,
in order to apply the correct absolute coordinates of the mouse.

Conflicts:
drivers/maru/maru_virtio_tablet.c

Change-Id: Iaf385d1c482614595de4d82b7d5b434648b67d5d
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
(cherry picked from commit 91bac12b09a68f975a7a7800d9902918886e0751)

8 years agopackage: update version (4.4.12)
Sooyoung Ha [Thu, 8 Sep 2016 10:12:52 +0000 (19:12 +0900)]
package: update version (4.4.12)

Change-Id: I0915d8f7bbb6c78c3c72600817e6b5a2206d5398
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoconfig: modify processor family type
Sooyoung Ha [Thu, 8 Sep 2016 08:24:15 +0000 (17:24 +0900)]
config: modify processor family type

The platform SWAP module knew the processor as 686(aka pentinum pro)
but emulator kernel had been changed as pentium 4.
It could cause the DA module fault, so I revert it to pentium pro.

Change-Id: Ia68fc9f0ed118e41cff53e6784444880b0d02ffa
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agopackage: update version (4.4.11)
SeokYeon Hwang [Tue, 9 Aug 2016 06:19:59 +0000 (15:19 +0900)]
package: update version (4.4.11)

Change-Id: I03b6a4e5f0f7a86907eef3851d42b607143bd726
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agosound: include QEMU HDA in to the whilte list
SeokYeon Hwang [Thu, 4 Aug 2016 04:06:06 +0000 (13:06 +0900)]
sound: include QEMU HDA in to the whilte list

Prevent ac97 clock probing. It reduces kernel loading time considerably.

Change-Id: I8457d01889492415c8f29f13897988f6fe689f8d
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoconfig: remove unused features and drivers
SeokYeon Hwang [Thu, 4 Aug 2016 04:02:23 +0000 (13:02 +0900)]
config: remove unused features and drivers

Remove some unused and unnecessary features and drivers. Some
features and drivers still remain for debugging purpose.
It will decrease kernel build time and kernel loading time.

Change-Id: I7873c1eaf7652341a38a9ca475e3598afe20bf73
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoTV: add EXTERNAL_INPUT
YunHo Lee [Thu, 21 Jul 2016 04:25:28 +0000 (13:25 +0900)]
TV: add EXTERNAL_INPUT

Change-Id: I0bc94f28d2b9dca6bd797582541a3c2e0986d178
Signed-off-by: YunHo Lee <yun117.lee@samsung.com>
8 years agopackage: update version (4.4.10)
Sooyoung Ha [Wed, 20 Jul 2016 06:21:21 +0000 (15:21 +0900)]
package: update version (4.4.10)

Change-Id: Ied1ca5304cefa7b5ec9d4d313cca11328a38e304
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoMerge branch 'tizen' into develop
SeokYeon Hwang [Wed, 20 Jul 2016 05:56:48 +0000 (14:56 +0900)]
Merge branch 'tizen' into develop

Change-Id: Ib5270e50e8efaa535f905dcb73da222043071e98
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoSmack: Assign smack_known_web label for kernel thread's socket in the sk_alloc_securi... 23/80723/2
jooseong lee [Wed, 20 Jul 2016 01:07:11 +0000 (10:07 +0900)]
Smack: Assign smack_known_web label for kernel thread's socket in the sk_alloc_security hook

Creating struct sock by sk_alloc function in various kernel subsystems
like bluetooth dosen't call smack_socket_post_create(). In such case,
received sock label is the floor('_') label and makes access deny.

Refers to:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7412301b76bd53ee53b860f611fc3b5b1c2245b5

Change-Id: I614c5f0e6d59be5ca6b49f0581edfef79fc334cf
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
8 years agopackage: update version (4.4.9)
Sooyoung Ha [Tue, 19 Jul 2016 05:36:14 +0000 (14:36 +0900)]
package: update version (4.4.9)

Change-Id: I446c35d16f67bb0d9f29d32e29a0d94103a64ce8
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoconfig: enable dm-crypt
Sooyoung Ha [Thu, 14 Jul 2016 07:58:20 +0000 (16:58 +0900)]
config: enable dm-crypt

Change-Id: Ib231b34fb20ff407e80cbe7ffd82e9850e9113e2
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoTV: Add Tuner driver
YunHo Lee [Wed, 13 Jul 2016 06:20:02 +0000 (15:20 +0900)]
TV: Add Tuner driver

Change-Id: I31cc002a4903fe46950526341782b8a80a8c9936
Signed-off-by: YunHo Lee <yun117.lee@samsung.com>
8 years agomaru: apply -Werror on subdirectories under maru
SeokYeon Hwang [Fri, 15 Jul 2016 07:18:26 +0000 (16:18 +0900)]
maru: apply -Werror on subdirectories under maru

Change-Id: I03d846536185729830dedd8e4fdb88855e33a701
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agopackage: update version (4.4.8)
Sooyoung Ha [Tue, 12 Jul 2016 07:28:16 +0000 (16:28 +0900)]
package: update version (4.4.8)

Change-Id: Id0e46064345a6e4cf763feb3b292a3221ee6a103
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agosensor: initialize the virtio sersor structure
Sooyoung Ha [Tue, 12 Jul 2016 05:59:27 +0000 (14:59 +0900)]
sensor: initialize the virtio sersor structure

Change-Id: Id40ec6491ca92afa3bf31e4a8daaa236e1445082
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agopackage: update version (4.4.7)
Sooyoung Ha [Tue, 12 Jul 2016 02:23:22 +0000 (11:23 +0900)]
package: update version (4.4.7)

Change-Id: I9785dae9a9171fe53f7bd7de3fbc7eaef4a9ec33
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agovdpram: modify vdpram char device number
Sooyoung Ha [Thu, 7 Jul 2016 09:20:11 +0000 (18:20 +0900)]
vdpram: modify vdpram char device number

It is fixed so far, it could cause probing error. So I modify it to
choose the major number dynamically. And move it into 'maru' directory.

Change-Id: Ic46e71541f83bd227e03e1c0f17295029d319ba0
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoTV: realign configs and directories
SeokYeon Hwang [Thu, 7 Jul 2016 08:29:42 +0000 (17:29 +0900)]
TV: realign configs and directories

Change-Id: I20a5ced7df9b4dd6e0a50ff3c92b80810adfd56c
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agopackage: update version (4.4.5)
Sooyoung Ha [Tue, 5 Jul 2016 06:39:42 +0000 (15:39 +0900)]
package: update version (4.4.5)

Change-Id: Iccdddd194e22a20f0c656adedd545a8aa6ee3f66
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoeeprom: fix wrong printing specifiers
SeokYeon Hwang [Tue, 5 Jul 2016 07:48:43 +0000 (16:48 +0900)]
eeprom: fix wrong printing specifiers

Change-Id: I28e56294303f41cabb162b849244ef3e46ab16b4
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoMerge branch 'tizen' into develop
SeokYeon Hwang [Tue, 5 Jul 2016 06:30:22 +0000 (15:30 +0900)]
Merge branch 'tizen' into develop

8 years agoDisable smack netfilter option. 07/78307/2
jin-gyu.kim [Tue, 5 Jul 2016 05:38:56 +0000 (14:38 +0900)]
Disable smack netfilter option.

Change-Id: I543a9cd9be0a5f571b7aef85a650e6aba9e95821

8 years agoMerge branch 'spin' into tizen 19/78319/1
SeokYeon Hwang [Tue, 5 Jul 2016 06:08:56 +0000 (15:08 +0900)]
Merge branch 'spin' into tizen

Change-Id: Ife6eb446dd4f2161dde80f9c6c58a8b0c3bb0c32
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoTV: Add dummy driver for TV Emulator
Hyun myung Cho [Thu, 30 Jun 2016 07:01:46 +0000 (16:01 +0900)]
TV: Add dummy driver for TV Emulator

Change-Id: I09cb1b1a5b4b45a2b743218b552603685ae1c1e5
Signed-off-by: Hyun myung Cho <hm83.cho@samsung.com>
8 years agopackage: update version (4.4.5)
SeokYeon Hwang [Tue, 28 Jun 2016 02:09:16 +0000 (11:09 +0900)]
package: update version (4.4.5)

Change-Id: I7226234ade72a5f30ec63b5351b8d7a4d1e53e59
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agorotary: rewrite driver implementation
SeokYeon Hwang [Thu, 23 Jun 2016 04:16:46 +0000 (13:16 +0900)]
rotary: rewrite driver implementation

Change-Id: I734e833ac3b4af76ddb4f9d6a9e06fdbc95049a9
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agovirtio: introduce maru_virtio_device
SeokYeon Hwang [Wed, 22 Jun 2016 06:17:32 +0000 (15:17 +0900)]
virtio: introduce maru_virtio_device

"maru_virtuo_device" structure and new header include convenient API
for using virtqueue and allocating buffer.
Rewrite hwkey device.

Change-Id: Ic3f4d25ba0cf6616f4f9ded86017378ccc0b8b3a
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
(cherry picked from commit ee8604f9a69db762f0618851352e3979010ed181)

8 years agopackage: update version (4.4.4)
Sooyoung Ha [Thu, 16 Jun 2016 07:23:34 +0000 (16:23 +0900)]
package: update version (4.4.4)

Change-Id: Icdd6781b8ae8580c621d985360e5a77b90958840
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoyagl: introduce yagl protocol version
Sooyoung Ha [Thu, 16 Jun 2016 05:42:05 +0000 (14:42 +0900)]
yagl: introduce yagl protocol version

Now yagl driver receives the protocol version from yagl device and send
it to user.

Change-Id: I156efb5a407bf29ef00460478f246b0621916096
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoinput: rewrite virtio touchscreen / keyboard device
SeokYeon Hwang [Wed, 15 Jun 2016 08:35:10 +0000 (17:35 +0900)]
input: rewrite virtio touchscreen / keyboard device

Simplified input processing logics.
Used proper virtio APIs.

Change-Id: I24a8564842fbb0d3833c4c2bf21e658c85c00cb0
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agopackage: update version (4.4.3)
Sooyoung Ha [Tue, 14 Jun 2016 07:22:11 +0000 (16:22 +0900)]
package: update version (4.4.3)

Change-Id: I9d1ee0841739dd08324a8d577cd145d1c5713674
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agobuild: enable vdpram driver for vmodem
Sooyoung Ha [Tue, 14 Jun 2016 02:45:56 +0000 (11:45 +0900)]
build: enable vdpram driver for vmodem

Change-Id: I99da9549a74d6b677f26c4b4862fb50fe37106c7
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agopackage: update version (4.4.2)
Jinhyung Choi [Mon, 13 Jun 2016 02:40:39 +0000 (11:40 +0900)]
package: update version (4.4.2)

Change-Id: I902f3c9bebf3e6421303609dc9a2bfa9fdfec988
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agoconfig: enable CONFIG_MARU_POWER_SUPPLY
Jinhyung Choi [Sun, 12 Jun 2016 07:13:16 +0000 (16:13 +0900)]
config: enable CONFIG_MARU_POWER_SUPPLY

Change-Id: I503d1406b16f7ed9773e60b9afa08f921f49d73c
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
8 years agoMerge branch 'spin' into tizen 88/73688/1 accepted/tizen/3.0/common/20161114.112243 accepted/tizen/3.0/ivi/20161011.044110 accepted/tizen/3.0/mobile/20161015.033139 accepted/tizen/3.0/tv/20161016.004045 accepted/tizen/3.0/wearable/20161015.082809 accepted/tizen/common/20160610.182105 accepted/tizen/ivi/20160610.113756 accepted/tizen/mobile/20160610.113701 accepted/tizen/tv/20160610.113715 accepted/tizen/wearable/20160610.113732 submit/tizen/20160609.135915 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000002 submit/tizen_3.0_mobile/20161015.000002 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000002
SeokYeon Hwang [Thu, 9 Jun 2016 07:15:28 +0000 (16:15 +0900)]
Merge branch 'spin' into tizen

Change-Id: I9b5c67a3e7a35459d40525543a561e1c140cafae
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoMerge branch 'tizen' into develop
SeokYeon Hwang [Thu, 9 Jun 2016 07:12:05 +0000 (16:12 +0900)]
Merge branch 'tizen' into develop

8 years agopackage: update version (4.4.1)
Sooyoung Ha [Thu, 9 Jun 2016 05:26:01 +0000 (14:26 +0900)]
package: update version (4.4.1)

Change-Id: I30cec28bfa8be7e7e9fbb2a4627d0cf66e904d8f
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agobuild: enable Android logger and alarm-dev again
SeokYeon Hwang [Thu, 9 Jun 2016 03:22:59 +0000 (12:22 +0900)]
build: enable Android logger and alarm-dev again

Change-Id: I367015ced2a8088fff7f595be426c2a5086e0a92
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoRevert "staging: Remove logger and alarm-dev from android Makefile"
SeokYeon Hwang [Thu, 9 Jun 2016 02:41:36 +0000 (11:41 +0900)]
Revert "staging: Remove logger and alarm-dev from android Makefile"

This reverts commit 71e365ed0ca893cae8d72cbd4b476a9589003098.

Change-Id: I2741995670b42bc02a16f61ee81e3af828eb253c
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agostaging: follow changes up for building Android logger driver
SeokYeon Hwang [Thu, 9 Jun 2016 03:13:29 +0000 (12:13 +0900)]
staging: follow changes up for building Android logger driver

Follow changes up in commit 66ee59af630fd8d5f4f56fb28162857e629aa0ab.

Change-Id: I495139006939619bc35d7ec7ecc8967996317afb
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoRevert "staging: Remove the Android logger driver"
SeokYeon Hwang [Thu, 9 Jun 2016 02:28:08 +0000 (11:28 +0900)]
Revert "staging: Remove the Android logger driver"

This reverts commit a0a23bbce7818c90c3d3370af966fefce07a8c9b.

Change-Id: Icd5254ea7e742931338cde84cb013dafd09e7b06
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoRevert "staging: Remove the Android alarm-dev driver"
SeokYeon Hwang [Thu, 9 Jun 2016 03:10:13 +0000 (12:10 +0900)]
Revert "staging: Remove the Android alarm-dev driver"

This reverts commit 5da41e925656649fd970f0c205eee5fda887dc24.

Change-Id: I0e5f11f2233cdacffa500ed8fd479a02f3fc68bc
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agopackaging: modify kernel devel source directory 79/73379/1
Sooyoung Ha [Wed, 8 Jun 2016 02:25:35 +0000 (11:25 +0900)]
packaging: modify kernel devel source directory

I modify it to follow the target kernel's naming rule.

Change-Id: I0576345094b4fc62b4d9559cc8d6f9b982e8cb09
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoMerge branch 'tizen_linux_4.4' into tizen 35/73235/1 submit/tizen/20160607.132125
SeokYeon Hwang [Tue, 7 Jun 2016 08:31:12 +0000 (17:31 +0900)]
Merge branch 'tizen_linux_4.4' into tizen

Change-Id: I9e29c9fdfea5576aea3862058782313c2a08fed4
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agopackage: add version bump changelog tizen_linux_4.4
SeokYeon Hwang [Tue, 7 Jun 2016 08:28:25 +0000 (17:28 +0900)]
package: add version bump changelog

Change-Id: I0c45ea27d341925de04796e12565561029f6f024
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agopackaging: apply packaging directory for rpm build 30/73230/1
Sooyoung Ha [Tue, 7 Jun 2016 08:20:45 +0000 (17:20 +0900)]
packaging: apply packaging directory for rpm build

Change-Id: I508195e771ce0ebeeb949f4c4c865f8d29f483b9
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
8 years agoMerge tag 'v4.4.12' into tizen_linux_4.4
SeokYeon Hwang [Tue, 7 Jun 2016 07:02:33 +0000 (16:02 +0900)]
Merge tag 'v4.4.12' into tizen_linux_4.4

This is the 4.4.12 stable release

8 years agopackage: update version (3.14.18) tizen_linux_3.14
SeokYeon Hwang [Mon, 6 Jun 2016 07:15:30 +0000 (16:15 +0900)]
package: update version (3.14.18)

Change-Id: Ic77b6336a001374dce3f63faed68b1b145b56633
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
8 years agoSmack: ignore private inode for smack_file_receive
Seung-Woo Kim [Fri, 17 Apr 2015 06:25:04 +0000 (15:25 +0900)]
Smack: ignore private inode for smack_file_receive

The dmabuf fd can be shared between processes via unix domain
socket. The file of dmabuf fd is came from anon_inode. The inode
has no set and get xattr operations, so it can not be shared
between processes with smack. This patch fixes just to ignore
private inode including anon_inode for smack_file_receive.

Change-Id: Iedc8901eb119095054f54c261157adb61d8dad30
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 years agoLinux 4.4.12
Greg Kroah-Hartman [Wed, 1 Jun 2016 19:16:06 +0000 (12:16 -0700)]
Linux 4.4.12

8 years agokbuild: move -Wunused-const-variable to W=1 warning level
Arnd Bergmann [Tue, 10 May 2016 21:30:01 +0000 (23:30 +0200)]
kbuild: move -Wunused-const-variable to W=1 warning level

commit c9c6837d39311b0cc14cdbe7c18e815ab44aefb1 upstream.

gcc-6 started warning by default about variables that are not
used anywhere and that are marked 'const', generating many
false positives in an allmodconfig build, e.g.:

arch/arm/mach-davinci/board-da830-evm.c:282:20: warning: 'da830_evm_emif25_pins' defined but not used [-Wunused-const-variable=]
arch/arm/plat-omap/dmtimer.c:958:34: warning: 'omap_timer_match' defined but not used [-Wunused-const-variable=]
drivers/bluetooth/hci_bcm.c:625:39: warning: 'acpi_bcm_default_gpios' defined but not used [-Wunused-const-variable=]
drivers/char/hw_random/omap-rng.c:92:18: warning: 'reg_map_omap4' defined but not used [-Wunused-const-variable=]
drivers/devfreq/exynos/exynos5_bus.c:381:32: warning: 'exynos5_busfreq_int_pm' defined but not used [-Wunused-const-variable=]
drivers/dma/mv_xor.c:1139:34: warning: 'mv_xor_dt_ids' defined but not used [-Wunused-const-variable=]

This is similar to the existing -Wunused-but-set-variable warning
that was added in an earlier release and that we disable by default
now and only enable when W=1 is set, so it makes sense to do
the same here. Once we have eliminated the majority of the
warnings for both, we can put them back into the default list.

We probably want this in backport kernels as well, to allow building
them with gcc-6 without introducing extra warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoRevert "scsi: fix soft lockup in scsi_remove_target() on module removal"
Johannes Thumshirn [Tue, 5 Apr 2016 09:50:45 +0000 (11:50 +0200)]
Revert "scsi: fix soft lockup in scsi_remove_target() on module removal"

commit 305c2e71b3d733ec065cb716c76af7d554bd5571 upstream.

Now that we've done a more comprehensive fix with the intermediate
target state we can remove the previous hack introduced with commit
90a88d6ef88e ("scsi: fix soft lockup in scsi_remove_target() on module
removal").

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoscsi: Add intermediate STARGET_REMOVE state to scsi_target_state
Johannes Thumshirn [Tue, 5 Apr 2016 09:50:44 +0000 (11:50 +0200)]
scsi: Add intermediate STARGET_REMOVE state to scsi_target_state

commit f05795d3d771f30a7bdc3a138bf714b06d42aa95 upstream.

Add intermediate STARGET_REMOVE state to scsi_target_state to avoid
running into the BUG_ON() in scsi_target_reap(). The STARGET_REMOVE
state is only valid in the path from scsi_remove_target() to
scsi_target_destroy() indicating this target is going to be removed.

This re-fixes the problem introduced in commits bc3f02a795d3 ("[SCSI]
scsi_remove_target: fix softlockup regression on hot remove") and
40998193560d ("scsi: restart list search after unlock in
scsi_remove_target") in a more comprehensive way.

[mkp: Included James' fix for scsi_target_destroy()]

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Fixes: 40998193560dab6c3ce8d25f4fa58a23e252ef38
Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: James Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agohpfs: implement the show_options method
Mikulas Patocka [Tue, 24 May 2016 20:49:18 +0000 (22:49 +0200)]
hpfs: implement the show_options method

commit 037369b872940cd923835a0a589763180c4a36bc upstream.

The HPFS filesystem used generic_show_options to produce string that is
displayed in /proc/mounts.  However, there is a problem that the options
may disappear after remount.  If we mount the filesystem with option1
and then remount it with option2, /proc/mounts should show both option1
and option2, however it only shows option2 because the whole option
string is replaced with replace_mount_options in hpfs_remount_fs.

To fix this bug, implement the hpfs_show_options function that prints
options that are currently selected.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agohpfs: fix remount failure when there are no options changed
Mikulas Patocka [Tue, 24 May 2016 20:47:00 +0000 (22:47 +0200)]
hpfs: fix remount failure when there are no options changed

commit 44d51706b4685f965cd32acde3fe0fcc1e6198e8 upstream.

Commit ce657611baf9 ("hpfs: kstrdup() out of memory handling") checks if
the kstrdup function returns NULL due to out-of-memory condition.

However, if we are remounting a filesystem with no change to
filesystem-specific options, the parameter data is NULL.  In this case,
kstrdup returns NULL (because it was passed NULL parameter), although no
out of memory condition exists.  The mount syscall then fails with
ENOMEM.

This patch fixes the bug.  We fail with ENOMEM only if data is non-NULL.

The patch also changes the call to replace_mount_options - if we didn't
pass any filesystem-specific options, we don't call
replace_mount_options (thus we don't erase existing reported options).

Fixes: ce657611baf9 ("hpfs: kstrdup() out of memory handling")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoUBI: Fix static volume checks when Fastmap is used
Richard Weinberger [Tue, 26 Apr 2016 14:39:48 +0000 (16:39 +0200)]
UBI: Fix static volume checks when Fastmap is used

commit 1900149c835ab5b48bea31a823ea5e5a401fb560 upstream.

Ezequiel reported that he's facing UBI going into read-only
mode after power cut. It turned out that this behavior happens
only when updating a static volume is interrupted and Fastmap is
used.

A possible trace can look like:
ubi0 warning: ubi_io_read_vid_hdr [ubi]: no VID header found at PEB 2323, only 0xFF bytes
ubi0 warning: ubi_eba_read_leb [ubi]: switch to read-only mode
CPU: 0 PID: 833 Comm: ubiupdatevol Not tainted 4.6.0-rc2-ARCH #4
Hardware name: SAMSUNG ELECTRONICS CO., LTD. 300E4C/300E5C/300E7C/NP300E5C-AD8AR, BIOS P04RAP 10/15/2012
0000000000000286 00000000eba949bd ffff8800c45a7b38 ffffffff8140d841
ffff8801964be000 ffff88018eaa4800 ffff8800c45a7bb8 ffffffffa003abf6
ffffffff850e2ac0 8000000000000163 ffff8801850e2ac0 ffff8801850e2ac0
Call Trace:
[<ffffffff8140d841>] dump_stack+0x63/0x82
[<ffffffffa003abf6>] ubi_eba_read_leb+0x486/0x4a0 [ubi]
[<ffffffffa00453b3>] ubi_check_volume+0x83/0xf0 [ubi]
[<ffffffffa0039d97>] ubi_open_volume+0x177/0x350 [ubi]
[<ffffffffa00375d8>] vol_cdev_open+0x58/0xb0 [ubi]
[<ffffffff8124b08e>] chrdev_open+0xae/0x1d0
[<ffffffff81243bcf>] do_dentry_open+0x1ff/0x300
[<ffffffff8124afe0>] ? cdev_put+0x30/0x30
[<ffffffff81244d36>] vfs_open+0x56/0x60
[<ffffffff812545f4>] path_openat+0x4f4/0x1190
[<ffffffff81256621>] do_filp_open+0x91/0x100
[<ffffffff81263547>] ? __alloc_fd+0xc7/0x190
[<ffffffff812450df>] do_sys_open+0x13f/0x210
[<ffffffff812451ce>] SyS_open+0x1e/0x20
[<ffffffff81a99e32>] entry_SYSCALL_64_fastpath+0x1a/0xa4

UBI checks static volumes for data consistency and reads the
whole volume upon first open. If the volume is found erroneous
users of UBI cannot read from it, but another volume update is
possible to fix it. The check is performed by running
ubi_eba_read_leb() on every allocated LEB of the volume.
For static volumes ubi_eba_read_leb() computes the checksum of all
data stored in a LEB. To verify the computed checksum it has to read
the LEB's volume header which stores the original checksum.
If the volume header is not found UBI treats this as fatal internal
error and switches to RO mode. If the UBI device was attached via a
full scan the assumption is correct, the volume header has to be
present as it had to be there while scanning to get known as mapped.
If the attach operation happened via Fastmap the assumption is no
longer correct. When attaching via Fastmap UBI learns the mapping
table from Fastmap's snapshot of the system state and not via a full
scan. It can happen that a LEB got unmapped after a Fastmap was
written to the flash. Then UBI can learn the LEB still as mapped and
accessing it returns only 0xFF bytes. As UBI is not a FTL it is
allowed to have mappings to empty PEBs, it assumes that the layer
above takes care of LEB accounting and referencing.
UBIFS does so using the LEB property tree (LPT).
For static volumes UBI blindly assumes that all LEBs are present and
therefore special actions have to be taken.

The described situation can happen when updating a static volume is
interrupted, either by a user or a power cut.
The volume update code first unmaps all LEBs of a volume and then
writes LEB by LEB. If the sequence of operations is interrupted UBI
detects this either by the absence of LEBs, no volume header present
at scan time, or corrupted payload, detected via checksum.
In the Fastmap case the former method won't trigger as no scan
happened and UBI automatically thinks all LEBs are present.
Only by reading data from a LEB it detects that the volume header is
missing and incorrectly treats this as fatal error.
To deal with the situation ubi_eba_read_leb() from now on checks
whether we attached via Fastmap and handles the absence of a
volume header like a data corruption error.
This way interrupted static volume updates will correctly get detected
also when Fastmap is used.

Reported-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoSIGNAL: Move generic copy_siginfo() to signal.h
James Hogan [Mon, 8 Feb 2016 18:43:50 +0000 (18:43 +0000)]
SIGNAL: Move generic copy_siginfo() to signal.h

commit ca9eb49aa9562eaadf3cea071ec7018ad6800425 upstream.

The generic copy_siginfo() is currently defined in
asm-generic/siginfo.h, after including uapi/asm-generic/siginfo.h which
defines the generic struct siginfo. However this makes it awkward for an
architecture to use it if it has to define its own struct siginfo (e.g.
MIPS and potentially IA64), since it means that asm-generic/siginfo.h
can only be included after defining the arch-specific siginfo, which may
be problematic if the arch-specific definition needs definitions from
uapi/asm-generic/siginfo.h.

It is possible to work around this by first including
uapi/asm-generic/siginfo.h to get the constants before defining the
arch-specific siginfo, and include asm-generic/siginfo.h after. However
uapi headers can't be included by other uapi headers, so that first
include has to be in an ifdef __kernel__, with the non __kernel__ case
including the non-UAPI header instead.

Instead of that mess, move the generic copy_siginfo() definition into
linux/signal.h, which allows an arch-specific uapi/asm/siginfo.h to
include asm-generic/siginfo.h and define the arch-specific siginfo, and
for the generic copy_siginfo() to see that arch-specific definition.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Petr Malat <oss@malat.biz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Christopher Ferris <cferris@google.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12478/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agothunderbolt: Fix double free of drom buffer
Andreas Noever [Sun, 10 Apr 2016 10:48:27 +0000 (12:48 +0200)]
thunderbolt: Fix double free of drom buffer

commit 2ffa9a5d76a75abbc1f95c17959fced666095bdd upstream.

If tb_drom_read() fails, sw->drom is freed but not set to NULL.  sw->drom
is then freed again in the error path of tb_switch_alloc().

The bug can be triggered by unplugging a thunderbolt device shortly after
it is detected by the thunderbolt driver.

Clear sw->drom if tb_drom_read() fails.

[bhelgaas: add Fixes:, stable versions of interest]
Fixes: 343fcb8c70d7 ("thunderbolt: Fix nontrivial endpoint devices.")
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoIB/srp: Fix a debug kernel crash
Bart Van Assche [Tue, 12 Apr 2016 21:39:18 +0000 (14:39 -0700)]
IB/srp: Fix a debug kernel crash

commit 54f5c9c52d69afa55abf2b034df8d45f588466c3 upstream.

Avoid that the following BUG() is triggered against a debug
kernel:

kernel BUG at include/linux/scatterlist.h:92!
RIP: 0010:[<ffffffffa0467199>]  [<ffffffffa0467199>] srp_map_idb+0x199/0x1a0 [ib_srp]
Call Trace:
 [<ffffffffa04685fa>] srp_map_data+0x84a/0x890 [ib_srp]
 [<ffffffffa0469674>] srp_queuecommand+0x1e4/0x610 [ib_srp]
 [<ffffffff813f5a5e>] scsi_dispatch_cmd+0x9e/0x180
 [<ffffffff813f8b07>] scsi_request_fn+0x477/0x610
 [<ffffffff81298ffe>] __blk_run_queue+0x2e/0x40
 [<ffffffff81299070>] blk_delay_work+0x20/0x30
 [<ffffffff81071f07>] process_one_work+0x197/0x480
 [<ffffffff81072239>] worker_thread+0x49/0x490
 [<ffffffff810787ea>] kthread+0xea/0x100
 [<ffffffff8159b632>] ret_from_fork+0x22/0x40

Fixes: f7f7aab1a5c0 ("IB/srp: Convert to new registration API")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoALSA: hda - Fix headset mic detection problem for one Dell machine
Hui Wang [Wed, 25 May 2016 04:12:32 +0000 (12:12 +0800)]
ALSA: hda - Fix headset mic detection problem for one Dell machine

commit 86c72d1ce91d804e4fa8d90b316a89597dd220f1 upstream.

Add the pin configuration value of this machine into the pin_quirk
table to make DELL1_MIC_NO_PRESENCE apply to this machine.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoALSA: hda/realtek - Add support for ALC295/ALC3254
Kailang Yang [Tue, 24 May 2016 08:46:07 +0000 (16:46 +0800)]
ALSA: hda/realtek - Add support for ALC295/ALC3254

commit 7d727869c7b86da0874436ac5675dcdadaf3a0a1 upstream.

Add support for ALC295/ALC3254.
They are simply compatible with ALC225 chip.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoALSA: hda - Fix headphone noise on Dell XPS 13 9360
Kai-Heng Feng [Fri, 20 May 2016 07:47:23 +0000 (15:47 +0800)]
ALSA: hda - Fix headphone noise on Dell XPS 13 9360

commit 423cd785619ac6778252fbdb916505aa1c153959 upstream.

The headphone has noise when playing sound or switching microphone sources.
It uses the same codec on XPS 13 9350, but with different subsystem ID.
Applying the fixup can solve the issue.
Also, changing the model name to better differentiate models.

v2: Reorder by device ID.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoALSA: hda/realtek - New codecs support for ALC234/ALC274/ALC294
Kailang Yang [Wed, 4 May 2016 07:50:18 +0000 (15:50 +0800)]
ALSA: hda/realtek - New codecs support for ALC234/ALC274/ALC294

commit dcd4f0db6141d6bf2cb897309d5d6f53d1b1696f upstream.

Support new codecs for ALC234/ALC274/ALC294.
This three codecs was the same IC.
But bonding is not the same.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agomcb: Fixed bar number assignment for the gdd
Andreas Werner [Tue, 3 May 2016 10:42:00 +0000 (12:42 +0200)]
mcb: Fixed bar number assignment for the gdd

commit f75564d343010b025301d9548f2304f48eb25f01 upstream.

The bar number is found in reg2 within the gdd. Therefore
we need to change the assigment from reg1 to reg2 which
is the correct location.

Signed-off-by: Andreas Werner <andreas.werner@men.de>
Fixes: '3764e82e5' drivers: Introduce MEN Chameleon Bus
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoclk: bcm2835: add locking to pll*_on/off methods
Martin Sperl [Mon, 29 Feb 2016 11:39:18 +0000 (11:39 +0000)]
clk: bcm2835: add locking to pll*_on/off methods

commit ec36a5c6682fdd5328abf15c3c67281bed0241d7 upstream.

Add missing locking to:
* bcm2835_pll_divider_on
* bcm2835_pll_divider_off
to protect the read modify write cycle for the
register access protecting both cm_reg and a2w_reg
registers.

Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the
audio domain clocks")

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolocking,qspinlock: Fix spin_is_locked() and spin_unlock_wait()
Peter Zijlstra [Fri, 20 May 2016 16:04:36 +0000 (18:04 +0200)]
locking,qspinlock: Fix spin_is_locked() and spin_unlock_wait()

commit 54cf809b9512be95f53ed4a5e3b631d1ac42f0fa upstream.

Similar to commits:

  51d7d5205d33 ("powerpc: Add smp_mb() to arch_spin_is_locked()")
  d86b8da04dfa ("arm64: spinlock: serialise spin_unlock_wait against concurrent lockers")

qspinlock suffers from the fact that the _Q_LOCKED_VAL store is
unordered inside the ACQUIRE of the lock.

And while this is not a problem for the regular mutual exclusive
critical section usage of spinlocks, it breaks creative locking like:

spin_lock(A) spin_lock(B)
spin_unlock_wait(B) if (!spin_is_locked(A))
do_something()   do_something()

In that both CPUs can end up running do_something at the same time,
because our _Q_LOCKED_VAL store can drop past the spin_unlock_wait()
spin_is_locked() loads (even on x86!!).

To avoid making the normal case slower, add smp_mb()s to the less used
spin_unlock_wait() / spin_is_locked() side of things to avoid this
problem.

Reported-and-tested-by: Davidlohr Bueso <dave@stgolabs.net>
Reported-by: Giovanni Gherdovich <ggherdovich@suse.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoserial: samsung: Reorder the sequence of clock control when call s3c24xx_serial_set_t...
Chanwoo Choi [Thu, 21 Apr 2016 09:58:31 +0000 (18:58 +0900)]
serial: samsung: Reorder the sequence of clock control when call s3c24xx_serial_set_termios()

commit b8995f527aac143e83d3900ff39357651ea4e0f6 upstream.

This patch fixes the broken serial log when changing the clock source
of uart device. Before disabling the original clock source, this patch
enables the new clock source to protect the clock off state for a split second.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
8 years agoserial: 8250_mid: recognize interrupt source in handler
Andy Shevchenko [Mon, 4 Apr 2016 14:35:10 +0000 (17:35 +0300)]
serial: 8250_mid: recognize interrupt source in handler

commit c42850f1ae7e70056f852e67bb9dddf927853b47 upstream.

There is a special register that shows interrupt status by source. In
particular case the source can be a combination of DMA Tx, DMA Rx, and UART.

Read the register and call the handlers only for sources that request an
interrupt.

Fixes: 6ede6dcd87aa ("serial: 8250_mid: add support for DMA engine handling from UART MMIO")
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoserial: 8250_mid: use proper bar for DNV platform
Andy Shevchenko [Mon, 4 Apr 2016 14:35:09 +0000 (17:35 +0300)]
serial: 8250_mid: use proper bar for DNV platform

commit 107e15fc1f8d6ef69eac5f175971252f76e82f0d upstream.

Unlike Intel Medfield and Tangier platforms DNV uses PCI BAR0 for IO compatible
resources and BAR1 for MMIO. We need latter in a way to support DMA. Introduce
an additional field in the internal structure and pass PCI BAR based on device
ID.

Reported-by: "Lai, Poey Seng" <poey.seng.lai@intel.com>
Fixes: 6ede6dcd87aa ("serial: 8250_mid: add support for DMA engine handling from UART MMIO")
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoserial: 8250_pci: fix divide error bug if baud rate is 0
David Müller [Wed, 27 Apr 2016 09:58:32 +0000 (11:58 +0200)]
serial: 8250_pci: fix divide error bug if baud rate is 0

commit 6f210c18c1c0f016772c8cd51ae12a02bfb9e7ef upstream.

Since commit 21947ba654a6 ("serial: 8250_pci: replace switch-case by
formula"), the 8250 driver crashes in the byt_set_termios() function
with a divide error. This is caused by the fact that a baud rate of 0 (B0)
is not handled properly. Fix it by falling back to B9600 in this case.

Signed-off-by: David Müller <d.mueller@elsoft.ch>
Fixes: 21947ba654a6 ("serial: 8250_pci: replace switch-case by formula")
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoFix OpenSSH pty regression on close
Brian Bloniarz [Sun, 6 Mar 2016 21:16:30 +0000 (13:16 -0800)]
Fix OpenSSH pty regression on close

commit 0f40fbbcc34e093255a2b2d70b6b0fb48c3f39aa upstream.

OpenSSH expects the (non-blocking) read() of pty master to return
EAGAIN only if it has received all of the slave-side output after
it has received SIGCHLD. This used to work on pre-3.12 kernels.

This fix effectively forces non-blocking read() and poll() to
block for parallel i/o to complete for all ttys. It also unwinds
these changes:

1) f8747d4a466ab2cafe56112c51b3379f9fdb7a12
   tty: Fix pty master read() after slave closes

2) 52bce7f8d4fc633c9a9d0646eef58ba6ae9a3b73
   pty, n_tty: Simplify input processing on final close

3) 1a48632ffed61352a7810ce089dc5a8bcd505a60
   pty: Fix input race when closing

Inspired by analysis and patch from Marc Aurele La France <tsi@tuyoix.net>

Reported-by: Volth <openssh@volth.com>
Reported-by: Marc Aurele La France <tsi@tuyoix.net>
BugLink: https://bugzilla.mindrot.org/show_bug.cgi?id=52
BugLink: https://bugzilla.mindrot.org/show_bug.cgi?id=2492
Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agotty/serial: atmel: fix hardware handshake selection
Alexandre Belloni [Tue, 12 Apr 2016 12:51:40 +0000 (14:51 +0200)]
tty/serial: atmel: fix hardware handshake selection

commit 5be605ac9af979265d7b64c160ad9928088a78be upstream.

Commit 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management when
hardware handshake is enabled") actually allowed to enable hardware
handshaking.
Before, the CRTSCTS flags was silently ignored.

As the DMA controller can't drive RTS (as explain in the commit message).
Ensure that hardware flow control stays disabled when DMA is used and FIFOs
are not available.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Fixes: 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management when hardware handshake is enabled")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoTTY: n_gsm, fix false positive WARN_ON
Jiri Slaby [Tue, 22 Mar 2016 17:09:51 +0000 (18:09 +0100)]
TTY: n_gsm, fix false positive WARN_ON

commit d175feca89a1c162f60f4e3560ca7bc9437c65eb upstream.

Dmitry reported, that the current cleanup code in n_gsm can trigger a
warning:
WARNING: CPU: 2 PID: 24238 at drivers/tty/n_gsm.c:2048 gsm_cleanup_mux+0x166/0x6b0()
...
Call Trace:
...
 [<ffffffff81247ab9>] warn_slowpath_null+0x29/0x30 kernel/panic.c:490
 [<ffffffff828d0456>] gsm_cleanup_mux+0x166/0x6b0 drivers/tty/n_gsm.c:2048
 [<ffffffff828d4d87>] gsmld_open+0x5b7/0x7a0 drivers/tty/n_gsm.c:2386
 [<ffffffff828b9078>] tty_ldisc_open.isra.2+0x78/0xd0 drivers/tty/tty_ldisc.c:447
 [<ffffffff828b973a>] tty_set_ldisc+0x1ca/0xa70 drivers/tty/tty_ldisc.c:567
 [<     inline     >] tiocsetd drivers/tty/tty_io.c:2650
 [<ffffffff828a14ea>] tty_ioctl+0xb2a/0x2140 drivers/tty/tty_io.c:2883
...

But this is a legal path when open fails to find a space in the
gsm_mux array and tries to clean up. So make it a standard test
instead of a warning.

Reported-by: "Dmitry Vyukov" <dvyukov@google.com>
Cc: Alan Cox <alan@linux.intel.com>
Link: http://lkml.kernel.org/r/CACT4Y+bHQbAB68VFi7Romcs-Z9ZW3kQRvcq+BvHH1oa5NcAdLA@mail.gmail.com
Fixes: 5a640967 ("tty/n_gsm.c: fix a memory leak in gsmld_open()")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agotty: vt, return error when con_startup fails
Jiri Slaby [Tue, 3 May 2016 15:05:54 +0000 (17:05 +0200)]
tty: vt, return error when con_startup fails

commit 6798df4c5fe0a7e6d2065cf79649a794e5ba7114 upstream.

When csw->con_startup() fails in do_register_con_driver, we return no
error (i.e. 0). This was changed back in 2006 by commit 3e795de763.
Before that we used to return -ENODEV.

So fix the return value to be -ENODEV in that case again.

Fixes: 3e795de763 ("VT binding: Add binding/unbinding support for the VT console")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: "Dan Carpenter" <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoxen/x86: actually allocate legacy interrupts on PV guests
Stefano Stabellini [Wed, 20 Apr 2016 13:15:01 +0000 (14:15 +0100)]
xen/x86: actually allocate legacy interrupts on PV guests

commit 702f926067d2a4b28c10a3c41a1172dd62d9e735 upstream.

b4ff8389ed14 is incomplete: relies on nr_legacy_irqs() to get the number
of legacy interrupts when actually nr_legacy_irqs() returns 0 after
probe_8259A(). Use NR_IRQS_LEGACY instead.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoKVM: x86: mask CPUID(0xD,0x1).EAX against host value
Paolo Bonzini [Mon, 21 Mar 2016 11:33:00 +0000 (12:33 +0100)]
KVM: x86: mask CPUID(0xD,0x1).EAX against host value

commit 316314cae15fb0e3869b76b468f59a0c83ac3d4e upstream.

This ensures that the guest doesn't see XSAVE extensions
(e.g. xgetbv1 or xsavec) that the host lacks.

Cc: stable@vger.kernel.org
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
[4.5 does have CPUID_D_1_EAX, but earlier kernels don't, so use
 the numeric value.  This is consistent with other occurrences
 of cpuid_mask in arch/x86/kvm/cpuid.c - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMIPS: KVM: Fix timer IRQ race when writing CP0_Compare
James Hogan [Fri, 22 Apr 2016 09:38:46 +0000 (10:38 +0100)]
MIPS: KVM: Fix timer IRQ race when writing CP0_Compare

commit b45bacd2d048f405c7760e5cc9b60dd67708734f upstream.

Writing CP0_Compare clears the timer interrupt pending bit
(CP0_Cause.TI), but this wasn't being done atomically. If a timer
interrupt raced with the write of the guest CP0_Compare, the timer
interrupt could end up being pending even though the new CP0_Compare is
nowhere near CP0_Count.

We were already updating the hrtimer expiry with
kvm_mips_update_hrtimer(), which used both kvm_mips_freeze_hrtimer() and
kvm_mips_resume_hrtimer(). Close the race window by expanding out
kvm_mips_update_hrtimer(), and clearing CP0_Cause.TI and setting
CP0_Compare between the freeze and resume. Since the pending timer
interrupt should not be cleared when CP0_Compare is written via the KVM
user API, an ack argument is added to distinguish the source of the
write.

Fixes: e30492bbe95a ("MIPS: KVM: Rewrite count/compare timer emulation")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim KrÄ\8dmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMIPS: KVM: Fix timer IRQ race when freezing timer
James Hogan [Fri, 22 Apr 2016 09:38:45 +0000 (10:38 +0100)]
MIPS: KVM: Fix timer IRQ race when freezing timer

commit 4355c44f063d3de4f072d796604c7f4ba4085cc3 upstream.

There's a particularly narrow and subtle race condition when the
software emulated guest timer is frozen which can allow a guest timer
interrupt to be missed.

This happens due to the hrtimer expiry being inexact, so very
occasionally the freeze time will be after the moment when the emulated
CP0_Count transitions to the same value as CP0_Compare (so an IRQ should
be generated), but before the moment when the hrtimer is due to expire
(so no IRQ is generated). The IRQ won't be generated when the timer is
resumed either, since the resume CP0_Count will already match CP0_Compare.

With VZ guests in particular this is far more likely to happen, since
the soft timer may be frozen frequently in order to restore the timer
state to the hardware guest timer. This happens after 5-10 hours of
guest soak testing, resulting in an overflow in guest kernel timekeeping
calculations, hanging the guest. A more focussed test case to
intentionally hit the race (with the help of a new hypcall to cause the
timer state to migrated between hardware & software) hits the condition
fairly reliably within around 30 seconds.

Instead of relying purely on the inexact hrtimer expiry to determine
whether an IRQ should be generated, read the guest CP0_Compare and
directly check whether the freeze time is before or after it. Only if
CP0_Count is on or after CP0_Compare do we check the hrtimer expiry to
determine whether the last IRQ has already been generated (which will
have pushed back the expiry by one timer period).

Fixes: e30492bbe95a ("MIPS: KVM: Rewrite count/compare timer emulation")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim KrÄ\8dmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoKVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset
Bruce Rogers [Thu, 28 Apr 2016 20:49:21 +0000 (14:49 -0600)]
KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

commit f24632475d4ffed5626abbfab7ef30a128dd1474 upstream.

Commit d28bc9dd25ce reversed the order of two lines which initialize cr0,
allowing the current (old) cr0 value to mess up vcpu initialization.
This was observed in the checks for cr0 X86_CR0_WP bit in the context of
kvm_mmu_reset_context(). Besides, setting vcpu->arch.cr0 after vmx_set_cr0()
is completely redundant. Change the order back to ensure proper vcpu
initialization.

The combination of booting with ovmf firmware when guest vcpus > 1 and kvm's
ept=N option being set results in a VM-entry failure. This patch fixes that.

Fixes: d28bc9dd25ce ("KVM: x86: INIT and reset sequences are different")
Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoKVM: MTRR: remove MSR 0x2f8
Andy Honig [Tue, 17 May 2016 15:41:47 +0000 (17:41 +0200)]
KVM: MTRR: remove MSR 0x2f8

commit 9842df62004f366b9fed2423e24df10542ee0dc5 upstream.

MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support
was introduced by 9ba075a664df ("KVM: MTRR support").

0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the
size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8,
which made access to index 124 out of bounds.  The surrounding code only
WARNs in this situation, thus the guest gained a limited read/write
access to struct kvm_arch_vcpu.

0x2f8 is not a valid VR MTRR MSR, because KVM has/advertises only 16 VR
MTRR MSRs, 0x200-0x20f.  Every VR MTRR is set up using two MSRs, 0x2f8
was treated as a PHYSBASE and 0x2f9 would be its PHYSMASK, but 0x2f9 was
not implemented in KVM, therefore 0x2f8 could never do anything useful
and getting rid of it is safe.

This fixes CVE-2016-3713.

Fixes: 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs")
Reported-by: David Matlack <dmatlack@google.com>
Signed-off-by: Andy Honig <ahonig@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: das1800: fix possible NULL dereference
H Hartley Sweeten [Fri, 8 Apr 2016 17:14:58 +0000 (10:14 -0700)]
staging: comedi: das1800: fix possible NULL dereference

commit d375278d666760e195693b57415ba0a125cadd55 upstream.

DMA is optional with this driver. If it was not enabled the devpriv->dma
pointer will be NULL.

Fix the possible NULL pointer dereference when trying to disable the DMA
channels in das1800_ai_cancel() and tidy up the comments to fix the
checkpatch.pl issues:
WARNING: line over 80 characters

It's probably harmless in das1800_ai_setup_dma() because the 'desc' pointer
will not be used if DMA is disabled but fix it there also.

Fixes: 99dfc3357e98 ("staging: comedi: das1800: remove depends on ISA_DMA_API limitation")
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agousb: gadget: udc: core: Fix argument of dev_err() in usb_gadget_map_request()
Yoshihiro Shimoda [Mon, 18 Apr 2016 07:53:38 +0000 (16:53 +0900)]
usb: gadget: udc: core: Fix argument of dev_err() in usb_gadget_map_request()

commit 5096c4d3bfa75bdd23c78f799aabd08598afb48f upstream.

The argument of dev_err() in usb_gadget_map_request() should be dev
instead of &gadget->dev.

Fixes: 7ace8fc ("usb: gadget: udc: core: Fix argument of dma_map_single for IOMMU")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoUSB: leave LPM alone if possible when binding/unbinding interface drivers
Alan Stern [Fri, 29 Apr 2016 19:25:17 +0000 (15:25 -0400)]
USB: leave LPM alone if possible when binding/unbinding interface drivers

commit 6fb650d43da3e7054984dc548eaa88765a94d49f upstream.

When a USB driver is bound to an interface (either through probing or
by claiming it) or is unbound from an interface, the USB core always
disables Link Power Management during the transition and then
re-enables it afterward.  The reason is because the driver might want
to prevent hub-initiated link power transitions, in which case the HCD
would have to recalculate the various LPM parameters.  This
recalculation takes place when LPM is re-enabled and the new
parameters are sent to the device and its parent hub.

However, if the driver does not want to prevent hub-initiated link
power transitions then none of this work is necessary.  The parameters
don't need to be recalculated, and LPM doesn't need to be disabled and
re-enabled.

It turns out that disabling and enabling LPM can be time-consuming,
enough so that it interferes with user programs that want to claim and
release interfaces rapidly via usbfs.  Since the usbfs kernel driver
doesn't set the disable_hub_initiated_lpm flag, we can speed things up
and get the user programs to work by leaving LPM alone whenever the
flag isn't set.

And while we're improving the way disable_hub_initiated_lpm gets used,
let's also fix its kerneldoc.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Matthew Giassa <matthew@giassa.net>
CC: Mathias Nyman <mathias.nyman@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agousb: misc: usbtest: fix pattern tests for scatterlists.
Mathias Nyman [Mon, 2 May 2016 08:39:03 +0000 (11:39 +0300)]
usb: misc: usbtest: fix pattern tests for scatterlists.

commit cdc77c82a8286b1181b81b6e5ef60c8e83ded7bc upstream.

The current implemenentation restart the sent pattern for each entry in
the sg list. The receiving end expects a continuous pattern, and test
will fail unless scatterilst entries happen to be aligned with the
pattern

Fix this by calculating the pattern byte based on total sent size
instead of just the current sg entry.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Fixes: 8b5249019352 ("[PATCH] USB: usbtest: scatterlist OUT data pattern testing")
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agousb: f_mass_storage: test whether thread is running before starting another
Michal Nazarewicz [Fri, 8 Apr 2016 08:24:11 +0000 (10:24 +0200)]
usb: f_mass_storage: test whether thread is running before starting another

commit f78bbcae86e676fad9e6c6bb6cd9d9868ba23696 upstream.

When binding the function to usb_configuration, check whether the thread
is running before starting another one.  Without that, when function
instance is added to multiple configurations, fsg_bing starts multiple
threads with all but the latest one being forgotten by the driver.  This
leads to obvious thread leaks, possible lockups when trying to halt the
machine and possible more issues.

This fixes issues with legacy/multi¹ gadget as well as configfs gadgets
when mass_storage function is added to multiple configurations.

This change also simplifies API since the legacy gadgets no longer need
to worry about starting the thread by themselves (which was where bug
in legacy/multi was in the first place).

N.B., this patch doesn’t address adding single mass_storage function
instance to a single configuration twice.  Thankfully, there’s no
legitimate reason for such setup plus, if I’m not mistaken, configfs
gadget doesn’t even allow it to be expressed.

¹ I have no example failure though.  Conclusion that legacy/multi has
  a bug is based purely on me reading the code.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>