Commit graph

591569 commits

Author SHA1 Message Date
Koen Vandeputte
bb8428f4c9 mac80211: fix CSA in IBSS mode
commit f181d6a3bcc35633facf5f3925699021c13492c5 upstream.

Add the missing IBSS capability flag during capability init as it needs
to be inserted into the generated beacon in order for CSA to work.

Fixes: cd7760e62c ("mac80211: add support for CSA in IBSS mode")
Signed-off-by: Piotr Gawlowicz <gawlowicz@tkn.tu-berlin.de>
Signed-off-by: Mikołaj Chwalisz <chwalisz@tkn.tu-berlin.de>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:09 +02:00
Jason A. Donenfeld
5f1f39023c mac80211/wpa: use constant time memory comparison for MACs
commit 98c67d187db7808b1f3c95f2110dd4392d034182 upstream.

Otherwise, we enable all sorts of forgeries via timing attack.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:09 +02:00
Emmanuel Grumbach
156f00663a mac80211: don't look at the PM bit of BAR frames
commit 769dc04db3ed8484798aceb015b94deacc2ba557 upstream.

When a peer sends a BAR frame with PM bit clear, we should
not modify its PM state as madated by the spec in
802.11-20012 10.2.1.2.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:08 +02:00
Christophe JAILLET
a8686c968f vb2: Fix an off by one error in 'vb2_plane_vaddr'
commit 5ebb6dd36c9f5fb37b1077b393c254d70a14cb46 upstream.

We should ensure that 'plane_no' is '< vb->num_planes' as done in
'vb2_plane_cookie' just a few lines below.

Fixes: e23ccc0ad9 ("[media] v4l: add videobuf2 Video for Linux 2 driver framework")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:08 +02:00
Tomasz Wilczyński
fa90f02d51 cpufreq: conservative: Allow down_threshold to take values from 1 to 10
commit b8e11f7d2791bd9320be1c6e772a60b2aa093e45 upstream.

Commit 27ed3cd2eb (cpufreq: conservative: Fix the logic in frequency
decrease checking) removed the 10 point substraction when comparing the
load against down_threshold but did not remove the related limit for the
down_threshold value.  As a result, down_threshold lower than 11 is not
allowed even though values from 1 to 10 do work correctly too. The
comment ("cannot be lower than 11 otherwise freq will not fall") also
does not apply after removing the substraction.

For this reason, allow down_threshold to take any value from 1 to 99
and fix the related comment.

Fixes: 27ed3cd2eb (cpufreq: conservative: Fix the logic in frequency decrease checking)
Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:08 +02:00
Marc Kleine-Budde
58ab7a86cd can: gs_usb: fix memory leak in gs_cmd_reset()
commit 5cda3ee5138e91ac369ed9d0b55eab0dab077686 upstream.

This patch adds the missing kfree() in gs_cmd_reset() to free the
memory that is not used anymore after usb_control_msg().

Cc: Maximilian Schneider <max@schneidersoft.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:08 +02:00
Nicholas Bellinger
0ad134d81c configfs: Fix race between create_link and configfs_rmdir
commit ba80aa909c99802c428682c352b0ee0baac0acd3 upstream.

This patch closes a long standing race in configfs between
the creation of a new symlink in create_link(), while the
symlink target's config_item is being concurrently removed
via configfs_rmdir().

This can happen because the symlink target's reference
is obtained by config_item_get() in create_link() before
the CONFIGFS_USET_DROPPING bit set by configfs_detach_prep()
during configfs_rmdir() shutdown is actually checked..

This originally manifested itself on ppc64 on v4.8.y under
heavy load using ibmvscsi target ports with Novalink API:

[ 7877.289863] rpadlpar_io: slot U8247.22L.212A91A-V1-C8 added
[ 7879.893760] ------------[ cut here ]------------
[ 7879.893768] WARNING: CPU: 15 PID: 17585 at ./include/linux/kref.h:46 config_item_get+0x7c/0x90 [configfs]
[ 7879.893811] CPU: 15 PID: 17585 Comm: targetcli Tainted: G           O 4.8.17-customv2.22 #12
[ 7879.893812] task: c00000018a0d3400 task.stack: c0000001f3b40000
[ 7879.893813] NIP: d000000002c664ec LR: d000000002c60980 CTR: c000000000b70870
[ 7879.893814] REGS: c0000001f3b43810 TRAP: 0700   Tainted: G O     (4.8.17-customv2.22)
[ 7879.893815] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE>  CR: 28222242  XER: 00000000
[ 7879.893820] CFAR: d000000002c664bc SOFTE: 1
                GPR00: d000000002c60980 c0000001f3b43a90 d000000002c70908 c0000000fbc06820
                GPR04: c0000001ef1bd900 0000000000000004 0000000000000001 0000000000000000
                GPR08: 0000000000000000 0000000000000001 d000000002c69560 d000000002c66d80
                GPR12: c000000000b70870 c00000000e798700 c0000001f3b43ca0 c0000001d4949d40
                GPR16: c00000014637e1c0 0000000000000000 0000000000000000 c0000000f2392940
                GPR20: c0000001f3b43b98 0000000000000041 0000000000600000 0000000000000000
                GPR24: fffffffffffff000 0000000000000000 d000000002c60be0 c0000001f1dac490
                GPR28: 0000000000000004 0000000000000000 c0000001ef1bd900 c0000000f2392940
