All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.4 29/69] hv: do not lose pending heartbeat vmbus packets
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Long Li, K. Y. Srinivasan
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Long Li <longli@microsoft.com>

commit 407a3aee6ee2d2cb46d9ba3fc380bc29f35d020c upstream.

The host keeps sending heartbeat packets independent of the
guest responding to them.  Even though we respond to the heartbeat messages at
interrupt level, we can have situations where there maybe multiple heartbeat
messages pending that have not been responded to. For instance this occurs when the
VM is paused and the host continues to send the heartbeat messages.
Address this issue by draining and responding to all
the heartbeat messages that maybe pending.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hv/hv_util.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -283,10 +283,14 @@ static void heartbeat_onchannelcallback(
 	u8 *hbeat_txf_buf = util_heartbeat.recv_buffer;
 	struct icmsg_negotiate *negop = NULL;
 
-	vmbus_recvpacket(channel, hbeat_txf_buf,
-			 PAGE_SIZE, &recvlen, &requestid);
+	while (1) {
+
+		vmbus_recvpacket(channel, hbeat_txf_buf,
+				 PAGE_SIZE, &recvlen, &requestid);
+
+		if (!recvlen)
+			break;
 
-	if (recvlen > 0) {
 		icmsghdrp = (struct icmsg_hdr *)&hbeat_txf_buf[
 				sizeof(struct vmbuspipe_hdr)];
 

^ permalink raw reply

* [PATCH 4.4 31/69] tty: limit terminal size to 4M chars
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, David Rientjes,
	One Thousand Gnomes, Jiri Slaby, Peter Hurley, syzkaller
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dmitry Vyukov <dvyukov@google.com>

commit 32b2921e6a7461fe63b71217067a6cf4bddb132f upstream.

Size of kmalloc() in vc_do_resize() is controlled by user.
Too large kmalloc() size triggers WARNING message on console.
Put a reasonable upper bound on terminal size to prevent WARNINGs.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
CC: David Rientjes <rientjes@google.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@vger.kernel.org
Cc: syzkaller@googlegroups.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/vt/vt.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -872,6 +872,8 @@ static int vc_do_resize(struct tty_struc
 	if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)
 		return 0;
 
+	if (new_screen_size > (4 << 20))
+		return -EINVAL;
 	newscreen = kmalloc(new_screen_size, GFP_USER);
 	if (!newscreen)
 		return -ENOMEM;

^ permalink raw reply

* [PATCH 4.4 13/69] ALSA: hda - Adding a new group of pin cfg into ALC295 pin quirk table
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hui Wang, Takashi Iwai
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hui Wang <hui.wang@canonical.com>

commit f771d5bb71d4df9573d12386400540516672208b upstream.

We have a new Dell laptop model which uses ALC295, the pin definition
is different from the existing ones in the pin quirk table, to fix the
headset mic detection and mic mute led's problem, we need to add the
new pin defintion into the pin quirk table.

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>

---
 sound/pci/hda/patch_realtek.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5793,8 +5793,6 @@ static const struct hda_model_fixup alc2
 #define ALC295_STANDARD_PINS \
 	{0x12, 0xb7a60130}, \
 	{0x14, 0x90170110}, \
-	{0x17, 0x21014020}, \
-	{0x18, 0x21a19030}, \
 	{0x21, 0x04211020}
 
 #define ALC298_STANDARD_PINS \
@@ -6021,7 +6019,13 @@ static const struct snd_hda_pin_quirk al
 		ALC292_STANDARD_PINS,
 		{0x13, 0x90a60140}),
 	SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
-		ALC295_STANDARD_PINS),
+		ALC295_STANDARD_PINS,
+		{0x17, 0x21014020},
+		{0x18, 0x21a19030}),
+	SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+		ALC295_STANDARD_PINS,
+		{0x17, 0x21014040},
+		{0x18, 0x21a19050}),
 	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
 		ALC298_STANDARD_PINS,
 		{0x17, 0x90170110}),

^ permalink raw reply

* [PATCH 4.4 18/69] ubifs: Abort readdir upon error
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Richard Weinberger
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Richard Weinberger <richard@nod.at>

commit c83ed4c9dbb358b9e7707486e167e940d48bfeed upstream.

