OSDN Git Service
E V Ravi [Tue, 18 Dec 2018 08:29:19 +0000 (13:59 +0530)]
msm: ais: Update request from kernel to lk
Updating early shutdown request from kernel to lk
Change-Id: I398e278c683340dbe501f78e0f2aa902c9cdf606
Signed-off-by: E V Ravi <evenka@codeaurora.org>
Linux Build Service Account [Sat, 15 Dec 2018 01:11:11 +0000 (17:11 -0800)]
Merge "ASoC: sdm660: Update VI sense sample rate to 8k" into msm-4.4
Linux Build Service Account [Sat, 15 Dec 2018 01:35:59 +0000 (17:35 -0800)]
Merge "ASoC: msm_sdw: Update VI sense sample rate to 8k"
Soumya Managoli [Fri, 14 Dec 2018 07:07:44 +0000 (12:37 +0530)]
ASoC: sdm660: Update VI sense sample rate to 8k
SR was changed from 8kHz to 48kHz due to capturing
of garbled VI sense data as per HW team suggestion.
With new speaker protection algo in dsp, 8kHz is
expected and earlier issue with 8kHz is not seen.
Reverting the SR change back to 8kHz.
CRs-Fixed:
2364486
Change-Id: I379a080eb17e7a82fe87608f89dcbfa5444e8916
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
Laxminath Kasam [Thu, 6 Dec 2018 07:24:57 +0000 (12:54 +0530)]
ASoC: msm_sdw: Update VI sense sample rate to 8k
SR was changed from 8kHz to 48kHz due to capturing
of garbled VI sense data as per HW team suggestion.
With new speaker protection algo in dsp, 8kHz is
expected and earlier issue with 8kHz is not seen.
Reverting the SR change back to 8kHz.
CRs-Fixed:
2364486
Change-Id: I29947f87f182fc1de7a7002fcee0899b0f622103
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Linux Build Service Account [Fri, 14 Dec 2018 03:17:34 +0000 (19:17 -0800)]
Merge "msm: adsprpc: allocate all remote memory in kernel"
Linux Build Service Account [Thu, 13 Dec 2018 21:04:00 +0000 (13:04 -0800)]
Merge "memshare: Conditional free the clients allotted memory"
Linux Build Service Account [Thu, 13 Dec 2018 21:03:59 +0000 (13:03 -0800)]
Merge "msm: ais: Update early camera with new apis"
Linux Build Service Account [Thu, 13 Dec 2018 21:03:58 +0000 (13:03 -0800)]
Merge "ARM: dts: msm: Add Tert Mi2s Group node for msm8996"
Linux Build Service Account [Thu, 13 Dec 2018 21:03:57 +0000 (13:03 -0800)]
Merge "msm: ASoC: enable aptX HD decoder"
Linux Build Service Account [Thu, 13 Dec 2018 13:14:14 +0000 (05:14 -0800)]
Merge "drm: msm: sde: update blob property after splash is done"
Linux Build Service Account [Thu, 13 Dec 2018 13:14:13 +0000 (05:14 -0800)]
Merge "drm/msm/sde: Reserve one more layer for early DRM"
Manoj Prabhu B [Thu, 6 Dec 2018 08:55:01 +0000 (14:25 +0530)]
memshare: Conditional free the clients allotted memory
The patch adds an additional check to not free the clients memory
if the client has a designated property of allocate-on-request.
Change-Id: Iecf5886034ccd052ab82fff18cc66f1868604284
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Cong Tang [Tue, 27 Nov 2018 10:02:49 +0000 (18:02 +0800)]
ARM: dts: msm: Add Tert Mi2s Group node for msm8996
Support tertiary mi2s group device feature for msm8996.
Change-Id: Ifb0cf8fae13961bef6938cc6f99ecbd5740b2985
Signed-off-by: Cong Tang <congt@codeaurora.org>
E V Ravi [Fri, 16 Nov 2018 18:24:27 +0000 (23:54 +0530)]
msm: ais: Update early camera with new apis
Early domain core driver provides apis to communicate
with LK instead of using scratch registers
Change-Id: If312307d0b2eec7a40faf8575a7ad12451408c7c
Signed-off-by: E V Ravi <evenka@codeaurora.org>
Han Lu [Thu, 1 Nov 2018 08:26:37 +0000 (16:26 +0800)]
msm: ASoC: enable aptX HD decoder
Enable decoder for media format aptX HD
Change-Id: I5892dcdcf233f2c8c79b4f2c08d2d9014e05ed26
Signed-off-by: Han Lu <hanlu@codeaurora.org>
Linux Build Service Account [Wed, 12 Dec 2018 15:08:37 +0000 (07:08 -0800)]
Merge "ARM: dts: msm: Add initial dts support for SDM455 RCM devices"
Tharun Kumar Merugu [Wed, 22 Aug 2018 23:30:05 +0000 (05:00 +0530)]
msm: adsprpc: allocate all remote memory in kernel
Allocate all memory given to remote subsystem in the kernel
instead of mapping memory allocated in userspace.
Change-Id: I79c1f40d426e271403afa67514714fe6af26cf4e
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
Linux Build Service Account [Tue, 11 Dec 2018 15:42:33 +0000 (07:42 -0800)]
Merge "usb: misc: ks_bridge: Add support for 901F PID"
Linux Build Service Account [Tue, 11 Dec 2018 00:45:52 +0000 (16:45 -0800)]
Merge "Merge android-4.4.166 (
4c4bedf) into msm-4.4"
Linux Build Service Account [Tue, 11 Dec 2018 00:45:51 +0000 (16:45 -0800)]
Merge "pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping"
Linux Build Service Account [Tue, 11 Dec 2018 00:45:50 +0000 (16:45 -0800)]
Merge "msm: camera: Fix invalid type conversion"
Anirudh Ghayal [Tue, 22 May 2018 13:40:14 +0000 (19:10 +0530)]
pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping
The SPMI based PMICs have the HIGH and LOW GPIO output
strength mappings interchanged, fix them.
Keep the mapping same for older SSBI based PMICs.
CRs-Fixed:
2246473
Change-Id: I4ec78469c436b54642ee67108943c82fba46e1c4
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Gustavo Solaira [Fri, 7 Dec 2018 21:28:53 +0000 (13:28 -0800)]
usb: misc: ks_bridge: Add support for 901F PID
Add support for creation of misc device in case
the connected device has 0x05C6 VID and 0x901F PID.
Change-Id: I594b579affe9382138def16e6d82ddc55ae93ec7
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
Gustavo Solaira [Fri, 7 Dec 2018 21:15:10 +0000 (13:15 -0800)]
usb: misc: diag_ipc_bridge: Add support for 0x901F PID
Add support for creation of diag traffic channel in case
the connected device has 0x05C6 VID and 0x901F PID.
Change-Id: I460c0b1e54e88e336081b0ea87cc6342628ec516
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
Linux Build Service Account [Fri, 7 Dec 2018 09:44:03 +0000 (01:44 -0800)]
Merge "msm: wlan: Update regulatory database to sheet ver.27"
Linux Build Service Account [Fri, 7 Dec 2018 02:46:15 +0000 (18:46 -0800)]
Merge "defconfig: msm: Enable earlydomain handoff support"
Linux Build Service Account [Thu, 6 Dec 2018 14:33:28 +0000 (06:33 -0800)]
Merge "drm/msm/sde: sanitize debugfs inputs when reading mdp memory"
Linux Build Service Account [Thu, 6 Dec 2018 14:33:27 +0000 (06:33 -0800)]
Merge "diag: Mark Buffer as NULL after freeing"
Linux Build Service Account [Thu, 6 Dec 2018 14:33:26 +0000 (06:33 -0800)]
Merge "defconfig: msm: arm64: remove USELIB configuration"
Vivek Kumar [Thu, 8 Nov 2018 08:17:28 +0000 (13:47 +0530)]
defconfig: msm: Enable earlydomain handoff support
Enable earlydomain handoff support for msm8996
auto.
Change-Id: If18f1152cd8f008cc5ef68c89680dbd37674a2d1
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
Vivek Kumar [Mon, 19 Nov 2018 07:45:06 +0000 (13:15 +0530)]
ARM: dts: msm: Add dt node for earlydomain
Add DT node for early domain driver for
msm8996 and remove reserved memory node
for lk_pool as it will be populated by
bootloader if early domain is enabled.
Change-Id: Idd364e2bfab97af78292b1e6a6e172a7b7c4c3a0
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
Abhishek Abbanaveni [Tue, 20 Nov 2018 09:08:02 +0000 (14:38 +0530)]
msm: camera: Fix invalid type conversion
Invalid type conversion with x64 bit command VIDIOC_MSM_LASER_LED_CFG
passed in,for which the type should be "msm_laser_led_cfg_data_t"
Change-Id: I43e112224c612fb5390fa5fc23e8ae9c0e553288
CRs-Fixed:
2299699
Signed-off-by: Abhishek Abbanaveni <aabban@codeaurora.org>
Signed-off-by: E V Ravi <evenka@codeaurora.org>
Hardik Arya [Fri, 23 Nov 2018 05:11:41 +0000 (10:41 +0530)]
diag: Mark Buffer as NULL after freeing
There is a possibility of use-after-free and
double free because of not marking buffer as
NULL after freeing. The patch marks buffer
as NULL after freeing in error case.
Change-Id: Iacf8f8a4a4e644f48c87d5445ccd594766f2e156
Signed-off-by: Hardik Arya <harya@codeaurora.org>
Linux Build Service Account [Thu, 6 Dec 2018 05:34:56 +0000 (21:34 -0800)]
Merge "soc: swr-wcd: Apply div2 setting on slave side before bank switch"
Venkata Rao Kakani [Tue, 27 Nov 2018 09:53:09 +0000 (15:23 +0530)]
defconfig: msm: arm64: remove USELIB configuration
Remove CONFIG_USELIB configuration to make kernel compliance
with android Vendor test suite.
Change-Id: I7ca9bbff514f318e595d44e56611b4f1fe6e8c65
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
Linux Build Service Account [Wed, 5 Dec 2018 21:57:34 +0000 (13:57 -0800)]
Merge "cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT"
Linux Build Service Account [Wed, 5 Dec 2018 14:01:23 +0000 (06:01 -0800)]
Merge "scm_qcpe: validate hab_recv() return value for retry"
Linux Build Service Account [Wed, 5 Dec 2018 14:01:22 +0000 (06:01 -0800)]
Merge "soc: qcom: glink: Add support to set affinities"
Linux Build Service Account [Wed, 5 Dec 2018 14:01:21 +0000 (06:01 -0800)]
Merge "Bluetooth: Added spinlocks for serial_clock_vote"
Linux Build Service Account [Wed, 5 Dec 2018 14:01:20 +0000 (06:01 -0800)]
Merge "dwc3-msm: Do not resume usb3 phy if max speed is HS only"
Linux Build Service Account [Wed, 5 Dec 2018 14:01:19 +0000 (06:01 -0800)]
Merge "diag: Do not clear masks during logging mode switch"
Linux Build Service Account [Wed, 5 Dec 2018 14:00:44 +0000 (06:00 -0800)]
Merge "defconfig: msm: enable SLUB_DEBUG_ON for gvm"
Youssef Youssef [Wed, 28 Nov 2018 16:25:34 +0000 (18:25 +0200)]
scm_qcpe: validate hab_recv() return value for retry
habmm_socket_recv() can return -EINTR which indicate that
the operation must be restarted.
Change-Id: I0860a9593303c7bf1fea5e0349595c4b2fb085eb
Signed-off-by: Youssef Youssef <yyoussef@codeaurora.org>
Linux Build Service Account [Wed, 5 Dec 2018 07:28:58 +0000 (23:28 -0800)]
Merge "usb: gadget: Fix double free of device descriptor pointers"
Chris Lew [Mon, 2 Oct 2017 22:20:54 +0000 (15:20 -0700)]
soc: qcom: glink: Add support to set affinities
There is a need to pin the interrupts and rx worker thread to a
specific cpu set for power and performance. Add support to define
the cpu set in device tree. This change does not include any hotplug
support.
Change-Id: Ibe651e987e72f5119e9e8453d87fa8059219ec1f
Signed-off-by: Chris Lew <clew@codeaurora.org>
Harish Bandi [Fri, 16 Nov 2018 04:53:57 +0000 (10:23 +0530)]
Bluetooth: Added spinlocks for serial_clock_vote
If we dont lock with spinlock before calling serial_clock_vote
in serial_clock_vote few global parameters may change values,
to avoid the race condition added hci_ibs_lock spinlock before
calling serial_clock_vote
Change-Id: I040d7ef0d998a60a274bf8d89649785db007afa3
Signed-off-by: Harish Bandi <c-hbandi@codeaurora.org>
Will Huang [Tue, 4 Dec 2018 08:12:46 +0000 (16:12 +0800)]
msm: wlan: Update regulatory database to sheet ver.27
Change 5G regdomain to FCC13 of country CL.
Change country CR to all bandwitch support.
Update DFS pattern and regdomain of country IN.
Update max tx power of country JP.
Add regdomain info of country MM.
Remove regdomain of country PS.
Update DFS pattern of country SA to ETSI-302502.
Change-Id: I34c2cc0b4737eaf3ddaa011f796df952b900bef8
CRs-Fixed:
2349775
Signed-off-by: Will Huang <wilhuang@codeaurora.org>
Linux Build Service Account [Tue, 4 Dec 2018 21:39:03 +0000 (13:39 -0800)]
Merge "msm: camera: Fix for OOB security CR"
Linux Build Service Account [Tue, 4 Dec 2018 15:07:22 +0000 (07:07 -0800)]
Merge "ARM: dts: msm: Remove Out-Of-Bound access"
Laxminath Kasam [Tue, 4 Dec 2018 09:55:39 +0000 (15:25 +0530)]
soc: swr-wcd: Apply div2 setting on slave side before bank switch
In soundwire controller, bank switch happen twice
for a playback session with stereo speakers. Ensure
the setting of div2 applied to inactive bank before
bank switch occurs to avoid impact based on bank chosen.
Change-Id: I033b19e78309485ca9da85ec67b54409e6fe22cc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Abhishek Abbanaveni [Tue, 20 Nov 2018 09:27:06 +0000 (14:57 +0530)]
msm: camera: Fix for OOB security CR
If user passes an aribitary command with _IOC_DIR(cmd) == _IOC_NONE,
"arg" should point to any arbitrary address.
Check for invalid command and return error.
Change-Id: If60191a07bb80939af2d471a5acf1b17dd68aa58
CRs-Fixed:
2299567
Signed-off-by: Abhishek Abbanaveni <aabban@codeaurora.org>
Hemant Kumar [Thu, 22 Nov 2018 01:07:20 +0000 (17:07 -0800)]
usb: gadget: Fix double free of device descriptor pointers
Upon driver unbind usb_free_all_descriptors() function frees all
speed descriptor pointers without setting them to NULL. In case
gadget speed changes (i.e from super speed plus to super speed)
after driver unbind only upto super speed descriptor pointers get
populated. Super speed plus desc still holds the stale (already
freed) pointer. As a result next composition switch results into
double free of super speed plus descriptor. Fix this issue by
setting all descriptor pointers to NULL after freeing them in
usb_free_all_descriptors(). Also clean up gsi_unbind() which is
setting up descriptor pointers to NULL already.
Change-Id: I4f28294c165bb3b5dc9feb4f22d819f527ad4d50
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
Linux Build Service Account [Tue, 4 Dec 2018 08:22:03 +0000 (00:22 -0800)]
Merge "drm/msm/hdmi: disable HDR state on bridge disable"
Linux Build Service Account [Tue, 4 Dec 2018 08:22:03 +0000 (00:22 -0800)]
Merge "msm: ipa: Remove assert on ep empty"
Linux Build Service Account [Tue, 4 Dec 2018 08:22:02 +0000 (00:22 -0800)]
Merge "ASoC: msm: handle SSR event"
Linux Build Service Account [Tue, 4 Dec 2018 08:22:01 +0000 (00:22 -0800)]
Merge "defconfig: msm: Enable EHSET driver for 8996 GVM platform"
Linux Build Service Account [Tue, 4 Dec 2018 08:22:00 +0000 (00:22 -0800)]
Merge "dwc3-msm: Allow USB LPM with data role swap from dfp to ufp"
Linux Build Service Account [Tue, 4 Dec 2018 08:21:58 +0000 (00:21 -0800)]
Merge "ARM: dts: msm: Add csi1 settings for early camera"
Linux Build Service Account [Tue, 4 Dec 2018 08:21:58 +0000 (00:21 -0800)]
Merge "msm: ais: Move wait for early camera handoff"
Linux Build Service Account [Tue, 4 Dec 2018 08:21:55 +0000 (00:21 -0800)]
Merge "Merge android-4.4.165 (
f34ff9e) into msm-4.4"
Guchun Chen [Tue, 4 Dec 2018 02:29:39 +0000 (10:29 +0800)]
drm: msm: sde: update blob property after splash is done
After early splash handoff is finished, kernel needs to
update each crtc's and plane's impacted blob property
by splash. This ensures framework can get correct resource
in the second init process.
Change-Id: Iddfa823d7ba786f3d81b96e86ad3b6e4b10a3375
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
Monika Singh [Thu, 22 Nov 2018 06:48:34 +0000 (12:18 +0530)]
ARM: dts: msm: Remove Out-Of-Bound access
Remove the out of bound access vulnerability in the qce
driver reachable via ioctl.
Change-Id: I4320cd27334eaae975f4a6ad07fb7b2e5ebccffd
Signed-off-by: Monika Singh <monising@codeaurora.org>
Linux Build Service Account [Tue, 4 Dec 2018 01:19:24 +0000 (17:19 -0800)]
Merge "soc: qcom: boot_stats: Moved the early cam entry"
Navid Bahrani [Wed, 28 Nov 2018 02:02:39 +0000 (18:02 -0800)]
drm/msm/hdmi: disable HDR state on bridge disable
HDR info frames were not disabled after a hotplug and app closure
or in the event of an unexpected termination of the userspace driver.
Fixed the issue by resetting to HDR_DISABLE state in hdmi bridge disable.
Change-Id: Iead5cfe11512a8c49b6a2183561de427ce16f393
Signed-off-by: Navid Bahrani <nbahrani@codeaurora.org>
Mohit Aggarwal [Thu, 29 Nov 2018 09:14:32 +0000 (14:44 +0530)]
diag: Do not clear masks during logging mode switch
Currently, masks will be cleared during logging mode
switch if physical USB disconnection will happen in
concurrency. There is no need to clear the masks in
logging switch case. The patch ensures that masks
will be cleared only in valid cases.
Change-Id: I68f5335c4fa8fe06ba1f686f29336a8150991368
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
E V Ravi [Thu, 29 Nov 2018 08:02:44 +0000 (13:32 +0530)]
soc: qcom: boot_stats: Moved the early cam entry
Added the new bootmarkers in struct boot_stats for
bootloader_checksum_start and bootloader_checksum_end
to match the exact order of entries defined in the
bootloader enum bs_entry. And also moved the
bootloader_early_camera_start entry to the bottom
to match the same.
Change-Id: I1fa19aa21b658d8fdf7dcf5bba6658c40420d426
Signed-off-by: E V Ravi <evenka@codeaurora.org>
Nijun Gong [Fri, 30 Nov 2018 12:03:04 +0000 (20:03 +0800)]
defconfig: msm: enable SLUB_DEBUG_ON for gvm
For checking memory leak issue, which was already enabled
in LA 1.2 SP.
Change-Id: I6d9beeadb98bbda84d61821e6f5bfc61d28f9316
Signed-off-by: Nijun Gong <ngong@codeaurora.org>
Teng Fei Fan [Fri, 28 Sep 2018 07:47:30 +0000 (15:47 +0800)]
ARM: dts: msm: Add initial dts support for SDM455 RCM devices
Add initial device trees for SDM455 RCM devices for both external
and internal codec variant.
Change-Id: Idd6034727acc8b9ef600da421963becf5f2305cd
Signed-off-by: Teng Fei Fan <tengfei@codeaurora.org>
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
Srinivasarao P [Mon, 3 Dec 2018 05:58:33 +0000 (11:28 +0530)]
Merge android-4.4.166 (
4c4bedf) into msm-4.4
* refs/heads/tmp-
4c4bedf
Linux 4.4.166
drm/ast: Remove existing framebuffers before loading driver
s390/mm: Check for valid vma before zapping in gmap_discard
namei: allow restricted O_CREAT of FIFOs and regular files
sched/core: Allow __sched_setscheduler() in interrupts when PI is not used
btrfs: Ensure btrfs_trim_fs can trim the whole filesystem
usb: xhci: fix uninitialized completion when USB3 port got wrong status
tty: wipe buffer if not echoing data
tty: wipe buffer.
iwlwifi: mvm: fix regulatory domain update when the firmware starts
scsi: qla2xxx: do not queue commands when unloading
scsi: ufshcd: release resources if probe fails
scsi: ufs: fix race between clock gating and devfreq scaling work
scsi: ufshcd: Fix race between clk scaling and ungate work
scsi: ufs: fix bugs related to null pointer access and array size
netfilter: nf_tables: fix oops when inserting an element into a verdict map
mwifiex: fix p2p device doesn't find in scan problem
mwifiex: Fix NULL pointer dereference in skb_dequeue()
cw1200: Don't leak memory if krealloc failes
Input: xpad - add support for Xbox1 PDP Camo series gamepad
Input: xpad - fix GPD Win 2 controller name
Input: xpad - add GPD Win 2 Controller USB IDs
Input: xpad - avoid using __set_bit() for capabilities
Input: xpad - fix some coding style issues
Input: xpad - add PDP device id 0x02a4
Input: xpad - add support for PDP Xbox One controllers
Input: xpad - validate USB endpoint type during probe
Input: xpad - fix PowerA init quirk for some gamepad models
Input: xpad - constify usb_device_id
Input: xpad - sync supported devices with XBCD
Input: xpad - sync supported devices with 360Controller
Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
Input: xpad - sync supported devices with xboxdrv
Input: xpad - sort supported devices by USB ID
Input: xpad - support some quirky Xbox One pads
Input: xpad - restore LED state after device resume
Input: xpad - fix stuck mode button on Xbox One S pad
Input: xpad - don't depend on endpoint order
Input: xpad - simplify error condition in init_output
Input: xpad - move reporting xbox one home button to common function
Input: xpad - correctly sort vendor id's
Input: xpad - fix Xbox One rumble stopping after 2.5 secs
Input: xpad - add product ID for Xbox One S pad
Input: xpad - power off wireless 360 controllers on suspend
Input: xpad - fix rumble on Xbox One controllers with 2015 firmware
Input: xpad - xbox one elite controller support
Input: xpad - add more third-party controllers
Input: xpad - prevent spurious input from wired Xbox 360 controllers
Input: xpad - add Mad Catz FightStick TE 2 VID/PID
Input: xpad - remove unused function
Input: xpad - correct xbox one pad device name
Input: xpad - use LED API when identifying wireless controllers
Input: xpad - workaround dead irq_out after suspend/ resume
Input: xpad - update Xbox One Force Feedback Support
Input: xpad - handle "present" and "gone" correctly
Input: xpad - remove spurious events of wireless xpad 360 controller
ath10k: fix kernel panic due to race in accessing arvif list
arm64: remove no-op -p linker flag
x86/entry/64: Remove %ebx handling from error_entry/exit
x86/entry: spell EBX register correctly in documentation
net: bcmgenet: fix OF child-node lookup
NFC: nfcmrvl_uart: fix OF child-node lookup
of: add helper to lookup compatible child node
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
powerpc/numa: Suppress "VPHN is not supported" messages
kdb: Use strscpy with destination buffer size
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
cpufreq: imx6q: add return value check for voltage scale
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
usb: xhci: Prevent bus suspend if a port connect change or polling state is detected
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds
can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length
can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()
drm/ast: fixed cursor may disappear sometimes
drm/ast: change resolution may cause screen blurred
llc: do not use sk_eat_skb()
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
bfs: add sanity check at bfs_fill_super()
v9fs_dir_readdir: fix double-free on p9stat_read error
iwlwifi: mvm: support sta_statistics() even on older firmware
MAINTAINERS: Add Sasha as a stable branch maintainer
usb: xhci: fix timeout for transition from RExit to U0
usb: core: Fix hub port connection events lost
ANDROID: arm64 defconfig / build config for cuttlefish
ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple
Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple"
ANDROID: sdcardfs: Add option to not link obb
ANDROID: sdcardfs: Add sandbox
UPSTREAM: seccomp: Fix tracer exit notifications during fatal signals
UPSTREAM: arm64/ptrace: run seccomp after ptrace
UPSTREAM: arm/ptrace: run seccomp after ptrace
BACKPORT: x86/ptrace: run seccomp after ptrace
UPSTREAM: seccomp: recheck the syscall after RET_TRACE
UPSTREAM: seccomp: remove 2-phase API
BACKPORT: x86/entry: Get rid of two-phase syscall entry work
BACKPORT: seccomp: Add a seccomp_data parameter secure_computing()
BACKPORT: x86/entry/64: Always run ptregs-using syscalls on the slow path
UPSTREAM: x86/syscalls: Add syscall entry qualifiers
UPSTREAM: x86/syscalls: Move compat syscall entry handling into syscalltbl.sh
UPSTREAM: x86/syscalls: Remove __SYSCALL_COMMON and __SYSCALL_X32
UPSTREAM: x86/syscalls: Refactor syscalltbl.sh
Makefile: Tidy up 4.4.165 merge
Conflicts:
drivers/scsi/ufs/ufshcd.c
Change-Id: I18bf85f3f24b37e8bb0839bd43eba65cc7eafc64
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Greg Kroah-Hartman [Sat, 1 Dec 2018 09:03:54 +0000 (10:03 +0100)]
Merge 4.4.166 into android-4.4
Changes in 4.4.166
usb: core: Fix hub port connection events lost
usb: xhci: fix timeout for transition from RExit to U0
MAINTAINERS: Add Sasha as a stable branch maintainer
iwlwifi: mvm: support sta_statistics() even on older firmware
v9fs_dir_readdir: fix double-free on p9stat_read error
bfs: add sanity check at bfs_fill_super()
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
llc: do not use sk_eat_skb()
drm/ast: change resolution may cause screen blurred
drm/ast: fixed cursor may disappear sometimes
can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()
can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length
can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
usb: xhci: Prevent bus suspend if a port connect change or polling state is detected
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
cpufreq: imx6q: add return value check for voltage scale
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
kdb: Use strscpy with destination buffer size
powerpc/numa: Suppress "VPHN is not supported" messages
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
of: add helper to lookup compatible child node
NFC: nfcmrvl_uart: fix OF child-node lookup
net: bcmgenet: fix OF child-node lookup
x86/entry: spell EBX register correctly in documentation
x86/entry/64: Remove %ebx handling from error_entry/exit
arm64: remove no-op -p linker flag
ath10k: fix kernel panic due to race in accessing arvif list
Input: xpad - remove spurious events of wireless xpad 360 controller
Input: xpad - handle "present" and "gone" correctly
Input: xpad - update Xbox One Force Feedback Support
Input: xpad - workaround dead irq_out after suspend/ resume
Input: xpad - use LED API when identifying wireless controllers
Input: xpad - correct xbox one pad device name
Input: xpad - remove unused function
Input: xpad - add Mad Catz FightStick TE 2 VID/PID
Input: xpad - prevent spurious input from wired Xbox 360 controllers
Input: xpad - add more third-party controllers
Input: xpad - xbox one elite controller support
Input: xpad - fix rumble on Xbox One controllers with 2015 firmware
Input: xpad - power off wireless 360 controllers on suspend
Input: xpad - add product ID for Xbox One S pad
Input: xpad - fix Xbox One rumble stopping after 2.5 secs
Input: xpad - correctly sort vendor id's
Input: xpad - move reporting xbox one home button to common function
Input: xpad - simplify error condition in init_output
Input: xpad - don't depend on endpoint order
Input: xpad - fix stuck mode button on Xbox One S pad
Input: xpad - restore LED state after device resume
Input: xpad - support some quirky Xbox One pads
Input: xpad - sort supported devices by USB ID
Input: xpad - sync supported devices with xboxdrv
Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
Input: xpad - sync supported devices with 360Controller
Input: xpad - sync supported devices with XBCD
Input: xpad - constify usb_device_id
Input: xpad - fix PowerA init quirk for some gamepad models
Input: xpad - validate USB endpoint type during probe
Input: xpad - add support for PDP Xbox One controllers
Input: xpad - add PDP device id 0x02a4
Input: xpad - fix some coding style issues
Input: xpad - avoid using __set_bit() for capabilities
Input: xpad - add GPD Win 2 Controller USB IDs
Input: xpad - fix GPD Win 2 controller name
Input: xpad - add support for Xbox1 PDP Camo series gamepad
cw1200: Don't leak memory if krealloc failes
mwifiex: Fix NULL pointer dereference in skb_dequeue()
mwifiex: fix p2p device doesn't find in scan problem
netfilter: nf_tables: fix oops when inserting an element into a verdict map
scsi: ufs: fix bugs related to null pointer access and array size
scsi: ufshcd: Fix race between clk scaling and ungate work
scsi: ufs: fix race between clock gating and devfreq scaling work
scsi: ufshcd: release resources if probe fails
scsi: qla2xxx: do not queue commands when unloading
iwlwifi: mvm: fix regulatory domain update when the firmware starts
tty: wipe buffer.
tty: wipe buffer if not echoing data
usb: xhci: fix uninitialized completion when USB3 port got wrong status
btrfs: Ensure btrfs_trim_fs can trim the whole filesystem
sched/core: Allow __sched_setscheduler() in interrupts when PI is not used
namei: allow restricted O_CREAT of FIFOs and regular files
s390/mm: Check for valid vma before zapping in gmap_discard
drm/ast: Remove existing framebuffers before loading driver
Linux 4.4.166
Change-Id: Iba8f0b45bc490f291b504ebb12590b2b01d4f075
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Greg Kroah-Hartman [Sat, 1 Dec 2018 08:46:41 +0000 (09:46 +0100)]
Linux 4.4.166
Thomas Zimmermann [Thu, 15 Nov 2018 10:42:16 +0000 (11:42 +0100)]
drm/ast: Remove existing framebuffers before loading driver
commit
5478ad10e7850ce3d8b7056db05ddfa3c9ddad9a upstream.
If vesafb attaches to the AST device, it configures the framebuffer memory
for uncached access by default. When ast.ko later tries to attach itself to
the device, it wants to use write-combining on the framebuffer memory, but
vesefb's existing configuration for uncached access takes precedence. This
results in reduced performance.
Removing the framebuffer's configuration before loding the AST driver fixes
the problem. Other DRM drivers already contain equivalent code.
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1112963
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: <stable@vger.kernel.org>
Tested-by: Y.C. Chen <yc_chen@aspeedtech.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janosch Frank [Thu, 16 Aug 2018 08:02:31 +0000 (09:02 +0100)]
s390/mm: Check for valid vma before zapping in gmap_discard
commit
1843abd03250115af6cec0892683e70cf2297c25 upstream.
Userspace could have munmapped the area before doing unmapping from
the gmap. This would leave us with a valid vmaddr, but an invalid vma
from which we would try to zap memory.
Let's check before using the vma.
Fixes:
1e133ab296f3 ("s390/mm: split arch/s390/mm/pgtable.c")
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <
20180816082432.78828-1-frankja@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Salvatore Mesoraca [Fri, 24 Aug 2018 00:00:35 +0000 (17:00 -0700)]
namei: allow restricted O_CREAT of FIFOs and regular files
commit
30aba6656f61ed44cba445a3c0d38b296fa9e8f5 upstream.
Disallows open of FIFOs or regular files not owned by the user in world
writable sticky directories, unless the owner is the same as that of the
directory or the file is opened without the O_CREAT flag. The purpose
is to make data spoofing attacks harder. This protection can be turned
on and off separately for FIFOs and regular files via sysctl, just like
the symlinks/hardlinks protection. This patch is based on Openwall's
"HARDEN_FIFO" feature by Solar Designer.
This is a brief list of old vulnerabilities that could have been prevented
by this feature, some of them even allow for privilege escalation:
CVE-2000-1134
CVE-2007-3852
CVE-2008-0525
CVE-2009-0416
CVE-2011-4834
CVE-2015-1838
CVE-2015-7442
CVE-2016-7489
This list is not meant to be complete. It's difficult to track down all
vulnerabilities of this kind because they were often reported without any
mention of this particular attack vector. In fact, before
hardlinks/symlinks restrictions, fifos/regular files weren't the favorite
vehicle to exploit them.
[s.mesoraca16@gmail.com: fix bug reported by Dan Carpenter]
Link: https://lkml.kernel.org/r/20180426081456.GA7060@mwanda
Link: http://lkml.kernel.org/r/1524829819-11275-1-git-send-email-s.mesoraca16@gmail.com
[keescook@chromium.org: drop pr_warn_ratelimited() in favor of audit changes in the future]
[keescook@chromium.org: adjust commit subjet]
Link: http://lkml.kernel.org/r/20180416175918.GA13494@beast
Signed-off-by: Salvatore Mesoraca <s.mesoraca16@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Suggested-by: Solar Designer <solar@openwall.com>
Suggested-by: Kees Cook <keescook@chromium.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Loic <hackurx@opensec.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Steven Rostedt (VMware) [Thu, 9 Mar 2017 15:18:42 +0000 (10:18 -0500)]
sched/core: Allow __sched_setscheduler() in interrupts when PI is not used
commit
896bbb2522587e3b8eb2a0d204d43ccc1042a00d upstream.
When priority inheritance was added back in 2.6.18 to sched_setscheduler(), it
added a path to taking an rt-mutex wait_lock, which is not IRQ safe. As PI
is not a common occurrence, lockdep will likely never trigger if
sched_setscheduler was called from interrupt context. A BUG_ON() was added
to trigger if __sched_setscheduler() was ever called from interrupt context
because there was a possibility to take the wait_lock.
Today the wait_lock is irq safe, but the path to taking it in
sched_setscheduler() is the same as the path to taking it from normal
context. The wait_lock is taken with raw_spin_lock_irq() and released with
raw_spin_unlock_irq() which will indiscriminately enable interrupts,
which would be bad in interrupt context.
The problem is that normalize_rt_tasks, which is called by triggering the
sysrq nice-all-RT-tasks was changed to call __sched_setscheduler(), and this
is done from interrupt context!
Now __sched_setscheduler() takes a "pi" parameter that is used to know if
the priority inheritance should be called or not. As the BUG_ON() only cares
about calling the PI code, it should only bug if called from interrupt
context with the "pi" parameter set to true.
Reported-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Tested-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes:
dbc7f069b93a ("sched: Use replace normalize_task() with __sched_setscheduler()")
Link: http://lkml.kernel.org/r/20170308124654.10e598f2@gandalf.local.home
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Qu Wenruo [Fri, 7 Sep 2018 06:16:24 +0000 (14:16 +0800)]
btrfs: Ensure btrfs_trim_fs can trim the whole filesystem
commit
6ba9fc8e628becf0e3ec94083450d089b0dec5f5 upstream.
[BUG]
fstrim on some btrfs only trims the unallocated space, not trimming any
space in existing block groups.
[CAUSE]
Before fstrim_range passed to btrfs_trim_fs(), it gets truncated to
range [0, super->total_bytes). So later btrfs_trim_fs() will only be
able to trim block groups in range [0, super->total_bytes).
While for btrfs, any bytenr aligned to sectorsize is valid, since btrfs
uses its logical address space, there is nothing limiting the location
where we put block groups.
For filesystem with frequent balance, it's quite easy to relocate all
block groups and bytenr of block groups will start beyond
super->total_bytes.
In that case, btrfs will not trim existing block groups.
[FIX]
Just remove the truncation in btrfs_ioctl_fitrim(), so btrfs_trim_fs()
can get the unmodified range, which is normally set to [0, U64_MAX].
Reported-by: Chris Murphy <lists@colorremedies.com>
Fixes:
f4c697e6406d ("btrfs: return EINVAL if start > total_bytes in fitrim ioctl")
CC: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaron Ma [Fri, 9 Nov 2018 15:21:20 +0000 (17:21 +0200)]
usb: xhci: fix uninitialized completion when USB3 port got wrong status
commit
958c0bd86075d4ef1c936998deefe1947e539240 upstream.
Realtek USB3.0 Card Reader [0bda:0328] reports wrong port status on
Cannon lake PCH USB3.1 xHCI [8086:a36d] after resume from S3,
after clear port reset it works fine.
Since this device is registered on USB3 roothub at boot,
when port status reports not superspeed, xhci_get_port_status will call
an uninitialized completion in bus_state[0].
Kernel will hang because of NULL pointer.
Restrict the USB2 resume status check in USB2 roothub to fix hang issue.
Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Thu, 4 Oct 2018 18:06:14 +0000 (11:06 -0700)]
tty: wipe buffer if not echoing data
commit
b97b3d9fb57860a60592859e332de7759fd54c2e upstream.
If we are not echoing the data to userspace or the console is in icanon
mode, then perhaps it is a "secret" so we should wipe it once we are
done with it.
This mirrors the logic that the audit code has.
Reported-by: aszlig <aszlig@nix.build>
Tested-by: Milan Broz <gmazyland@gmail.com>
Tested-by: Daniel Zatovic <daniel.zatovic@gmail.com>
Tested-by: aszlig <aszlig@nix.build>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Thu, 4 Oct 2018 18:06:13 +0000 (11:06 -0700)]
tty: wipe buffer.
commit
c9a8e5fce009e3c601a43c49ea9dbcb25d1ffac5 upstream.
After we are done with the tty buffer, zero it out.
Reported-by: aszlig <aszlig@nix.build>
Tested-by: Milan Broz <gmazyland@gmail.com>
Tested-by: Daniel Zatovic <daniel.zatovic@gmail.com>
Tested-by: aszlig <aszlig@nix.build>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emmanuel Grumbach [Wed, 3 Oct 2018 08:16:54 +0000 (11:16 +0300)]
iwlwifi: mvm: fix regulatory domain update when the firmware starts
commit
82715ac71e6b94a2c2136e31f3a8e6748e33aa8c upstream.
When the firmware starts, it doesn't have any regulatory
information, hence it uses the world wide limitations. The
driver can feed the firmware with previous knowledge that
was kept in the driver, but the firmware may still not
update its internal tables.
This happens when we start a BSS interface, and then the
firmware can change the regulatory tables based on our
location and it'll use more lenient, location specific
rules. Then, if the firmware is shut down (when the
interface is brought down), and then an AP interface is
created, the firmware will forget the country specific
rules.
The host will think that we are in a certain country that
may allow channels and will try to teach the firmware about
our location, but the firmware may still not allow to drop
the world wide limitations and apply country specific rules
because it was just re-started.
In this case, the firmware will reply with MCC_RESP_ILLEGAL
to the MCC_UPDATE_CMD. In that case, iwlwifi needs to let
the upper layers (cfg80211 / hostapd) know that the channel
list they know about has been updated.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201105
Cc: stable@vger.kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauricio Faria de Oliveira [Mon, 7 Nov 2016 19:53:30 +0000 (17:53 -0200)]
scsi: qla2xxx: do not queue commands when unloading
commit
04dfaa53a0b6e66b328a5bc549e3af8f8b6eac02 upstream.
When the driver is unloading, in qla2x00_remove_one(), there is a single
call/point in time to abort ongoing commands, qla2x00_abort_all_cmds(),
which is still several steps away from the call to scsi_remove_host().
If more commands continue to arrive and be processed during that
interval, when the driver is tearing down and releasing its structures,
it might potentially hit an oops due to invalid memory access:
Unable to handle kernel paging request for data at address 0x00000138
<...>
NIP [
d000000004700a40] qla2xxx_queuecommand+0x80/0x3f0 [qla2xxx]
LR [
d000000004700a10] qla2xxx_queuecommand+0x50/0x3f0 [qla2xxx]
So, fail commands in qla2xxx_queuecommand() if the UNLOADING bit is set.
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subhash Jadavani [Fri, 28 Oct 2016 00:25:58 +0000 (17:25 -0700)]
scsi: ufshcd: release resources if probe fails
commit
afa3dfd42d205b106787476647735aa1de1a5d02 upstream.
If ufshcd pltfrm/pci driver's probe fails for some reason then ensure
that scsi host is released to avoid memory leak but managed memory
allocations (via devm_* calls) need not to be freed explicitly on probe
failure as memory allocated with these functions is automatically freed
on driver detach.
Reviewed-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subhash Jadavani [Fri, 28 Oct 2016 00:25:47 +0000 (17:25 -0700)]
scsi: ufs: fix race between clock gating and devfreq scaling work
commit
30fc33f1ef475480dc5bea4fe1bda84b003b992c upstream.
UFS devfreq clock scaling work may require clocks to be ON if it need to
execute some UFS commands hence it may request for clock hold before
issuing the command. But if UFS clock gating work is already running in
parallel, ungate work would end up waiting for the clock gating work to
finish and as clock gating work would also wait for the clock scaling
work to finish, we would enter in deadlock state. Here is the call trace
during this deadlock state:
Workqueue: devfreq_wq devfreq_monitor
__switch_to
__schedule
schedule
schedule_timeout
wait_for_common
wait_for_completion
flush_work
ufshcd_hold
ufshcd_send_uic_cmd
ufshcd_dme_get_attr
ufs_qcom_set_dme_vs_core_clk_ctrl_clear_div
ufs_qcom_clk_scale_notify
ufshcd_scale_clks
ufshcd_devfreq_target
update_devfreq
devfreq_monitor
process_one_work
worker_thread
kthread
ret_from_fork
Workqueue: events ufshcd_gate_work
__switch_to
__schedule
schedule
schedule_preempt_disabled
__mutex_lock_slowpath
mutex_lock
devfreq_monitor_suspend
devfreq_simple_ondemand_handler
devfreq_suspend_device
ufshcd_gate_work
process_one_work
worker_thread
kthread
ret_from_fork
Workqueue: events ufshcd_ungate_work
__switch_to
__schedule
schedule
schedule_timeout
wait_for_common
wait_for_completion
flush_work
__cancel_work_timer
cancel_delayed_work_sync
ufshcd_ungate_work
process_one_work
worker_thread
kthread
ret_from_fork
This change fixes this deadlock by doing this in devfreq work (devfreq_wq):
Try cancelling clock gating work. If we are able to cancel gating work
or it wasn't scheduled, hold the clock reference count until scaling is
in progress. If gate work is already running in parallel, let's skip
the frequecy scaling at this time and it will be retried once next scaling
window expires.
Reviewed-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Venkat Gopalakrishnan [Tue, 18 Oct 2016 00:10:53 +0000 (17:10 -0700)]
scsi: ufshcd: Fix race between clk scaling and ungate work
commit
f2a785ac23125fa0774327d39e837e45cf28fe92 upstream.
The ungate work turns on the clock before it exits hibern8, if the link
was put in hibern8 during clock gating work. There occurs a race
condition when clock scaling work calls ufshcd_hold() to make sure low
power states cannot be entered, but that returns by checking only
whether the clocks are on. This causes the clock scaling work to issue
UIC commands when the link is in hibern8 causing failures. Make sure we
exit hibern8 state before returning from ufshcd_hold().
Callstacks for race condition:
ufshcd_scale_gear
ufshcd_devfreq_scale
ufshcd_devfreq_target
update_devfreq
devfreq_monitor
process_one_work
worker_thread
kthread
ret_from_fork
ufshcd_uic_hibern8_exit
ufshcd_ungate_work
process_one_work
worker_thread
kthread
ret_from_fork
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yaniv Gardi [Tue, 18 Oct 2016 00:09:24 +0000 (17:09 -0700)]
scsi: ufs: fix bugs related to null pointer access and array size
commit
e3ce73d69aff44421d7899b235fec5ac2c306ff4 upstream.
In this change there are a few fixes of possible NULL pointer access and
possible access to index that exceeds array boundaries.
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liping Zhang [Sun, 6 Nov 2016 06:40:01 +0000 (14:40 +0800)]
netfilter: nf_tables: fix oops when inserting an element into a verdict map
commit
58c78e104d937c1f560fb10ed9bb2dcde0db4fcf upstream.
Dalegaard says:
The following ruleset, when loaded with 'nft -f bad.txt'
----snip----
flush ruleset
table ip inlinenat {
map sourcemap {
type ipv4_addr : verdict;
}
chain postrouting {
ip saddr vmap @sourcemap accept
}
}
add chain inlinenat test
add element inlinenat sourcemap { 100.123.10.2 : jump test }
----snip----
results in a kernel oops:
BUG: unable to handle kernel paging request at
0000000000001344
IP: [<
ffffffffa07bf704>] nf_tables_check_loops+0x114/0x1f0 [nf_tables]
[...]
Call Trace:
[<
ffffffffa07c2aae>] ? nft_data_init+0x13e/0x1a0 [nf_tables]
[<
ffffffffa07c1950>] nft_validate_register_store+0x60/0xb0 [nf_tables]
[<
ffffffffa07c74b5>] nft_add_set_elem+0x545/0x5e0 [nf_tables]
[<
ffffffffa07bfdd0>] ? nft_table_lookup+0x30/0x60 [nf_tables]
[<
ffffffff8132c630>] ? nla_strcmp+0x40/0x50
[<
ffffffffa07c766e>] nf_tables_newsetelem+0x11e/0x210 [nf_tables]
[<
ffffffff8132c400>] ? nla_validate+0x60/0x80
[<
ffffffffa030d9b4>] nfnetlink_rcv+0x354/0x5a7 [nfnetlink]
Because we forget to fill the net pointer in bind_ctx, so dereferencing
it may cause kernel crash.
Reported-by: Dalegaard <dalegaard@gmail.com>
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Karthik D A [Wed, 28 Sep 2016 12:48:28 +0000 (18:18 +0530)]
mwifiex: fix p2p device doesn't find in scan problem
commit
3d8bd85c2c9e47ed2c82348aa5b6029ed48376ae upstream.
Marvell p2p device disappears from the list of p2p peers on the other
p2p device after disconnection.
It happens due to a bug in driver. When interface is changed from p2p
to station, certain variables(bss_type, bss_role etc.) aren't correctly
updated. This patch corrects them to fix the issue.
Signed-off-by: Karthik D A <karthida@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[AmitP: Refactored to fix driver file path in linux-4.4.y]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitkumar Karwar [Wed, 28 Sep 2016 12:48:23 +0000 (18:18 +0530)]
mwifiex: Fix NULL pointer dereference in skb_dequeue()
commit
c44c040300d7afd79294710313a4989683e2afb1 upstream.
At couple of places in cleanup path, we are just going through the
skb queue and freeing them without unlinking. This leads to a crash
when other thread tries to do skb_dequeue() and use already freed node.
The problem is freed by unlinking skb before freeing it.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[AmitP: Refactored to fix driver file path in linux-4.4.y]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Thumshirn [Fri, 30 Sep 2016 12:39:17 +0000 (14:39 +0200)]
cw1200: Don't leak memory if krealloc failes
commit
9afdd6128c39f42398041bb2e017d8df0dcebcd1 upstream.
The call to krealloc() in wsm_buf_reserve() directly assigns the newly
returned memory to buf->begin. This is all fine except when krealloc()
failes we loose the ability to free the old memory pointed to by
buf->begin. If we just create a temporary variable to assign memory to
and assign the memory to it we can mitigate the memory leak.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ramses Ramírez [Fri, 28 Sep 2018 23:59:26 +0000 (16:59 -0700)]
Input: xpad - add support for Xbox1 PDP Camo series gamepad
[ Upstream commit
9735082a7cbae572c2eabdc45acecc8c9fa0759b ]
The "Xbox One PDP Wired Controller - Camo series" has a different
product-id than the regular PDP controller and the PDP stealth series,
but it uses the same initialization sequence. This patch adds the
product-id of the camo series to the structures that handle the other
PDP Xbox One controllers.
Signed-off-by: Ramses Ramírez <ramzeto@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Enno Boland [Tue, 19 Jun 2018 18:55:33 +0000 (11:55 -0700)]
Input: xpad - fix GPD Win 2 controller name
[ Upstream commit
dd6bee81c942c0ea01030da9356026afb88f9d18 ]
This fixes using the controller with SDL2.
SDL2 has a naive algorithm to apply the correct settings to a controller.
For X-Box compatible controllers it expects that the controller name
contains a variation of a 'XBOX'-string.
This patch changes the identifier to contain "X-Box" as substring. Tested
with Steam and C-Dogs-SDL which both detect the controller properly after
adding this patch.
Fixes:
c1ba08390a8b ("Input: xpad - add GPD Win 2 Controller USB IDs")
Cc: stable@vger.kernel.org
Signed-off-by: Enno Boland <gottox@voidlinux.eu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Ethan Lee [Fri, 1 Jun 2018 18:46:08 +0000 (11:46 -0700)]
Input: xpad - add GPD Win 2 Controller USB IDs
[ Upstream commit
c1ba08390a8bb13c927e699330896adc15b78205 ]
GPD Win 2 Website: http://www.gpd.hk/gpdwin2.asp
Tested on a unit from the first production run sent to Indiegogo backers
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Marcus Folkesson [Tue, 8 May 2018 22:17:07 +0000 (15:17 -0700)]
Input: xpad - avoid using __set_bit() for capabilities
[ Upstream commit
a01308031c2647ed5f1c845104b73a8820a958a9 ]
input_set_capability() and input_set_abs_param() will do it for you.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Leo Sperling [Thu, 4 Aug 2016 00:31:09 +0000 (17:31 -0700)]
Input: xpad - fix some coding style issues
[ Upstream commit
68c78d0155e37992268664e134996d2b140ddf38 ]
Fix some coding style issues reported by checkpatch.pl. Mostly brackets
in macros, spacing and comment style.
Signed-off-by: Leo Sperling <leosperling97@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Francis Therien [Mon, 26 Mar 2018 22:59:00 +0000 (15:59 -0700)]
Input: xpad - add PDP device id 0x02a4
[ Upstream commit
c6c848572f4da0e34ffe0a35364b4db871e13e42 ]
Adds support for a PDP Xbox One controller with device ID
(0x06ef:0x02a4). The Product string for this device is "PDP Wired
Controller for Xbox One - Stealth Series | Phantom Black".
Signed-off-by: Francis Therien <frtherien@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Mark Furneaux [Mon, 22 Jan 2018 19:24:17 +0000 (11:24 -0800)]
Input: xpad - add support for PDP Xbox One controllers
[ Upstream commit
e5c9c6a885fad00aa559b49d8fc23a60e290824e ]
Adds support for the current lineup of Xbox One controllers from PDP
(Performance Designed Products). These controllers are very picky with
their initialization sequence and require an additional 2 packets before
they send any input reports.
Signed-off-by: Mark Furneaux <mark@furneaux.ca>
Reviewed-by: Cameron Gutman <aicommander@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Cameron Gutman [Tue, 12 Sep 2017 18:27:44 +0000 (11:27 -0700)]
Input: xpad - validate USB endpoint type during probe
[ Upstream commit
122d6a347329818419b032c5a1776e6b3866d9b9 ]
We should only see devices with interrupt endpoints. Ignore any other
endpoints that we find, so we don't send try to send them interrupt URBs
and trigger a WARN down in the USB stack.
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Cc: <stable@vger.kernel.org> # c01b5e7464f0 Input: xpad - don't depend on endpoint order
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Cameron Gutman [Thu, 31 Aug 2017 18:52:20 +0000 (11:52 -0700)]
Input: xpad - fix PowerA init quirk for some gamepad models
[ Upstream commit
f5308d1b83eba20e69df5e0926ba7257c8dd9074 ]
The PowerA gamepad initialization quirk worked with the PowerA
wired gamepad I had around (0x24c6:0x543a), but a user reported [0]
that it didn't work for him, even though our gamepads shared the
same vendor and product IDs.
When I initially implemented the PowerA quirk, I wanted to avoid
actually triggering the rumble action during init. My tests showed
that my gamepad would work correctly even if it received a rumble
of 0 intensity, so that's what I went with.
Unfortunately, this apparently isn't true for all models (perhaps
a firmware difference?). This non-working gamepad seems to require
the real magic rumble packet that the Microsoft driver sends, which
actually vibrates the gamepad. To counteract this effect, I still
send the old zero-rumble PowerA quirk packet which cancels the
rumble effect before the motors can spin up enough to vibrate.
[0]: https://github.com/paroj/xpad/issues/48#issuecomment-
313904867
Reported-by: Kyle Beauchamp <kyleabeauchamp@gmail.com>
Tested-by: Kyle Beauchamp <kyleabeauchamp@gmail.com>
Fixes:
81093c9848a7 ("Input: xpad - support some quirky Xbox One pads")
Cc: stable@vger.kernel.org # v4.12
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Arvind Yadav [Tue, 8 Aug 2017 03:04:13 +0000 (20:04 -0700)]
Input: xpad - constify usb_device_id
[ Upstream commit
94aef061c796d3d47f1a2eed41e651ffaaade402 ]
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>