[ 7879.893839] NIP [d000000002c664ec] config_item_get+0x7c/0x90 [configfs]
[ 7879.893841] LR [d000000002c60980] check_perm+0x80/0x2e0 [configfs]
[ 7879.893842] Call Trace:
[ 7879.893844] [c0000001f3b43ac0] [d000000002c60980] check_perm+0x80/0x2e0 [configfs]
[ 7879.893847] [c0000001f3b43b10] [c000000000329770] do_dentry_open+0x2c0/0x460
[ 7879.893849] [c0000001f3b43b70] [c000000000344480] path_openat+0x210/0x1490
[ 7879.893851] [c0000001f3b43c80] [c00000000034708c] do_filp_open+0xfc/0x170
[ 7879.893853] [c0000001f3b43db0] [c00000000032b5bc] do_sys_open+0x1cc/0x390
[ 7879.893856] [c0000001f3b43e30] [c000000000009584] system_call+0x38/0xec
[ 7879.893856] Instruction dump:
[ 7879.893858] 409d0014 38210030 e8010010 7c0803a6 4e800020 3d220000 e94981e0 892a0000
[ 7879.893861] 2f890000 409effe0 39200001 992a0000 <0fe00000> 4bffffd0 60000000 60000000
[ 7879.893866] ---[ end trace 14078f0b3b5ad0aa ]---

To close this race, go ahead and obtain the symlink's target
config_item reference only after the existing CONFIGFS_USET_DROPPING
check succeeds.

This way, if configfs_rmdir() wins create_link() will return -ENONET,
and if create_link() wins configfs_rmdir() will return -EBUSY.

Reported-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Tested-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26 07:13:08 +02:00
Amir Levy
9d56022bb6 msm: ipa3: remove delay from AP if QMI fails
In case of failure to send QMI message to modem
remove the delay from AP since modem is probably
down (SSR\reboot).

Change-Id: Iae4d5162d39cd05f5c50d75087ec90dfe04a6c43
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2017-06-25 10:06:14 +03:00
Lei wang
18bc3cb1f1 ARM: dts: msm: add non-removable ufs/emmc property for msm8996
Defines the non-removable property for ufs/emmc device node
This basically lets the driver whether ufs/emmc is the boot
device

Change-Id: I7e583e0ecef064d1ed91b443fe35f98a3b2c0c8a
Signed-off-by: Lei wang <leiwan@codeaurora.org>
2017-06-23 19:34:47 -07:00
Vidyakumar Athota
5a508511af soc: qcom: avoid calling sleeping functions in interrupt context
Since glink callbacks are called in interrupt context, avoid using
functions that can sleep in the callbacks. Use separate work queue
to free the buffer.

Change-Id: I8abae4becb4c4ac1feb8794db4d2a6bb378943ac
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2017-06-23 16:58:16 -07:00
Daniel Borkmann
6bb6b3e686 UPSTREAM: bpf: don't let ldimm64 leak map addresses on unprivileged
[ Upstream commit 0d0e57697f162da4aa218b5feafe614fb666db07 ]

The patch fixes two things at once:

1) It checks the env->allow_ptr_leaks and only prints the map address to
   the log if we have the privileges to do so, otherwise it just dumps 0
   as we would when kptr_restrict is enabled on %pK. Given the latter is
   off by default and not every distro sets it, I don't want to rely on
   this, hence the 0 by default for unprivileged.

2) Printing of ldimm64 in the verifier log is currently broken in that
   we don't print the full immediate, but only the 32 bit part of the
   first insn part for ldimm64. Thus, fix this up as well; it's okay to
   access, since we verified all ldimm64 earlier already (including just
   constants) through replace_map_fd_with_map_ptr().