If UBIFS is facing an error while walking a directory, it reports this
error and ubifs_readdir() returns the error code. But the VFS readdir
logic does not make the getdents system call fail in all cases. When the
readdir cursor indicates that more entries are present, the system call
will just return and the libc wrapper will try again since it also
knows that more entries are present.
This causes the libc wrapper to busy loop for ever when a directory is
corrupted on UBIFS.
A common approach do deal with corrupted directory entries is
skipping them by setting the cursor to the next entry. On UBIFS this
approach is not possible since we cannot compute the next directory
entry cursor position without reading the current entry. So all we can
do is setting the cursor to the "no more entries" position and make
getdents exit.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ubifs/dir.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -350,7 +350,7 @@ static unsigned int vfs_dent_type(uint8_
  */
 static int ubifs_readdir(struct file *file, struct dir_context *ctx)
 {
-	int err;
+	int err = 0;
 	struct qstr nm;
 	union ubifs_key key;
 	struct ubifs_dent_node *dent;
@@ -452,14 +452,12 @@ out:
 	kfree(file->private_data);
 	file->private_data = NULL;
 
-	if (err != -ENOENT) {
+	if (err != -ENOENT)
 		ubifs_err(c, "cannot find next direntry, error %d", err);
-		return err;
-	}
 
 	/* 2 is a special value indicating that there are no more direntries */
 	ctx->pos = 2;
-	return 0;
+	return err;
 }
 
 /* Free saved readdir() state when the directory is closed */

^ permalink raw reply

* Re: [PATCH 2/4] ath10k: Add support to update btcoex priority value via nl80211
From: Tamizh chelvam @ 2016-11-09 10:46 UTC (permalink / raw)
  To: kbuild test robot; +Cc: c_traja, linux-wireless, kbuild-all, ath10k
In-Reply-To: <201611090753.f8QniYub%fengguang.wu@intel.com>

On 2016-11-09 05:19, kbuild test robot wrote:
> Hi Tamizh,
> 
> [auto build test ERROR on ath6kl/ath-next]
> [cannot apply to v4.9-rc4 next-20161108]
> [if your patch is applied to the wrong git tree, please drop us a note
> to help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 
> ath-next
> config: xtensa-allmodconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 4.9.0
> reproduce:
>         wget
> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
> -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=xtensa
> 
> All error/warnings (new ones prefixed by >>):
> 
>>> drivers/net/wireless/ath/ath10k/mac.c:7508:35: warning: 'struct 
>>> cfg80211_btcoex_priority' declared inside parameter list
>     ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority 
> *btcoex_priority)
>                                       ^
>>> drivers/net/wireless/ath/ath10k/mac.c:7508:35: warning: its scope is 
>>> only this definition or declaration, which is probably not what you 
>>> want
>    drivers/net/wireless/ath/ath10k/mac.c: In function
> 'ath10k_mac_get_btcoex_prio':
>>> drivers/net/wireless/ath/ath10k/mac.c:7512:21: error: dereferencing 
>>> pointer to incomplete type
>      if (btcoex_priority->wlan_be_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7513:18: error:
> 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7513:18: note: each
> undeclared identifier is reported only once for each function it
> appears in
>    drivers/net/wireless/ath/ath10k/mac.c:7515:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_bk_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7516:18: error:
> 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7518:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_vi_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7519:18: error:
> 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7521:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_vo_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7522:18: error:
> 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7524:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_beacon_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7525:18: error:
> 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7527:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_mgmt_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7528:18: error:
> 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c: At top level:
>    drivers/net/wireless/ath/ath10k/mac.c:7534:11: warning: 'struct
> cfg80211_btcoex_priority' declared inside parameter list
>        struct cfg80211_btcoex_priority *btcoex_priority)
>               ^
>    drivers/net/wireless/ath/ath10k/mac.c: In function
> 'ath10k_mac_op_set_btcoex_priority':
>>> drivers/net/wireless/ath/ath10k/mac.c:7553:16: warning: passing 
>>> argument 1 of 'ath10k_mac_get_btcoex_prio' from incompatible pointer 
>>> type
>      btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
>                    ^
>    drivers/net/wireless/ath/ath10k/mac.c:7508:1: note: expected
> 'struct cfg80211_btcoex_priority *' but argument is of type 'struct
> cfg80211_btcoex_priority *'
>     ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority 
> *btcoex_priority)
>     ^
>    drivers/net/wireless/ath/ath10k/mac.c: At top level:
>    drivers/net/wireless/ath/ath10k/mac.c:7611:2: error: unknown field
> 'set_btcoex' specified in initializer
>      .set_btcoex                     = ath10k_mac_op_set_btcoex,
>      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7611:2: warning:
> initialization from incompatible pointer type
>    drivers/net/wireless/ath/ath10k/mac.c:7611:2: warning: (near
> initialization for 'ath10k_ops.reconfig_complete')
>    drivers/net/wireless/ath/ath10k/mac.c:7612:2: error: unknown field
> 'set_btcoex_priority' specified in initializer
>      .set_btcoex_priority  = ath10k_mac_op_set_btcoex_priority,
>      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7612:2: warning:
> initialization from incompatible pointer type
>    drivers/net/wireless/ath/ath10k/mac.c:7612:2: warning: (near
> initialization for 'ath10k_ops.ipv6_addr_change')
>    drivers/net/wireless/ath/ath10k/mac.c: In function 
> 'ath10k_mac_register':
>    drivers/net/wireless/ath/ath10k/mac.c:8203:16: error: 'struct
> wiphy' has no member named 'btcoex_support_flags'
>       ar->hw->wiphy->btcoex_support_flags =
>                    ^
>    drivers/net/wireless/ath/ath10k/mac.c:8204:4: error:
> 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_BE_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8205:4: error:
> 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_BK_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8206:4: error:
> 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_VI_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8207:4: error:
> 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_VO_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8208:4: error:
> 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_BEACON_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8209:4: error:
> 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_MGMT_PREFERRED;
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8211:20: error: 'struct
> wiphy' has no member named 'btcoex_support_flags'
>           ar->hw->wiphy->btcoex_support_flags);
>                        ^
> 
This patch has dependency of "cfg80211: mac80211: BTCOEX feature 
support" patchset.

> vim +7512 drivers/net/wireless/ath/ath10k/mac.c
> 
>   7502		mutex_unlock(&ar->conf_mutex);
>   7503
>   7504		return ret;
>   7505	}
>   7506
>   7507	u32
>> 7508	ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority 
>> *btcoex_priority)
>   7509	{
>   7510		u32 btcoex_prio = 0;
>   7511
>> 7512		if (btcoex_priority->wlan_be_preferred)
>   7513			btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
>   7514
>   7515		if (btcoex_priority->wlan_bk_preferred)
>   7516			btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
>   7517
>   7518		if (btcoex_priority->wlan_vi_preferred)
>   7519			btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
>   7520
>   7521		if (btcoex_priority->wlan_vo_preferred)
>   7522			btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
>   7523
>   7524		if (btcoex_priority->wlan_beacon_preferred)
>   7525			btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
>   7526
>   7527		if (btcoex_priority->wlan_mgmt_preferred)
>> 7528			btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
>   7529
>   7530		return btcoex_prio;
>   7531	}
>   7532
>   7533	static int ath10k_mac_op_set_btcoex_priority(struct ieee80211_hw 
> *hw,
>   7534				struct cfg80211_btcoex_priority *btcoex_priority)
>   7535	{
>   7536		u32 btcoex_prio;
>   7537		struct ath10k *ar = hw->priv;
>   7538		int ret;
>   7539
>   7540		if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags))) {
>   7541			ret = -EINVAL;
>   7542			goto exit;
>   7543		}
>   7544
>   7545		mutex_lock(&ar->conf_mutex);
>   7546
>   7547		if (ar->state != ATH10K_STATE_ON &&
>   7548		    ar->state != ATH10K_STATE_RESTARTED) {
>   7549			ret = -ENETDOWN;
>   7550			goto exit;
>   7551		}
>   7552
>> 7553		btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
>   7554
>   7555		if (btcoex_prio > 0x3f)
>   7556			return -E2BIG;
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology 
> Center
> https://lists.01.org/pipermail/kbuild-all                   Intel 
> Corporation

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply

* [PATCH 4.4 09/69] ALSA: usb-audio: Add quirk for Syntek STK1160
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Marcel Hasler, Takashi Iwai
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Marcel Hasler <mahasler@gmail.com>

commit bdc3478f90cd4d2928197f36629d5cf93b64dbe9 upstream.