Fixes: 1be7f75d16 ("bpf: enable non-root eBPF programs")
Fixes: cbd3570086 ("bpf: verifier (add ability to receive verification log)")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 62199770
Change-Id: I62ee47d06ddc669ba2863e8cf24f8f3e7683a461
2017-06-23 13:31:47 -07:00
Linux Build Service Account
6f56b2a9c8 Merge "ath10k: Add change interface handler" 2017-06-23 12:09:25 -07:00
Linux Build Service Account
7e03e0f79a Merge "qpnp-smb2: configure DRP mode after interrupt request" 2017-06-23 12:09:24 -07:00
Linux Build Service Account
fb8f2806f6 Merge "arm/arm64: Export save_stack_trace_tsk()" 2017-06-23 12:09:23 -07:00
Krishna Chaitanya Devarakonda
c80985aa81 msm: mdss: unmap buffers before starting Secure Display session
IOMMU will be detached for Secure Display session. We need to make
sure to unmap all the buffers before detaching IOMMU. There are a
couple of cases where the buffer on pipe which is being used for
Secure Display, isn't unmapped before IOMMU detach. Add handling
for such cases in validate and kickoff. Also, add changes to wait
for secure session completion in rotator, before mapping buffers.

Change-Id: Ia47f519b8ba471848bbf2eef4ae1c010f1d0c1d2
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
2017-06-23 10:56:52 -07:00
Dhoat Harpal
dcff893174 soc: qcom: glink: Remove magic number logic
Possible use after free issue while accessing magic number,
if the ctx is already freed.

Magic number check is removed.

CRs-Fixed: 2061287
Change-Id: Ie157a930c7eb310829766319e0af742114337e6c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-06-23 20:40:16 +05:30
Dhoat Harpal
acddcfffa0 soc: qcom: glink_pkt: fix number of intent queued
glink_pkt driver has no limit on number of intents auto queued for rx.
Intent are auto queued when remote side request for intent without checking
how many packets are pending to be read by client.

A max limit check is added to avoid memory exhaustion case with indefinite
intent queueing.

CRs-Fixed: 2042581
Change-Id: I68aa102b323716f591841b192477a70397a5536b
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-06-23 20:19:39 +05:30
Linux Build Service Account
bbf9eb8202 Merge "ath10k: wait for vdev delete response from firmware" 2017-06-23 05:56:57 -07:00
Linux Build Service Account
2e04fffa4a Merge "sound: usb: Add quirk to issue SET_CUR volume on 2nd channel" 2017-06-23 05:56:56 -07:00
Linux Build Service Account
a2aa60c24e Merge "msm: mdss: dp: fix no display issue on second connection" 2017-06-23 05:56:55 -07:00
Linux Build Service Account
b85e238432 Merge "mdss: dp: check if sink device is connected before DP ON sequence" 2017-06-23 05:56:53 -07:00
Linux Build Service Account
9bda357a1a Merge "msm: sde: Remove output fence object after user request completed" 2017-06-23 05:56:41 -07:00
Linux Build Service Account
10bb4a94f1 Merge "msm: mdss: Change IOMMU map sequence during splash cleanup" 2017-06-23 05:56:40 -07:00
Linux Build Service Account
c2841e623b Merge "msm: sde: Convert workq to kernel thread in SDE rotator" 2017-06-23 05:56:39 -07:00
Linux Build Service Account
b52caad54d Merge "smb-lib: add support for float charger reporting" 2017-06-23 05:56:38 -07:00
Linux Build Service Account
088c0f837e Merge "power: power_supply_sysfs: Add support for Floating charger" 2017-06-23 05:56:38 -07:00
Linux Build Service Account
8e102f05a2 Merge "msm:ipa: Fix to kasan use-after-free issue" 2017-06-23 05:56:37 -07:00
Linux Build Service Account
e965ee5226 Merge "btfm: provide a way to query wcn3990 status" 2017-06-23 05:56:36 -07:00
Linux Build Service Account
e213493c43 Merge "scsi: ufs: Fix initialization of pointer" 2017-06-23 05:56:21 -07:00
Maria Yu
d7edad5d69 ARM: dts: msm: Add mdss panel file nodes for msm8998 QRD
Add the mdss panel file to support qrd device tree overlay.

Change-Id: I65152ee6a7cafdbba299f0e0a3cac2e77c8c2660
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2017-06-23 20:00:04 +08:00
Ashay Jaiswal
831a954709 qpnp-smb2: configure DRP mode after interrupt request
During hardware initialization charger is configured in
DRP mode from force UFP mode and after mode configuration
hardware takes ~300/400 msec for UFP/DFP detection. In case
if the delay between moving to DRP mode and software enabling
interrupts is more than hardware detection delay then software
will miss the detection interrupt. Fix this by moving DRP
configuration after interrupt request this ensures software will
receive interrupt once hardware detection completes.

CRs-Fixed: 2065296
Change-Id: I55c59ed558e8db40a7b1af7638832da1f9547222
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-06-23 15:09:34 +05:30
Sarada Prasanna Garnayak
973424e7e1 cnss_pci: fix the race condition in firmware file setup
Add protection code to avoid the redundant firmware
setup from the userspace. Synchronize firmware setup
global data access by multiple firmware setup routines
when firmware setup triggered by userspace is in progress.

CRs-Fixed: 2053638
Change-Id: Ib5bf05aade464a0789c7b848457e95d25c4e6f8f
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-06-23 14:50:12 +05:30
Vijayavardhan Vennapusa
b12f86c5b2 USB: f_audio_source: Remove pm_qos request under non atomic context
Currently driver is removing pm_qos request after acquiring spinlock in
pcm_close() callback. This could cause warning as pm_qos_remove_request()
can sleep. Hence move removing pm_qos request before acquiring spin lock.

Change-Id: I8e898934c4e83b80c994b2a293abbd920589ac62
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-06-23 14:45:49 +05:30
Sriraj Hebbar
ae23cb5bb5 msm: camera: Fix Use after free bug in msm_vb2.c
There is no syncronization between msm_vb2_get_buf
and msm_delete_stream which can lead to use after
free.
Fixed it by using read/write lock.

Change-Id: Icff5cd81b1a4e9c28f19936dec570751feab0ccf
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-06-23 15:20:16 +08:00
Linux Build Service Account
e5b8aadd07 Merge "drm: msm: add support for a custom hotplug event" 2017-06-22 23:41:17 -07:00
Linux Build Service Account
f8c31265f8 Merge "soc: qcom: sleepstate: Enable/Disable IPCRTR wakelocks" 2017-06-22 23:41:16 -07:00
Linux Build Service Account
3d7828b335 Merge "thermal: qpnp-adc-tm: Fix shutdown path for ADC_TM" 2017-06-22 23:41:15 -07:00
Linux Build Service Account
c9b4dc7067 Merge "Merge branch 'android-4.4@e76c0fa' into branch 'msm-4.4'" 2017-06-22 23:41:14 -07:00
Linux Build Service Account
a21b8a6a89 Merge "drm/msm: add PLL_ENABLE property to support clock recovery" 2017-06-22 23:41:10 -07:00
Linux Build Service Account
8f79480709 Merge "ath10k: Add interface combinations for wcn3990" 2017-06-22 23:41:09 -07:00
Linux Build Service Account
2277a4c12d Merge "ASoC: msm: qdsp6v2: Remove size checks when finding ADM cal" 2017-06-22 23:41:08 -07:00
Linux Build Service Account
50947ee8ec Merge "ARM: dts: msm: Update temperature threshold limits for EA for 8998/660/630" 2017-06-22 23:41:07 -07:00
Linux Build Service Account
93202f2f62 Merge "msm: vidc: Scale clocks with inst load during dcvs setup period" 2017-06-22 23:41:06 -07:00
Linux Build Service Account
cb75f7e5b7 Merge "qcom: scm: Remove inputs printing from scm_call2_atomic" 2017-06-22 23:41:05 -07:00
Linux Build Service Account
6c27d8d8b7 Merge "usb: core: Add support to handle multi config audio device" 2017-06-22 23:41:03 -07:00
Linux Build Service Account
c7572d54ad Merge "qseecom: use strnlen in qseecom_start_app" 2017-06-22 23:41:02 -07:00
Linux Build Service Account
dcfdefb70a Merge "power: qcom: qpnp-fg-gen3: add missing break in switch statement" 2017-06-22 23:41:01 -07:00
Linux Build Service Account
7ebaed16ad Merge "soc: qcom: glink: Move tx_info allocation in beginning" 2017-06-22 23:41:00 -07:00
Linux Build Service Account
9a7d7cda15 Merge "ARM: dts: msm: Remove HDMI hotplug feature for msm8996 ADP" 2017-06-22 23:40:59 -07:00
Linux Build Service Account
8b2a2a4d4f Merge "drm/msm: gracefully handle NULL return from setup_pagetable()" 2017-06-22 23:40:58 -07:00