The stk1160 chip needs QUIRK_AUDIO_ALIGN_TRANSFER. This patch resolves
the issue reported on the mailing list
(http://marc.info/?l=linux-sound&m=139223599126215&w=2) and also fixes
bug 180071 (https://bugzilla.kernel.org/show_bug.cgi?id=180071).

Signed-off-by: Marcel Hasler <mahasler@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/quirks-table.h |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -2907,6 +2907,23 @@ AU0828_DEVICE(0x2040, 0x7260, "Hauppauge
 AU0828_DEVICE(0x2040, 0x7213, "Hauppauge", "HVR-950Q"),
 AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
 
+/* Syntek STK1160 */
+{
+	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
+		       USB_DEVICE_ID_MATCH_INT_CLASS |
+		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
+	.idVendor = 0x05e1,
+	.idProduct = 0x0408,
+	.bInterfaceClass = USB_CLASS_AUDIO,
+	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
+	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+		.vendor_name = "Syntek",
+		.product_name = "STK1160",
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_AUDIO_ALIGN_TRANSFER
+	}
+},
+
 /* Digidesign Mbox */
 {
 	/* Thanks to Clemens Ladisch <clemens@ladisch.de> */

^ permalink raw reply

* [PATCH 4.4 17/69] btrfs: fix races on root_log_ctx lists
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dave Jones, Chris Mason
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Chris Mason <clm@fb.com>

commit 570dd45042a7c8a7aba1ee029c5dd0f5ccf41b9b upstream.

btrfs_remove_all_log_ctxs takes a shortcut where it avoids walking the
list because it knows all of the waiters are patiently waiting for the
commit to finish.

But, there's a small race where btrfs_sync_log can remove itself from
the list if it finds a log commit is already done.  Also, it uses
list_del_init() to remove itself from the list, but there's no way to
know if btrfs_remove_all_log_ctxs has already run, so we don't know for
sure if it is safe to call list_del_init().

This gets rid of all the shortcuts for btrfs_remove_all_log_ctxs(), and
just calls it with the proper locking.

This is part two of the corruption fixed by cbd60aa7cd1.  I should have
done this in the first place, but convinced myself the optimizations were
safe.  A 12 hour run of dbench 2048 will eventually trigger a list debug
WARN_ON for the list_del_init() in btrfs_sync_log().

Fixes: d1433debe7f4346cf9fc0dafc71c3137d2a97bc4
Reported-by: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/btrfs/tree-log.c |   20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2696,14 +2696,12 @@ static inline void btrfs_remove_all_log_
 					     int index, int error)
 {
 	struct btrfs_log_ctx *ctx;
+	struct btrfs_log_ctx *safe;
 
-	if (!error) {
-		INIT_LIST_HEAD(&root->log_ctxs[index]);
-		return;
-	}
-
-	list_for_each_entry(ctx, &root->log_ctxs[index], list)
+	list_for_each_entry_safe(ctx, safe, &root->log_ctxs[index], list) {
+		list_del_init(&ctx->list);
 		ctx->log_ret = error;
+	}
 
 	INIT_LIST_HEAD(&root->log_ctxs[index]);
 }
@@ -2944,13 +2942,9 @@ int btrfs_sync_log(struct btrfs_trans_ha
 	mutex_unlock(&root->log_mutex);
 
 out_wake_log_root:
-	/*
-	 * We needn't get log_mutex here because we are sure all
-	 * the other tasks are blocked.
-	 */
+	mutex_lock(&log_root_tree->log_mutex);
 	btrfs_remove_all_log_ctxs(log_root_tree, index2, ret);
 
-	mutex_lock(&log_root_tree->log_mutex);
 	log_root_tree->log_transid_committed++;
 	atomic_set(&log_root_tree->log_commit[index2], 0);
 	mutex_unlock(&log_root_tree->log_mutex);
@@ -2961,10 +2955,8 @@ out_wake_log_root:
 	if (waitqueue_active(&log_root_tree->log_commit_wait[index2]))
 		wake_up(&log_root_tree->log_commit_wait[index2]);
 out:
-	/* See above. */
-	btrfs_remove_all_log_ctxs(root, index1, ret);
-
 	mutex_lock(&root->log_mutex);
+	btrfs_remove_all_log_ctxs(root, index1, ret);
 	root->log_transid_committed++;
 	atomic_set(&root->log_commit[index1], 0);
 	mutex_unlock(&root->log_mutex);

^ permalink raw reply

* Re: [PATCH 2/4] ath10k: Add support to update btcoex priority value via nl80211
From: Tamizh chelvam @ 2016-11-09 10:46 UTC (permalink / raw)
  To: kbuild test robot; +Cc: c_traja, kbuild-all, ath10k, linux-wireless
In-Reply-To: <201611090753.f8QniYub%fengguang.wu@intel.com>

On 2016-11-09 05:19, kbuild test robot wrote:
> Hi Tamizh,
> 
> [auto build test ERROR on ath6kl/ath-next]
> [cannot apply to v4.9-rc4 next-20161108]
> [if your patch is applied to the wrong git tree, please drop us a note
> to help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 
> ath-next
> config: xtensa-allmodconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 4.9.0
> reproduce:
>         wget
> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
> -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=xtensa
> 
> All error/warnings (new ones prefixed by >>):
> 
>>> drivers/net/wireless/ath/ath10k/mac.c:7508:35: warning: 'struct 
>>> cfg80211_btcoex_priority' declared inside parameter list
>     ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority 
> *btcoex_priority)
>                                       ^
>>> drivers/net/wireless/ath/ath10k/mac.c:7508:35: warning: its scope is 
>>> only this definition or declaration, which is probably not what you 
>>> want
>    drivers/net/wireless/ath/ath10k/mac.c: In function
> 'ath10k_mac_get_btcoex_prio':
>>> drivers/net/wireless/ath/ath10k/mac.c:7512:21: error: dereferencing 
>>> pointer to incomplete type
>      if (btcoex_priority->wlan_be_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7513:18: error:
> 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7513:18: note: each
> undeclared identifier is reported only once for each function it
> appears in
>    drivers/net/wireless/ath/ath10k/mac.c:7515:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_bk_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7516:18: error:
> 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7518:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_vi_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7519:18: error:
> 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7521:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_vo_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7522:18: error:
> 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7524:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_beacon_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7525:18: error:
> 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7527:21: error: dereferencing
> pointer to incomplete type
>      if (btcoex_priority->wlan_mgmt_preferred)
>                         ^
>    drivers/net/wireless/ath/ath10k/mac.c:7528:18: error:
> 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
>       btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
>                      ^
>    drivers/net/wireless/ath/ath10k/mac.c: At top level:
>    drivers/net/wireless/ath/ath10k/mac.c:7534:11: warning: 'struct
> cfg80211_btcoex_priority' declared inside parameter list
>        struct cfg80211_btcoex_priority *btcoex_priority)
>               ^
>    drivers/net/wireless/ath/ath10k/mac.c: In function
> 'ath10k_mac_op_set_btcoex_priority':
>>> drivers/net/wireless/ath/ath10k/mac.c:7553:16: warning: passing 
>>> argument 1 of 'ath10k_mac_get_btcoex_prio' from incompatible pointer 
>>> type
>      btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
>                    ^
>    drivers/net/wireless/ath/ath10k/mac.c:7508:1: note: expected
> 'struct cfg80211_btcoex_priority *' but argument is of type 'struct
> cfg80211_btcoex_priority *'
>     ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority 
> *btcoex_priority)
>     ^
>    drivers/net/wireless/ath/ath10k/mac.c: At top level:
>    drivers/net/wireless/ath/ath10k/mac.c:7611:2: error: unknown field
> 'set_btcoex' specified in initializer
>      .set_btcoex                     = ath10k_mac_op_set_btcoex,
>      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7611:2: warning:
> initialization from incompatible pointer type
>    drivers/net/wireless/ath/ath10k/mac.c:7611:2: warning: (near
> initialization for 'ath10k_ops.reconfig_complete')
>    drivers/net/wireless/ath/ath10k/mac.c:7612:2: error: unknown field
> 'set_btcoex_priority' specified in initializer
>      .set_btcoex_priority  = ath10k_mac_op_set_btcoex_priority,
>      ^
>    drivers/net/wireless/ath/ath10k/mac.c:7612:2: warning:
> initialization from incompatible pointer type
>    drivers/net/wireless/ath/ath10k/mac.c:7612:2: warning: (near
> initialization for 'ath10k_ops.ipv6_addr_change')
>    drivers/net/wireless/ath/ath10k/mac.c: In function 
> 'ath10k_mac_register':
>    drivers/net/wireless/ath/ath10k/mac.c:8203:16: error: 'struct
> wiphy' has no member named 'btcoex_support_flags'
>       ar->hw->wiphy->btcoex_support_flags =
>                    ^
>    drivers/net/wireless/ath/ath10k/mac.c:8204:4: error:
> 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_BE_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8205:4: error:
> 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_BK_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8206:4: error:
> 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_VI_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8207:4: error:
> 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_VO_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8208:4: error:
> 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_BEACON_PREFERRED |
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8209:4: error:
> 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
>        WIPHY_WLAN_MGMT_PREFERRED;
>        ^
>    drivers/net/wireless/ath/ath10k/mac.c:8211:20: error: 'struct
> wiphy' has no member named 'btcoex_support_flags'
>           ar->hw->wiphy->btcoex_support_flags);
>                        ^
> 
This patch has dependency of "cfg80211: mac80211: BTCOEX feature 
support" patchset.

> vim +7512 drivers/net/wireless/ath/ath10k/mac.c
> 
>   7502		mutex_unlock(&ar->conf_mutex);
>   7503
>   7504		return ret;
>   7505	}
>   7506
>   7507	u32
>> 7508	ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority 
>> *btcoex_priority)
>   7509	{
>   7510		u32 btcoex_prio = 0;
>   7511
>> 7512		if (btcoex_priority->wlan_be_preferred)
>   7513			btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
>   7514
>   7515		if (btcoex_priority->wlan_bk_preferred)
>   7516			btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
>   7517
>   7518		if (btcoex_priority->wlan_vi_preferred)
>   7519			btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
>   7520
>   7521		if (btcoex_priority->wlan_vo_preferred)
>   7522			btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
>   7523
>   7524		if (btcoex_priority->wlan_beacon_preferred)
>   7525			btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
>   7526
>   7527		if (btcoex_priority->wlan_mgmt_preferred)
>> 7528			btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
>   7529
>   7530		return btcoex_prio;
>   7531	}
>   7532
>   7533	static int ath10k_mac_op_set_btcoex_priority(struct ieee80211_hw 
> *hw,
>   7534				struct cfg80211_btcoex_priority *btcoex_priority)
>   7535	{
>   7536		u32 btcoex_prio;
>   7537		struct ath10k *ar = hw->priv;
>   7538		int ret;
>   7539
>   7540		if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags))) {
>   7541			ret = -EINVAL;
>   7542			goto exit;
>   7543		}
>   7544
>   7545		mutex_lock(&ar->conf_mutex);
>   7546
>   7547		if (ar->state != ATH10K_STATE_ON &&
>   7548		    ar->state != ATH10K_STATE_RESTARTED) {
>   7549			ret = -ENETDOWN;
>   7550			goto exit;
>   7551		}
>   7552
>> 7553		btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
>   7554
>   7555		if (btcoex_prio > 0x3f)
>   7556			return -E2BIG;
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology 
> Center
> https://lists.01.org/pipermail/kbuild-all                   Intel 
> Corporation

^ permalink raw reply

* [PATCH 4.4 14/69] ALSA: hda - Fix headset mic detection problem for two Dell laptops
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hui Wang, Takashi Iwai
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hui Wang <hui.wang@canonical.com>

commit 6aecd8715802d23dc6a0859b50c62d2b0a99de3a upstream.

They uses the codec ALC255, and have the different pin cfg definition
from the ones in the existing pin quirk table. Now adding them into
the table to fix the problem.

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>

---
 sound/pci/hda/patch_realtek.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5839,11 +5839,19 @@ static const struct snd_hda_pin_quirk al
 		{0x1b, 0x02011020},
 		{0x21, 0x0221101f}),
 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+		{0x14, 0x90170110},
+		{0x1b, 0x01011020},
+		{0x21, 0x0221101f}),
+	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
 		{0x14, 0x90170130},
 		{0x1b, 0x01014020},
 		{0x21, 0x0221103f}),
 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
 		{0x14, 0x90170130},
+		{0x1b, 0x01011020},
+		{0x21, 0x0221103f}),
+	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+		{0x14, 0x90170130},
 		{0x1b, 0x02011020},
 		{0x21, 0x0221103f}),
 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,

^ permalink raw reply

* [PATCH 4.4 35/69] KVM: MIPS: Make ERET handle ERL before EXL
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, James Hogan, Paolo Bonzini,
	Radim Krčmář, Ralf Baechle, linux-mips, kvm
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: James Hogan <james.hogan@imgtec.com>

commit ede5f3e7b54a4347be4d8525269eae50902bd7cd upstream.

The ERET instruction to return from exception is used for returning from
exception level (Status.EXL) and error level (Status.ERL). If both bits
are set however we should be returning from ERL first, as ERL can
interrupt EXL, for example when an NMI is taken. KVM however checks EXL
first.

Fix the order of the checks to match the pseudocode in the instruction
set manual.

Fixes: e685c689f3a8 ("KVM/MIPS32: Privileged instruction/target branch emulation.")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <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>

---
 arch/mips/kvm/emulate.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -752,15 +752,15 @@ enum emulation_result kvm_mips_emul_eret
 	struct mips_coproc *cop0 = vcpu->arch.cop0;
 	enum emulation_result er = EMULATE_DONE;
 
-	if (kvm_read_c0_guest_status(cop0) & ST0_EXL) {
+	if (kvm_read_c0_guest_status(cop0) & ST0_ERL) {
+		kvm_clear_c0_guest_status(cop0, ST0_ERL);
+		vcpu->arch.pc = kvm_read_c0_guest_errorepc(cop0);
+	} else if (kvm_read_c0_guest_status(cop0) & ST0_EXL) {
 		kvm_debug("[%#lx] ERET to %#lx\n", vcpu->arch.pc,
 			  kvm_read_c0_guest_epc(cop0));
 		kvm_clear_c0_guest_status(cop0, ST0_EXL);
 		vcpu->arch.pc = kvm_read_c0_guest_epc(cop0);
 
-	} else if (kvm_read_c0_guest_status(cop0) & ST0_ERL) {
-		kvm_clear_c0_guest_status(cop0, ST0_ERL);
-		vcpu->arch.pc = kvm_read_c0_guest_errorepc(cop0);
 	} else {
 		kvm_err("[%#lx] ERET when MIPS_SR_EXL|MIPS_SR_ERL == 0\n",
 			vcpu->arch.pc);

^ permalink raw reply

* [PATCH 4.4 12/69] ALSA: hda - allow 40 bit DMA mask for NVidia devices
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ard Biesheuvel, Takashi Iwai
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

commit 3ab7511eafdd5c4f40d2832f09554478dfbea170 upstream.

Commit 49d9e77e72cf ("ALSA: hda - Fix system panic when DMA > 40 bits
for Nvidia audio controllers") simply disabled any DMA exceeding 32
bits for NVidia devices, even though they are capable of performing
DMA up to 40 bits. On some architectures (such as arm64), system memory
is not guaranteed to be 32-bit addressable by PCI devices, and so this
change prevents NVidia devices from working on platforms such as AMD
Seattle.

Since the original commit already mentioned that up to 40 bits of DMA
is supported, and given that the code has been updated in the meantime
to support a 40 bit DMA mask on other devices, revert commit 49d9e77e72cf
and explicitly set the DMA mask to 40 bits for NVidia devices.

Fixes: 49d9e77e72cf ('ALSA: hda - Fix system panic when DMA > 40 bits...')
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_intel.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -334,8 +334,7 @@ enum {
 
 /* quirks for Nvidia */
 #define AZX_DCAPS_PRESET_NVIDIA \
-	(AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
-	 AZX_DCAPS_NO_64BIT | AZX_DCAPS_CORBRP_SELF_CLEAR |\
+	(AZX_DCAPS_NO_MSI | AZX_DCAPS_CORBRP_SELF_CLEAR |\
 	 AZX_DCAPS_SNOOP_TYPE(NVIDIA))
 
 #define AZX_DCAPS_PRESET_CTHDA \
@@ -1725,6 +1724,10 @@ static int azx_first_init(struct azx *ch
 		}
 	}
 
+	/* NVidia hardware normally only supports up to 40 bits of DMA */
+	if (chip->pci->vendor == PCI_VENDOR_ID_NVIDIA)
+		dma_bits = 40;
+
 	/* disable 64bit DMA address on some devices */
 	if (chip->driver_caps & AZX_DCAPS_NO_64BIT) {
 		dev_dbg(card->dev, "Disabling 64bit DMA\n");

^ permalink raw reply

* [PATCH 4.4 33/69] dm: free io_barrier after blk_cleanup_queue call
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tahsin Erdogan, Mike Snitzer
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tahsin Erdogan <tahsin@google.com>

commit d09960b0032174eb493c4c13be5b9c9ef36dc9a7 upstream.

dm_old_request_fn() has paths that access md->io_barrier.  The party
destroying io_barrier should ensure that no future execution of
dm_old_request_fn() is possible.  Move io_barrier destruction to below
blk_cleanup_queue() to ensure this and avoid a NULL pointer crash during
request-based DM device shutdown.

Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/dm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2260,8 +2260,6 @@ static void cleanup_mapped_device(struct
 	if (md->bs)
 		bioset_free(md->bs);
 
-	cleanup_srcu_struct(&md->io_barrier);
-
 	if (md->disk) {
 		spin_lock(&_minor_lock);
 		md->disk->private_data = NULL;
@@ -2273,6 +2271,8 @@ static void cleanup_mapped_device(struct
 	if (md->queue)
 		blk_cleanup_queue(md->queue);
 
+	cleanup_srcu_struct(&md->io_barrier);
+
 	if (md->bdev) {
 		bdput(md->bdev);
 		md->bdev = NULL;

^ permalink raw reply

* [Qemu-devel] [PATCH] test-replication: fix leaks
From: Marc-André Lureau @ 2016-11-09 10:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, xiecl.fnst, Marc-André Lureau

ASAN spotted:
SUMMARY: AddressSanitizer: 301990288 byte(s) leaked in 33 allocation(s).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/test-replication.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/test-replication.c b/tests/test-replication.c
index 0997bd8..fac2da3 100644
--- a/tests/test-replication.c
+++ b/tests/test-replication.c
@@ -85,6 +85,8 @@ static void test_blk_read(BlockBackend *blk, long pattern,
     }
 
     g_free(pattern_buf);
+    g_free(cmp_buf);
+    qemu_iovec_destroy(&qiov);
 }
 
 static void test_blk_write(BlockBackend *blk, long pattern, int64_t offset,
@@ -116,6 +118,7 @@ static void test_blk_write(BlockBackend *blk, long pattern, int64_t offset,
     }
 
     g_free(pattern_buf);
+    qemu_iovec_destroy(&qiov);
 }
 
 /*
-- 
2.10.0

^ permalink raw reply related

* [PATCH 4.4 32/69] USB: serial: cp210x: fix tiocmget error handling
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hovold <johan@kernel.org>

commit de24e0a108bc48062e1c7acaa97014bce32a919f upstream.

The current tiocmget implementation would fail to report errors up the
stack and instead leaked a few bits from the stack as a mask of
modem-status flags.

Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -845,7 +845,9 @@ static int cp210x_tiocmget(struct tty_st
 	unsigned int control;
 	int result;
 
-	cp210x_get_config(port, CP210X_GET_MDMSTS, &control, 1);
+	result = cp210x_get_config(port, CP210X_GET_MDMSTS, &control, 1);
+	if (result)
+		return result;
 
 	result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
 		|((control & CONTROL_RTS) ? TIOCM_RTS : 0)

^ permalink raw reply

* [PATCH 4.4 30/69] xhci: add restart quirk for Intel Wildcatpoint PCH
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hasan Mahmood, Mathias Nyman
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mathias Nyman <mathias.nyman@linux.intel.com>

commit 4c39135aa412d2f1381e43802523da110ca7855c upstream.

xHC in Wildcatpoint-LP PCH is similar to LynxPoint-LP and need the
same quirks to prevent machines from spurious restart while
shutting them down.

Reported-by: Hasan Mahmood <hasan.mahm@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/xhci-pci.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -45,6 +45,7 @@
 
 #define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI	0x8c31
 #define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI	0x9c31
+#define PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_XHCI	0x9cb1
 #define PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI		0x22b5
 #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI		0xa12f
 #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI	0x9d2f
@@ -154,7 +155,8 @@ static void xhci_pci_quirks(struct devic
 		xhci->quirks |= XHCI_SPURIOUS_REBOOT;
 	}
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
-		pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI) {
+		(pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI ||
+		 pdev->device == PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_XHCI)) {
 		xhci->quirks |= XHCI_SPURIOUS_REBOOT;
 		xhci->quirks |= XHCI_SPURIOUS_WAKEUP;
 	}

^ permalink raw reply

* [PATCH 4.4 28/69] vt: clear selection before resizing
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Scot Doyle
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Scot Doyle <lkml14@scotdoyle.com>

commit 009e39ae44f4191188aeb6dfbf661b771dbbe515 upstream.

When resizing a vt its selection may exceed the new size, resulting in
an invalid memory access [1]. Clear the selection before resizing.

[1] http://lkml.kernel.org/r/CACT4Y+acDTwy4umEvf5ROBGiRJNrxHN4Cn5szCXE5Jw-d1B=Xw@mail.gmail.com

Reported-and-tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/vt/vt.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -876,6 +876,9 @@ static int vc_do_resize(struct tty_struc
 	if (!newscreen)
 		return -ENOMEM;
 
+	if (vc == sel_cons)
+		clear_selection();
+
 	old_rows = vc->vc_rows;
 	old_row_size = vc->vc_size_row;
 

^ permalink raw reply

* [PATCH 4.4 11/69] ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit 7d9a180895ee8c301df7f9447429009795c56c21 upstream.

AZX_DCAPS_RIRB_DELAY is dedicated only for Nvidia and its purpose is
just to set a flag in bus.  So it's better to be set in the toplevel
driver, either hda_intel.c or hda_tegra.c, instead of the common
hda_controller.c.  This also allows us to strip this flag from dcaps,
so save one more bit there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_controller.c |    5 -----
 sound/pci/hda/hda_controller.h |    2 +-
 sound/pci/hda/hda_intel.c      |    7 ++++++-
 sound/pci/hda/hda_tegra.c      |    5 +++--
 4 files changed, 10 insertions(+), 9 deletions(-)

--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1055,11 +1055,6 @@ int azx_bus_init(struct azx *chip, const
 	if (chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)
 		bus->core.corbrp_self_clear = true;
 
-	if (chip->driver_caps & AZX_DCAPS_RIRB_DELAY) {
-		dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");
-		bus->needs_damn_long_delay = 1;
-	}
-
 	if (chip->driver_caps & AZX_DCAPS_4K_BDLE_BOUNDARY)
 		bus->core.align_bdle_4k = true;
 
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -32,7 +32,7 @@
 #define AZX_DCAPS_NO_MSI	(1 << 9)	/* No MSI support */
 #define AZX_DCAPS_SNOOP_MASK	(3 << 10)	/* snoop type mask */
 #define AZX_DCAPS_SNOOP_OFF	(1 << 12)	/* snoop default off */
-#define AZX_DCAPS_RIRB_DELAY	(1 << 13)	/* Long delay in read loop */
+/* 13 unused */
 /* 14 unused */
 #define AZX_DCAPS_CTX_WORKAROUND (1 << 15)	/* X-Fi workaround */
 #define AZX_DCAPS_POSFIX_LPIB	(1 << 16)	/* Use LPIB as default */
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -334,7 +334,7 @@ enum {
 
 /* quirks for Nvidia */
 #define AZX_DCAPS_PRESET_NVIDIA \
-	(AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
+	(AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
 	 AZX_DCAPS_NO_64BIT | AZX_DCAPS_CORBRP_SELF_CLEAR |\
 	 AZX_DCAPS_SNOOP_TYPE(NVIDIA))
 
@@ -1637,6 +1637,11 @@ static int azx_create(struct snd_card *c
 		return err;
 	}
 
+	if (chip->driver_type == AZX_DRIVER_NVIDIA) {
+		dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");
+		chip->bus.needs_damn_long_delay = 1;
+	}
+
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
 	if (err < 0) {
 		dev_err(card->dev, "Error creating device [card]!\n");
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -464,6 +464,8 @@ static int hda_tegra_create(struct snd_c
 	if (err < 0)
 		return err;
 
+	chip->bus.needs_damn_long_delay = 1;
+
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
 	if (err < 0) {
 		dev_err(card->dev, "Error creating device\n");
@@ -481,8 +483,7 @@ MODULE_DEVICE_TABLE(of, hda_tegra_match)
 
 static int hda_tegra_probe(struct platform_device *pdev)
 {
-	const unsigned int driver_flags = AZX_DCAPS_RIRB_DELAY |
-					  AZX_DCAPS_CORBRP_SELF_CLEAR;
+	const unsigned int driver_flags = AZX_DCAPS_CORBRP_SELF_CLEAR;
 	struct snd_card *card;
 	struct azx *chip;
 	struct hda_tegra *hda;

^ permalink raw reply

* Re: [PATCH 1/4] ath10k: Add support to enable or disable btcoex via nl80211
From: Tamizh chelvam @ 2016-11-09 10:45 UTC (permalink / raw)
  To: kbuild test robot; +Cc: c_traja, linux-wireless, kbuild-all, ath10k
In-Reply-To: <201611090758.VuakpqyK%fengguang.wu@intel.com>

On 2016-11-09 04:50, kbuild test robot wrote:
> Hi Tamizh,
> 
> [auto build test WARNING on ath6kl/ath-next]
> [also build test WARNING on v4.9-rc4 next-20161108]
> [if your patch is applied to the wrong git tree, please drop us a note
> to help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 
> ath-next
> config: xtensa-allmodconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 4.9.0
> reproduce:
>         wget
> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
> -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=xtensa
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/net/wireless/ath/ath10k/mac.c:7548:2: error: unknown field
> 'set_btcoex' specified in initializer
>      .set_btcoex                     = ath10k_mac_op_set_btcoex,
>      ^
>>> drivers/net/wireless/ath/ath10k/mac.c:7548:2: warning: initialization 
>>> from incompatible pointer type
>    drivers/net/wireless/ath/ath10k/mac.c:7548:2: warning: (near
> initialization for 'ath10k_ops.reconfig_complete')

This patch has dependency of "cfg80211: mac80211: BTCOEX feature 
support" patchset.
> 
> vim +7548 drivers/net/wireless/ath/ath10k/mac.c
> 
>   7532		.reconfig_complete		= ath10k_reconfig_complete,
>   7533		.get_survey			= ath10k_get_survey,
>   7534		.set_bitrate_mask		= ath10k_mac_op_set_bitrate_mask,
>   7535		.sta_rc_update			= ath10k_sta_rc_update,
>   7536		.get_tsf			= ath10k_get_tsf,
>   7537		.set_tsf			= ath10k_set_tsf,
>   7538		.ampdu_action			= ath10k_ampdu_action,
>   7539		.get_et_sset_count		= ath10k_debug_get_et_sset_count,
>   7540		.get_et_stats			= ath10k_debug_get_et_stats,
>   7541		.get_et_strings			= ath10k_debug_get_et_strings,
>   7542		.add_chanctx			= ath10k_mac_op_add_chanctx,
>   7543		.remove_chanctx			= ath10k_mac_op_remove_chanctx,
>   7544		.change_chanctx			= ath10k_mac_op_change_chanctx,
>   7545		.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
>   7546		.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
>   7547		.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
>> 7548		.set_btcoex                     = ath10k_mac_op_set_btcoex,
>   7549
>   7550		CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
>   7551
>   7552	#ifdef CONFIG_PM
>   7553		.suspend			= ath10k_wow_op_suspend,
>   7554		.resume				= ath10k_wow_op_resume,
>   7555	#endif
>   7556	#ifdef CONFIG_MAC80211_DEBUGFS
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology 
> Center
> https://lists.01.org/pipermail/kbuild-all                   Intel 
> Corporation

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply

* 35911 linux-i2c
From: lcrumly @ 2016-11-09 10:45 UTC (permalink / raw)
  To: linux-i2c

[-- Attachment #1: MESSAGE_551535988129_linux-i2c.zip --]
[-- Type: application/zip, Size: 3915 bytes --]

^ permalink raw reply

* [PATCH 4.4 26/69] GenWQE: Fix bad page access during abort of resource allocation
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Gerald Schaefer, Frank Haverkamp
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gerald Schaefer <gerald.schaefer@de.ibm.com>

commit a7a7aeefbca2982586ba2c9fd7739b96416a6d1d upstream.

When interrupting an application which was allocating DMAable
memory, it was possible, that the DMA memory was deallocated
twice, leading to the error symptoms below.

Thanks to Gerald, who analyzed the problem and provided this
patch.

I agree with his analysis of the problem: ddcb_cmd_fixups() ->
genwqe_alloc_sync_sgl() (fails in f/lpage, but sgl->sgl != NULL
and f/lpage maybe also != NULL) -> ddcb_cmd_cleanup() ->
genwqe_free_sync_sgl() (double free, because sgl->sgl != NULL and
f/lpage maybe also != NULL)

In this scenario we would have exactly the kind of double free that
would explain the WARNING / Bad page state, and as expected it is
caused by broken error handling (cleanup).

Using the Ubuntu git source, tag Ubuntu-4.4.0-33.52, he was able to reproduce
the "Bad page state" issue, and with the patch on top he could not reproduce
it any more.

------------[ cut here ]------------
WARNING: at /build/linux-o03cxz/linux-4.4.0/arch/s390/include/asm/pci_dma.h:141
Modules linked in: qeth_l2 ghash_s390 prng aes_s390 des_s390 des_generic sha512_s390 sha256_s390 sha1_s390 sha_common genwqe_card qeth crc_itu_t qdio ccwgroup vmur dm_multipath dasd_eckd_mod dasd_mod
CPU: 2 PID: 3293 Comm: genwqe_gunzip Not tainted 4.4.0-33-generic #52-Ubuntu
task: 0000000032c7e270 ti: 00000000324e4000 task.ti: 00000000324e4000
Krnl PSW : 0404c00180000000 0000000000156346 (dma_update_cpu_trans+0x9e/0xa8)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3
Krnl GPRS: 00000000324e7bcd 0000000000c3c34a 0000000027628298 000000003215b400
           0000000000000400 0000000000001fff 0000000000000400 0000000116853000
           07000000324e7b1e 0000000000000001 0000000000000001 0000000000000001
           0000000000001000 0000000116854000 0000000000156402 00000000324e7a38
Krnl Code: 000000000015633a: 95001000           cli     0(%r1),0
           000000000015633e: a774ffc3           brc     7,1562c4
          #0000000000156342: a7f40001           brc     15,156344
          >0000000000156346: 92011000           mvi     0(%r1),1
           000000000015634a: a7f4ffbd           brc     15,1562c4
           000000000015634e: 0707               bcr     0,%r7
           0000000000156350: c00400000000       brcl    0,156350
           0000000000156356: eb7ff0500024       stmg    %r7,%r15,80(%r15)
Call Trace:
([<00000000001563e0>] dma_update_trans+0x90/0x228)
 [<00000000001565dc>] s390_dma_unmap_pages+0x64/0x160
 [<00000000001567c2>] s390_dma_free+0x62/0x98
 [<000003ff801310ce>] __genwqe_free_consistent+0x56/0x70 [genwqe_card]
 [<000003ff801316d0>] genwqe_free_sync_sgl+0xf8/0x160 [genwqe_card]
 [<000003ff8012bd6e>] ddcb_cmd_cleanup+0x86/0xa8 [genwqe_card]
 [<000003ff8012c1c0>] do_execute_ddcb+0x110/0x348 [genwqe_card]
 [<000003ff8012c914>] genwqe_ioctl+0x51c/0xc20 [genwqe_card]
 [<000000000032513a>] do_vfs_ioctl+0x3b2/0x518
 [<0000000000325344>] SyS_ioctl+0xa4/0xb8
 [<00000000007b86c6>] system_call+0xd6/0x264
 [<000003ff9e8e520a>] 0x3ff9e8e520a
Last Breaking-Event-Address:
 [<0000000000156342>] dma_update_cpu_trans+0x9a/0xa8
---[ end trace 35996336235145c8 ]---
BUG: Bad page state in process jbd2/dasdb1-8  pfn:3215b
page:000003d100c856c0 count:-1 mapcount:0 mapping:          (null) index:0x0
flags: 0x3fffc0000000000()
page dumped because: nonzero _count

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/genwqe/card_utils.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--- a/drivers/misc/genwqe/card_utils.c
+++ b/drivers/misc/genwqe/card_utils.c
@@ -352,17 +352,27 @@ int genwqe_alloc_sync_sgl(struct genwqe_
 		if (copy_from_user(sgl->lpage, user_addr + user_size -
 				   sgl->lpage_size, sgl->lpage_size)) {
 			rc = -EFAULT;
-			goto err_out1;
+			goto err_out2;
 		}
 	}
 	return 0;
 
+ err_out2:
+	__genwqe_free_consistent(cd, PAGE_SIZE, sgl->lpage,
+				 sgl->lpage_dma_addr);
+	sgl->lpage = NULL;
+	sgl->lpage_dma_addr = 0;
  err_out1:
 	__genwqe_free_consistent(cd, PAGE_SIZE, sgl->fpage,
 				 sgl->fpage_dma_addr);
+	sgl->fpage = NULL;
+	sgl->fpage_dma_addr = 0;
  err_out:
 	__genwqe_free_consistent(cd, sgl->sgl_size, sgl->sgl,
 				 sgl->sgl_dma_addr);
+	sgl->sgl = NULL;
+	sgl->sgl_dma_addr = 0;
+	sgl->sgl_size = 0;
 	return -ENOMEM;
 }
 

^ permalink raw reply

* [PATCH 4.4 24/69] xhci: use default USB_RESUME_TIMEOUT when resuming ports.
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mathias Nyman
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mathias Nyman <mathias.nyman@linux.intel.com>

commit 7d3b016a6f5a0fa610dfd02b05654c08fa4ae514 upstream.

USB2 host inititated resume, and system suspend bus resume
need to use the same USB_RESUME_TIMEOUT as elsewhere.

This resolves a device disconnect issue at system resume seen
on Intel Braswell and Apollolake, but is in no way limited to
those platforms.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/xhci-hub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -1157,7 +1157,7 @@ int xhci_hub_control(struct usb_hcd *hcd
 				xhci_set_link_state(xhci, port_array, wIndex,
 							XDEV_RESUME);
 				spin_unlock_irqrestore(&xhci->lock, flags);
-				msleep(20);
+				msleep(USB_RESUME_TIMEOUT);
 				spin_lock_irqsave(&xhci->lock, flags);
 				xhci_set_link_state(xhci, port_array, wIndex,
 							XDEV_U0);
@@ -1401,7 +1401,7 @@ int xhci_bus_resume(struct usb_hcd *hcd)
 
 	if (need_usb2_u3_exit) {
 		spin_unlock_irqrestore(&xhci->lock, flags);
-		msleep(20);
+		msleep(USB_RESUME_TIMEOUT);
 		spin_lock_irqsave(&xhci->lock, flags);
 	}
 

^ permalink raw reply

* [PATCH 4.4 23/69] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Stefan Tauner, Johan Hovold
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stefan Tauner <stefan.tauner@technikum-wien.at>

commit ca006f785fbfd7a5c901900bd3fe2b26e946a1ee upstream.

This adds support to ftdi_sio for the Infineon TriBoard TC2X7
engineering board for first-generation Aurix SoCs with Tricore CPUs.
Mere addition of the device IDs does the job.

Signed-off-by: Stefan Tauner <stefan.tauner@technikum-wien.at>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/ftdi_sio.c     |    3 ++-
 drivers/usb/serial/ftdi_sio_ids.h |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -986,7 +986,8 @@ static const struct usb_device_id id_tab
 	/* ekey Devices */
 	{ USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) },
 	/* Infineon Devices */
-	{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) },
+	{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC1798_PID, 1) },
+	{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC2X7_PID, 1) },
 	/* GE Healthcare devices */
 	{ USB_DEVICE(GE_HEALTHCARE_VID, GE_HEALTHCARE_NEMO_TRACKER_PID) },
 	/* Active Research (Actisense) devices */
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -626,8 +626,9 @@
 /*
  * Infineon Technologies
  */
-#define INFINEON_VID		0x058b
-#define INFINEON_TRIBOARD_PID	0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
+#define INFINEON_VID		        0x058b
+#define INFINEON_TRIBOARD_TC1798_PID	0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
+#define INFINEON_TRIBOARD_TC2X7_PID	0x0043 /* DAS JTAG TriBoard TC2X7 V1.0 */
 
 /*
  * Acton Research Corp.

^ permalink raw reply

* [PATCH 4.4 22/69] USB: serial: fix potential NULL-dereference at probe
From: Greg Kroah-Hartman @ 2016-11-09 10:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hovold <johan@kernel.org>

commit 126d26f66d9890a69158812a6caa248c05359daa upstream.

Make sure we have at least one port before attempting to register a
console.

Currently, at least one driver binds to a "dummy" interface and requests
zero ports for it. Should such an interface also lack endpoints, we get
a NULL-deref during probe.

Fixes: e5b1e2062e05 ("USB: serial: make minor allocation dynamic")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/usb-serial.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1077,7 +1077,8 @@ static int usb_serial_probe(struct usb_i
 
 	serial->disconnected = 0;
 
-	usb_serial_console_init(serial->port[0]->minor);
+	if (num_ports > 0)
+		usb_serial_console_init(serial->port[0]->minor);
 exit:
 	module_put(type->driver.owner);
 	return 0;

^ permalink raw reply

* Re: [PATCH 1/4] ath10k: Add support to enable or disable btcoex via nl80211
From: Tamizh chelvam @ 2016-11-09 10:45 UTC (permalink / raw)
  To: kbuild test robot; +Cc: c_traja, kbuild-all, ath10k, linux-wireless
In-Reply-To: <201611090758.VuakpqyK%fengguang.wu@intel.com>

On 2016-11-09 04:50, kbuild test robot wrote:
> Hi Tamizh,
> 
> [auto build test WARNING on ath6kl/ath-next]
> [also build test WARNING on v4.9-rc4 next-20161108]
> [if your patch is applied to the wrong git tree, please drop us a note
> to help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 
> ath-next
> config: xtensa-allmodconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 4.9.0
> reproduce:
>         wget
> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
> -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=xtensa
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/net/wireless/ath/ath10k/mac.c:7548:2: error: unknown field
> 'set_btcoex' specified in initializer
>      .set_btcoex                     = ath10k_mac_op_set_btcoex,
>      ^
>>> drivers/net/wireless/ath/ath10k/mac.c:7548:2: warning: initialization 
>>> from incompatible pointer type
>    drivers/net/wireless/ath/ath10k/mac.c:7548:2: warning: (near
> initialization for 'ath10k_ops.reconfig_complete')

This patch has dependency of "cfg80211: mac80211: BTCOEX feature 
support" patchset.
> 
> vim +7548 drivers/net/wireless/ath/ath10k/mac.c
> 
>   7532		.reconfig_complete		= ath10k_reconfig_complete,
>   7533		.get_survey			= ath10k_get_survey,
>   7534		.set_bitrate_mask		= ath10k_mac_op_set_bitrate_mask,
>   7535		.sta_rc_update			= ath10k_sta_rc_update,
>   7536		.get_tsf			= ath10k_get_tsf,
>   7537		.set_tsf			= ath10k_set_tsf,
>   7538		.ampdu_action			= ath10k_ampdu_action,
>   7539		.get_et_sset_count		= ath10k_debug_get_et_sset_count,
>   7540		.get_et_stats			= ath10k_debug_get_et_stats,
>   7541		.get_et_strings			= ath10k_debug_get_et_strings,
>   7542		.add_chanctx			= ath10k_mac_op_add_chanctx,
>   7543		.remove_chanctx			= ath10k_mac_op_remove_chanctx,
>   7544		.change_chanctx			= ath10k_mac_op_change_chanctx,
>   7545		.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
>   7546		.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
>   7547		.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
>> 7548		.set_btcoex                     = ath10k_mac_op_set_btcoex,
>   7549
>   7550		CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
>   7551
>   7552	#ifdef CONFIG_PM
>   7553		.suspend			= ath10k_wow_op_suspend,
>   7554		.resume				= ath10k_wow_op_resume,
>   7555	#endif
>   7556	#ifdef CONFIG_MAC80211_DEBUGFS
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology 
> Center
> https://lists.01.org/pipermail/kbuild-all                   Intel 
> Corporation

^ permalink raw reply

* [PATCH 4.4 19/69] ubifs: Fix regression in ubifs_readdir()
From: Greg Kroah-Hartman @ 2016-11-09 10:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Rosin, Ralph Sennhauser,
	Richard Weinberger
In-Reply-To: <20161109102901.127641653@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Richard Weinberger <richard@nod.at>

commit a00052a296e54205cf238c75bd98d17d5d02a6db upstream.

Commit c83ed4c9dbb35 ("ubifs: Abort readdir upon error") broke
overlayfs support because the fix exposed an internal error
code to VFS.

Reported-by: Peter Rosin <peda@axentia.se>
Tested-by: Peter Rosin <peda@axentia.se>
Reported-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Tested-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Fixes: c83ed4c9dbb35 ("ubifs: Abort readdir upon error")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ubifs/dir.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -454,6 +454,14 @@ out:
 
 	if (err != -ENOENT)
 		ubifs_err(c, "cannot find next direntry, error %d", err);
+	else
+		/*
+		 * -ENOENT is a non-fatal error in this context, the TNC uses
+		 * it to indicate that the cursor moved past the current directory
+		 * and readdir() has to stop.
+		 */
+		err = 0;
+
 
 	/* 2 is a special value indicating that there are no more direntries */
 	ctx->pos = 2;

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.