This is a note to let you know that I've just added the patch titled
i40e: only register client on iWarp-capable devices
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
i40e-only-register-client-on-iwarp-capable-devices.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Mitch Williams <mitch.a.williams(a)intel.com>
Date: Tue, 4 Apr 2017 12:40:16 -0700
Subject: i40e: only register client on iWarp-capable devices
From: Mitch Williams <mitch.a.williams(a)intel.com>
[ Upstream commit 004eb614c4d2fcc12a98714fd887a860582f203a ]
The client interface is only intended for use on devices that support
iWarp. Only register with the client if this is the case.
This fixes a panic when loading i40iw on X710 devices.
Signed-off-by: Mitch Williams <mitch.a.williams(a)intel.com>
Reported-by: Stefan Assmann <sassmann(a)kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -11142,10 +11142,12 @@ static int i40e_probe(struct pci_dev *pd
round_jiffies(jiffies + pf->service_timer_period));
/* add this PF to client device list and launch a client service task */
- err = i40e_lan_add_device(pf);
- if (err)
- dev_info(&pdev->dev, "Failed to add PF to client API service list: %d\n",
- err);
+ if (pf->flags & I40E_FLAG_IWARP_ENABLED) {
+ err = i40e_lan_add_device(pf);
+ if (err)
+ dev_info(&pdev->dev, "Failed to add PF to client API service list: %d\n",
+ err);
+ }
#ifdef I40E_FCOE
/* create FCoE interface */
@@ -11323,10 +11325,11 @@ static void i40e_remove(struct pci_dev *
i40e_vsi_release(pf->vsi[pf->lan_vsi]);
/* remove attached clients */
- ret_code = i40e_lan_del_device(pf);
- if (ret_code) {
- dev_warn(&pdev->dev, "Failed to delete client device: %d\n",
- ret_code);
+ if (pf->flags & I40E_FLAG_IWARP_ENABLED) {
+ ret_code = i40e_lan_del_device(pf);
+ if (ret_code)
+ dev_warn(&pdev->dev, "Failed to delete client device: %d\n",
+ ret_code);
}
/* shutdown and destroy the HMC */
Patches currently in stable-queue which might be from mitch.a.williams(a)intel.com are
queue-4.9/i40e-only-register-client-on-iwarp-capable-devices.patch
This is a note to let you know that I've just added the patch titled
i40e/i40evf: Fix use after free in Rx cleanup path
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
i40e-i40evf-fix-use-after-free-in-rx-cleanup-path.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Alexander Duyck <alexander.h.duyck(a)intel.com>
Date: Tue, 21 Feb 2017 15:55:41 -0800
Subject: i40e/i40evf: Fix use after free in Rx cleanup path
From: Alexander Duyck <alexander.h.duyck(a)intel.com>
[ Upstream commit 741b8b832a57402380be79d7d11a59eaf57fff3b ]
We need to reset skb back to NULL when we have freed it in the Rx cleanup
path. I found one spot where this wasn't occurring so this patch fixes it.
Change-ID: Iaca68934200732cd4a63eb0bd83b539c95f8c4dd
Signed-off-by: Alexander Duyck <alexander.h.duyck(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 +
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 1 +
2 files changed, 2 insertions(+)
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1820,6 +1820,7 @@ static int i40e_clean_rx_irq(struct i40e
*/
if (unlikely(i40e_test_staterr(rx_desc, BIT(I40E_RXD_QW1_ERROR_SHIFT)))) {
dev_kfree_skb_any(skb);
+ skb = NULL;
continue;
}
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1262,6 +1262,7 @@ static int i40e_clean_rx_irq(struct i40e
*/
if (unlikely(i40e_test_staterr(rx_desc, BIT(I40E_RXD_QW1_ERROR_SHIFT)))) {
dev_kfree_skb_any(skb);
+ skb = NULL;
continue;
}
Patches currently in stable-queue which might be from alexander.h.duyck(a)intel.com are
queue-4.9/i40e-i40evf-fix-use-after-free-in-rx-cleanup-path.patch
This is a note to let you know that I've just added the patch titled
i40e: fix ethtool to get EEPROM data from X722 interface
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
i40e-fix-ethtool-to-get-eeprom-data-from-x722-interface.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Lihong Yang <lihong.yang(a)intel.com>
Date: Mon, 30 Jan 2017 12:29:32 -0800
Subject: i40e: fix ethtool to get EEPROM data from X722 interface
From: Lihong Yang <lihong.yang(a)intel.com>
[ Upstream commit c271dd6c391b535226cf1a81aaad9f33cb5899d3 ]
Currently ethtool -e will error out with a X722 interface
as its EEPROM has a scope limit at offset 0x5B9FFF.
This patch fixes the issue by setting the EEPROM length to
the scope limit to avoid NVM read failure beyond that.
Change-ID: I0b7d4dd6c7f2a57cace438af5dffa0f44c229372
Signed-off-by: Lihong Yang <lihong.yang(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1135,6 +1135,11 @@ static int i40e_get_eeprom_len(struct ne
struct i40e_hw *hw = &np->vsi->back->hw;
u32 val;
+#define X722_EEPROM_SCOPE_LIMIT 0x5B9FFF
+ if (hw->mac.type == I40E_MAC_X722) {
+ val = X722_EEPROM_SCOPE_LIMIT + 1;
+ return val;
+ }
val = (rd32(hw, I40E_GLPCI_LBARCTRL)
& I40E_GLPCI_LBARCTRL_FL_SIZE_MASK)
>> I40E_GLPCI_LBARCTRL_FL_SIZE_SHIFT;
Patches currently in stable-queue which might be from lihong.yang(a)intel.com are
queue-4.9/i40e-fix-ethtool-to-get-eeprom-data-from-x722-interface.patch
This is a note to let you know that I've just added the patch titled
i40e: Acquire NVM lock before reads on all devices
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
i40e-acquire-nvm-lock-before-reads-on-all-devices.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Aaron Salter <aaron.k.salter(a)intel.com>
Date: Fri, 2 Dec 2016 12:33:02 -0800
Subject: i40e: Acquire NVM lock before reads on all devices
From: Aaron Salter <aaron.k.salter(a)intel.com>
[ Upstream commit 96a39aed25e6559b160786117df124084feb9080 ]
Acquire NVM lock before reads on all devices. Previously, locks were
only used for X722 and later. Fixes an issue where simultaneous X710
NVM accesses were interfering with each other.
Change-ID: If570bb7acf958cef58725ec2a2011cead6f80638
Signed-off-by: Aaron Salter <aaron.k.salter(a)intel.com>
Tested-by: Andrew Bowers <andrewx.bowers(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -292,14 +292,14 @@ i40e_status i40e_read_nvm_word(struct i4
{
enum i40e_status_code ret_code = 0;
- if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
- ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
- if (!ret_code) {
+ ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
+ if (!ret_code) {
+ if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
- i40e_release_nvm(hw);
+ } else {
+ ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
}
- } else {
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
+ i40e_release_nvm(hw);
}
return ret_code;
}
Patches currently in stable-queue which might be from aaron.k.salter(a)intel.com are
queue-4.9/i40e-acquire-nvm-lock-before-reads-on-all-devices.patch
This is a note to let you know that I've just added the patch titled
HID: reject input outside logical range only if null state is set
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
hid-reject-input-outside-logical-range-only-if-null-state-is-set.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: "Valtteri Heikkilä" <rnd(a)nic.fi>
Date: Tue, 14 Feb 2017 23:14:32 +0000
Subject: HID: reject input outside logical range only if null state is set
From: "Valtteri Heikkilä" <rnd(a)nic.fi>
[ Upstream commit 3f3752705dbd50b66b66ad7b4d54fe33d2f746ed ]
This patch fixes an issue in drivers/hid/hid-input.c where USB HID
control null state flag is not checked upon rejecting inputs outside
logical minimum-maximum range. The check should be made according to USB
HID specification 1.11, section 6.2.2.5, p.31. The fix will resolve
issues with some game controllers, such as:
https://bugzilla.kernel.org/show_bug.cgi?id=68621
[tk(a)the-tk.com: shortened and fixed spelling in commit message]
Signed-off-by: Valtteri Heikkilä <rnd(a)nic.fi>
Signed-off-by: Tomasz Kramkowski <tk(a)the-tk.com>
Acked-By: Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
Signed-off-by: Jiri Kosina <jkosina(a)suse.cz>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/hid/hid-input.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1156,6 +1156,7 @@ void hidinput_hid_event(struct hid_devic
* don't specify logical min and max.
*/
if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
+ (field->flags & HID_MAIN_ITEM_NULL_STATE) &&
(field->logical_minimum < field->logical_maximum) &&
(value < field->logical_minimum ||
value > field->logical_maximum)) {
Patches currently in stable-queue which might be from rnd(a)nic.fi are
queue-4.9/hid-reject-input-outside-logical-range-only-if-null-state-is-set.patch
This is a note to let you know that I've just added the patch titled
HID: elo: clear BTN_LEFT mapping
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
hid-elo-clear-btn_left-mapping.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Jiri Kosina <jkosina(a)suse.cz>
Date: Wed, 22 Nov 2017 11:19:51 +0100
Subject: HID: elo: clear BTN_LEFT mapping
From: Jiri Kosina <jkosina(a)suse.cz>
[ Upstream commit 9abd04af951e5734c9d5cfee9b49790844b734cf ]
ELO devices have one Button usage in GenDesk field, which makes hid-input map
it to BTN_LEFT; that confuses userspace, which then considers the device to be
a mouse/touchpad instead of touchscreen.
Fix that by unmapping BTN_LEFT and keeping only BTN_TOUCH in place.
Signed-off-by: Jiri Kosina <jkosina(a)suse.cz>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/hid/hid-elo.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/hid/hid-elo.c
+++ b/drivers/hid/hid-elo.c
@@ -42,6 +42,12 @@ static int elo_input_configured(struct h
{
struct input_dev *input = hidinput->input;
+ /*
+ * ELO devices have one Button usage in GenDesk field, which makes
+ * hid-input map it to BTN_LEFT; that confuses userspace, which then
+ * considers the device to be a mouse/touchpad instead of touchscreen.
+ */
+ clear_bit(BTN_LEFT, input->keybit);
set_bit(BTN_TOUCH, input->keybit);
set_bit(ABS_PRESSURE, input->absbit);
input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);
Patches currently in stable-queue which might be from jkosina(a)suse.cz are
queue-4.9/hid-elo-clear-btn_left-mapping.patch
queue-4.9/hid-clamp-input-to-logical-range-if-no-null-state.patch
queue-4.9/hid-reject-input-outside-logical-range-only-if-null-state-is-set.patch
This is a note to let you know that I've just added the patch titled
HID: clamp input to logical range if no null state
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
hid-clamp-input-to-logical-range-if-no-null-state.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Tomasz Kramkowski <tk(a)the-tk.com>
Date: Tue, 14 Mar 2017 13:29:13 +0000
Subject: HID: clamp input to logical range if no null state
From: Tomasz Kramkowski <tk(a)the-tk.com>
[ Upstream commit c3883fe06488a483658ba5d849b70e49bee15e7c ]
This patch fixes an issue in drivers/hid/hid-input.c where values
outside of the logical range are not clamped when "null state" bit of
the input control is not set.
This was discussed on the lists [1] and this change stems from the fact
due to the ambiguity of the HID specification it might be appropriate to
follow Microsoft's own interpretation of the specification. As noted in
Microsoft's documentation [2] in the section titled "Required HID usages
for digitizers" it is noted that values reported outside the logical
range "will be considered as invalid data and the value will be changed
to the nearest boundary value (logical min/max)."
This patch fixes an issue where the (1292:4745) Innomedia INNEX
GENESIS/ATARI reports out of range values for its X and Y axis of the
DPad which, due to the null state bit being unset, are forwarded to
userspace as is. Now these values will get clamped to the logical range
before being forwarded to userspace. This device was also used to test
this patch.
This patch expands on commit 3f3752705dbd ("HID: reject input outside
logical range only if null state is set").
[1]: http://lkml.kernel.org/r/20170307131036.GA853@gaia.local
[2]: https://msdn.microsoft.com/en-us/library/windows/hardware/dn672278(v=vs.85)…
Signed-off-by: Tomasz Kramkowski <tk(a)the-tk.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
Signed-off-by: Jiri Kosina <jkosina(a)suse.cz>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/hid/hid-input.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1149,19 +1149,26 @@ void hidinput_hid_event(struct hid_devic
/*
* Ignore out-of-range values as per HID specification,
- * section 5.10 and 6.2.25.
+ * section 5.10 and 6.2.25, when NULL state bit is present.
+ * When it's not, clamp the value to match Microsoft's input
+ * driver as mentioned in "Required HID usages for digitizers":
+ * https://msdn.microsoft.com/en-us/library/windows/hardware/dn672278(v=vs.85)…
*
* The logical_minimum < logical_maximum check is done so that we
* don't unintentionally discard values sent by devices which
* don't specify logical min and max.
*/
if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
- (field->flags & HID_MAIN_ITEM_NULL_STATE) &&
- (field->logical_minimum < field->logical_maximum) &&
- (value < field->logical_minimum ||
- value > field->logical_maximum)) {
- dbg_hid("Ignoring out-of-range value %x\n", value);
- return;
+ (field->logical_minimum < field->logical_maximum)) {
+ if (field->flags & HID_MAIN_ITEM_NULL_STATE &&
+ (value < field->logical_minimum ||
+ value > field->logical_maximum)) {
+ dbg_hid("Ignoring out-of-range value %x\n", value);
+ return;
+ }
+ value = clamp(value,
+ field->logical_minimum,
+ field->logical_maximum);
}
/*
Patches currently in stable-queue which might be from tk(a)the-tk.com are
queue-4.9/hid-clamp-input-to-logical-range-if-no-null-state.patch
queue-4.9/hid-reject-input-outside-logical-range-only-if-null-state-is-set.patch
This is a note to let you know that I've just added the patch titled
fm10k: correctly check if interface is removed
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
fm10k-correctly-check-if-interface-is-removed.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Phil Turnbull <phil.turnbull(a)oracle.com>
Date: Wed, 23 Nov 2016 13:33:58 -0500
Subject: fm10k: correctly check if interface is removed
From: Phil Turnbull <phil.turnbull(a)oracle.com>
[ Upstream commit 540fca35e38d15777b310f450f63f056e63039f5 ]
FM10K_REMOVED expects a hardware address, not a 'struct fm10k_hw'.
Fixes: 5cb8db4a4cbc ("fm10k: Add support for VF")
Signed-off-by: Phil Turnbull <phil.turnbull(a)oracle.com>
Tested-by: Krishneil Singh <krishneil.k.singh(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -942,7 +942,7 @@ static void fm10k_self_test(struct net_d
memset(data, 0, sizeof(*data) * FM10K_TEST_LEN);
- if (FM10K_REMOVED(hw)) {
+ if (FM10K_REMOVED(hw->hw_addr)) {
netif_err(interface, drv, dev,
"Interface removed - test blocked\n");
eth_test->flags |= ETH_TEST_FL_FAILED;
Patches currently in stable-queue which might be from phil.turnbull(a)oracle.com are
queue-4.9/fm10k-correctly-check-if-interface-is-removed.patch
This is a note to let you know that I've just added the patch titled
f2fs: relax node version check for victim data in gc
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
f2fs-relax-node-version-check-for-victim-data-in-gc.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Jaegeuk Kim <jaegeuk(a)kernel.org>
Date: Tue, 21 Mar 2017 10:59:50 -0400
Subject: f2fs: relax node version check for victim data in gc
From: Jaegeuk Kim <jaegeuk(a)kernel.org>
[ Upstream commit c13ff37e359bb3eacf4e1760dcea8d9760aa7459 ]
- has_not_enough_free_secs
node_secs: 0 dent_secs: 0 freed:0 free_segments:103 reserved:104
- f2fs_gc
- get_victim_by_default
alloc_mode 0, gc_mode 1, max_search 2672, offset 4654, ofs_unit 1
- do_garbage_collect
start_segno 3976, end_segno 3977 type 0
- is_alive
nid 22797, blkaddr 2131882, ofs_in_node 0, version 0x8/0x0
- gc_data_segment 766, segno 3976, block 512/426 not alive
So, this patch fixes subtle corrupted case where node version does not match
to summary version which results in infinite loop by gc.
Reported-by: Yunlei He <heyunlei(a)huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk(a)kernel.org>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
fs/f2fs/gc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -538,8 +538,10 @@ static bool is_alive(struct f2fs_sb_info
get_node_info(sbi, nid, dni);
if (sum->version != dni->version) {
- f2fs_put_page(node_page, 1);
- return false;
+ f2fs_msg(sbi->sb, KERN_WARNING,
+ "%s: valid data with mismatched node version.",
+ __func__);
+ set_sbi_flag(sbi, SBI_NEED_FSCK);
}
*nofs = ofs_of_node(node_page);
Patches currently in stable-queue which might be from jaegeuk(a)kernel.org are
queue-4.9/f2fs-relax-node-version-check-for-victim-data-in-gc.patch
This is a note to let you know that I've just added the patch titled
eventpoll.h: fix epoll event masks
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
eventpoll.h-fix-epoll-event-masks.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Greg KH <gregkh(a)linuxfoundation.org>
Date: Wed, 8 Mar 2017 19:03:03 +0100
Subject: eventpoll.h: fix epoll event masks
From: Greg KH <gregkh(a)linuxfoundation.org>
[ Upstream commit 6f051e4a685b768f3704c7c069aa1edee3010622 ]
[resend due to me forgetting to cc: linux-api the first time around I
posted these back on Feb 23]
From: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
When userspace tries to use these defines, it complains that it needs to
be an unsigned 1 that is shifted, so libc implementations have to create
their own version. Fix this by defining it properly so that libcs can
just use the kernel uapi header.
Reported-by: Elliott Hughes <enh(a)google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
include/uapi/linux/eventpoll.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/include/uapi/linux/eventpoll.h
+++ b/include/uapi/linux/eventpoll.h
@@ -40,7 +40,7 @@
#define EPOLLRDHUP 0x00002000
/* Set exclusive wakeup mode for the target file descriptor */
-#define EPOLLEXCLUSIVE (1 << 28)
+#define EPOLLEXCLUSIVE (1U << 28)
/*
* Request the handling of system wakeup events so as to prevent system suspends
@@ -52,13 +52,13 @@
*
* Requires CAP_BLOCK_SUSPEND
*/
-#define EPOLLWAKEUP (1 << 29)
+#define EPOLLWAKEUP (1U << 29)
/* Set the One Shot behaviour for the target file descriptor */
-#define EPOLLONESHOT (1 << 30)
+#define EPOLLONESHOT (1U << 30)
/* Set the Edge Triggered behaviour for the target file descriptor */
-#define EPOLLET (1 << 31)
+#define EPOLLET (1U << 31)
/*
* On x86-64 make the 64bit structure have the same alignment as the
Patches currently in stable-queue which might be from gregkh(a)linuxfoundation.org are
queue-4.9/nfc-pn533-change-order-of-free_irq-and-dev-unregistration.patch
queue-4.9/dmaengine-bcm2835-dma-use-vchan_terminate_vdesc-instead-of-desc_free.patch
queue-4.9/asoc-rt5677-add-of-device-id-table.patch
queue-4.9/arm-dra7-hwmod_data-prevent-wait_target_disable-error-for-usb_otg_ss.patch
queue-4.9/arm-dts-omap3-n900-fix-the-audio-codec-s-reset-pin.patch
queue-4.9/hid-elo-clear-btn_left-mapping.patch
queue-4.9/sched-stop-resched_cpu-from-sending-ipis-to-offline-cpus.patch
queue-4.9/arm64-dts-r8a7796-remove-unit-address-and-reg-from-integrated-cache.patch
queue-4.9/mips-bpf-quit-clobbering-callee-saved-registers-in-jit-code.patch
queue-4.9/net-faraday-add-missing-include-of-of.h.patch
queue-4.9/asoc-rcar-ssi-don-t-set-ssicr.ckdv-000-with-ssiwsr.cont.patch
queue-4.9/selinux-check-for-address-length-in-selinux_socket_bind.patch
queue-4.9/drm-ttm-never-add-bo-that-failed-to-validate-to-the-lru-list.patch
queue-4.9/alsa-hda-add-geminilake-id-to-skl_plus.patch
queue-4.9/arm-dts-r8a7791-remove-unit-address-and-reg-from-integrated-cache.patch
queue-4.9/perf-buildid-do-not-assume-that-readlink-returns-a-null-terminated-string.patch
queue-4.9/v4l-vsp1-prevent-multiple-streamon-race-commencing-pipeline-early.patch
queue-4.9/net-thunderx-set-max-queue-count-taking-xdp_tx-into-account.patch
queue-4.9/arm-dts-adjust-moxart-irq-controller-and-flags.patch
queue-4.9/drm-defer-disabling-the-vblank-irq-until-the-next-interrupt-for-instant-off.patch
queue-4.9/spi-omap2-mcspi-poll-omap2_mcspi_chstat_rxs-for-pio-transfer.patch
queue-4.9/ath10k-fix-invalid-sts_cap_offset_mask.patch
queue-4.9/drm-sun4i-fix-up-error-path-cleanup-for-master-bind-function.patch
queue-4.9/qed-always-publish-vf-link-from-leading-hwfn.patch
queue-4.9/qed-fix-tm-block-ilt-allocation.patch
queue-4.9/printk-correctly-handle-preemption-in-console_unlock.patch
queue-4.9/powerpc-nohash-fix-use-of-mmu_has_feature-in-setup_initial_memory_limit.patch
queue-4.9/media-cpia2-fix-a-couple-off-by-one-bugs.patch
queue-4.9/arm-dts-r7s72100-fix-ethernet-clock-parent.patch
queue-4.9/net-hns-correct-hns-rss-key-set-function.patch
queue-4.9/bonding-make-speed-duplex-setting-consistent-with-link-state.patch
queue-4.9/sched-stop-switched_to_rt-from-sending-ipis-to-offline-cpus.patch
queue-4.9/mac80211-remove-bug-when-interface-type-is-invalid.patch
queue-4.9/perf-session-don-t-rely-on-evlist-in-pipe-mode.patch
queue-4.9/net-fec-add-phy-reset-gpios-probe_defer-check.patch
queue-4.9/vfio-spapr_tce-check-kzalloc-return-when-preregistering-memory.patch
queue-4.9/kvm-nvmx-disallow-userspace-injected-exceptions-in-guest-mode.patch
queue-4.9/sched-act_csum-don-t-mangle-tcp-and-udp-gso-packets.patch
queue-4.9/arm-dts-r8a7791-correct-parent-of-ssi-clocks.patch
queue-4.9/powerpc-avoid-taking-a-data-miss-on-every-userspace-instruction-miss.patch
queue-4.9/net-xfrm-allow-clearing-socket-xfrm-policies.patch
queue-4.9/omapfb-dss-handle-return-errors-in-dss_init_ports.patch
queue-4.9/mtd-nand-ifc-update-bufnum-mask-for-ver-2.0.0.patch
queue-4.9/mips-r2-on-r6-emu-clear-bltzall-and-bgezall-debugfs-counters.patch
queue-4.9/regulator-core-limit-propagation-of-parent-voltage-count-and-list.patch
queue-4.9/dmaengine-imx-sdma-add-1ms-delay-to-ensure-sdma-channel-is-stopped.patch
queue-4.9/wil6210-fix-protection-against-connections-during-reset.patch
queue-4.9/md.c-didn-t-unlock-the-mddev-before-return-einval-in-array_size_store.patch
queue-4.9/net-8021q-create-device-with-all-possible-features-in-wanted_features.patch
queue-4.9/lkdtm-turn-off-kcov-for-lkdtm_rodata_do_nothing.patch
queue-4.9/drivers-net-xgene-fix-wrong-logical-operation.patch
queue-4.9/pci-hv-lock-pci-bus-on-device-eject.patch
queue-4.9/ath10k-fix-fetching-channel-during-potential-radar-detection.patch
queue-4.9/net-ethernet-bgmac-allow-mac-address-to-be-specified-in-dtb.patch
queue-4.9/powerpc-modules-don-t-try-to-restore-r2-after-a-sibling-call.patch
queue-4.9/rtmutex-fix-pi-chain-order-integrity.patch
queue-4.9/alsa-firewire-digi00x-handle-all-midi-messages-on-streaming-packets.patch
queue-4.9/drm-amdgpu-fail-fb-creation-from-imported-dma-bufs.-v2.patch
queue-4.9/leds-pm8058-silence-pointer-to-integer-size-warning.patch
queue-4.9/qed-correct-msi-x-for-storage.patch
queue-4.9/s390-topology-fix-typo-in-early-topology-code.patch
queue-4.9/ath10k-fix-compile-time-sanity-check-for-ce4-buffer-size.patch
queue-4.9/arm-dts-silk-correct-clock-of-du1.patch
queue-4.9/of-fix-of_device_get_modalias-returned-length-when-truncating-buffers.patch
queue-4.9/clk-qcom-msm8916-fix-mnd_width-for-codec_digcodec.patch
queue-4.9/alsa-firewire-digi00x-add-support-for-console-models-of-digi00x-series.patch
queue-4.9/arm-dts-exynos-correct-trats2-panel-reset-line.patch
queue-4.9/power-supply-ab8500_charger-fix-an-error-handling-path.patch
queue-4.9/perf-tools-make-perf_event__synthesize_mmap_events-scale.patch
queue-4.9/perf-annotate-fix-a-bug-following-symbolic-link-of-a-build-id-file.patch
queue-4.9/usb-dwc2-make-sure-we-disconnect-the-gadget-state.patch
queue-4.9/veth-set-peer-gso-values.patch
queue-4.9/arm-dts-r8a7792-remove-unit-address-and-reg-from-integrated-cache.patch
queue-4.9/mips-r2-on-r6-emu-fix-blezl-and-bgtzl-identification.patch
queue-4.9/i40e-acquire-nvm-lock-before-reads-on-all-devices.patch
queue-4.9/drivers-net-xgene-fix-hardware-checksum-setting.patch
queue-4.9/usb-misc-lvs-fix-race-condition-in-disconnect-handling.patch
queue-4.9/bonding-refine-bond_fold_stats-wrap-detection.patch
queue-4.9/mac80211_hwsim-enforce-ps_manual_poll-to-be-set-after-ps_enabled.patch
queue-4.9/driver-adm1275-set-the-m-b-and-r-coefficients-correctly-for-power.patch
queue-4.9/pwm-stmpe-fix-wrong-register-offset-for-hwpwm-2-case.patch
queue-4.9/scsi-sg-check-for-valid-direction-before-starting-the-request.patch
queue-4.9/x86-mce-handle-broadcasted-mce-gracefully-with-kexec.patch
queue-4.9/drm-radeon-fail-fb-creation-from-imported-dma-bufs.patch
queue-4.9/clk-meson-gxbb-fix-wrong-clock-for-saradc-sana.patch
queue-4.9/iwlwifi-mvm-rs-don-t-override-the-rate-history-in-the-search-cycle.patch
queue-4.9/mm-fix-false-positive-vm_bug_on-in-page_cache_-get-add-_speculative.patch
queue-4.9/sysrq-reset-the-watchdog-timers-while-displaying-high-resolution-timers.patch
queue-4.9/locking-locktorture-fix-num-reader-writer-corner-cases.patch
queue-4.9/ath10k-update-tdls-teardown-state-to-target.patch
queue-4.9/nfc-nfcmrvl-include-unaligned.h-instead-of-access_ok.h.patch
queue-4.9/v4l-vsp1-register-pipe-with-output-wpf.patch
queue-4.9/rcutorture-configinit-fix-build-directory-error-message.patch
queue-4.9/ath10k-fix-a-warning-during-channel-switch-with-multiple-vaps.patch
queue-4.9/netem-apply-correct-delay-when-rate-throttling.patch
queue-4.9/zd1211rw-fix-null-deref-at-probe.patch
queue-4.9/mac80211_hwsim-use-per-interface-power-level.patch
queue-4.9/scsi-devinfo-apply-to-hp-xp-the-same-flags-as-hitachi-vsp.patch
queue-4.9/tty-amba-pl011-fix-spurious-tx-interrupts.patch
queue-4.9/kprobes-x86-set-kprobes-pages-read-only.patch
queue-4.9/batman-adv-handle-race-condition-for-claims-between-gateways.patch
queue-4.9/input-qt1070-add-of-device-id-table.patch
queue-4.9/hid-clamp-input-to-logical-range-if-no-null-state.patch
queue-4.9/input-tsc2007-check-for-presence-and-power-down-tsc2007-during-probe.patch
queue-4.9/perf-stat-issue-a-hw-watchdog-disable-hint.patch
queue-4.9/vxlan-vxlan-dev-should-inherit-lowerdev-s-gso_max_size.patch
queue-4.9/braille-console-fix-value-returned-by-_braille_console_setup.patch
queue-4.9/drm-sun4i-set-drm_crtc.port-to-the-underlying-tcon-s-output-port-node.patch
queue-4.9/fm10k-correctly-check-if-interface-is-removed.patch
queue-4.9/x86-mm-make-mmap-map_32bit-work-correctly.patch
queue-4.9/drm-sun4i-fix-tcon-clock-and-regmap-initialization-sequence.patch
queue-4.9/drm-rcar-du-handle-event-when-disabling-crtcs.patch
queue-4.9/regulator-isl9305-fix-array-size.patch
queue-4.9/kprobes-x86-fix-kprobe-booster-not-to-boost-far-call-instructions.patch
queue-4.9/arm-dts-koelsch-correct-clock-frequency-of-x2-du-clock-input.patch
queue-4.9/arm-dts-r8a7794-correct-clock-of-du1.patch
queue-4.9/arm-brcmstb-enable-zone_dma-for-non-64-bit-capable-peripherals.patch
queue-4.9/arm-dts-r8a7794-remove-unit-address-and-reg-from-integrated-cache.patch
queue-4.9/scsi-ipr-fix-missed-eh-wakeup.patch
queue-4.9/perf-sort-fix-segfault-with-basic-block-cycles-sort-dimension.patch
queue-4.9/iommu-iova-fix-underflow-bug-in-__alloc_and_insert_iova_range.patch
queue-4.9/timers-sched_clock-update-timeout-for-clock-wrap.patch
queue-4.9/perf-trace-handle-unpaired-raw_syscalls-sys_exit-event.patch
queue-4.9/reiserfs-make-cancel_old_flush-reliable.patch
queue-4.9/nfc-nfcmrvl-double-free-on-error-path.patch
queue-4.9/clk-sunxi-ng-a33-add-offset-and-minimum-value-for-ddr1-pll-n-factor.patch
queue-4.9/md-raid6-fix-anomily-when-recovering-a-single-device-in-raid6.patch
queue-4.9/perf-probe-fix-concat_probe_trace_events.patch
queue-4.9/bnxt_en-don-t-print-link-speed-1-no-longer-supported-messages.patch
queue-4.9/drm-qxl-don-t-alloc-fbdev-if-emulation-is-not-supported.patch
queue-4.9/arm-dts-bcm2835-add-index-to-the-ethernet-alias.patch
queue-4.9/userns-don-t-fail-follow_automount-based-on-s_user_ns.patch
queue-4.9/blk-throttle-make-sure-expire-time-isn-t-too-big.patch
queue-4.9/blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queue.patch
queue-4.9/wil6210-fix-memory-access-violation-in-wil_memcpy_from-toio_32.patch
queue-4.9/video-hdmi-allow-empty-hdmi-infoframes.patch
queue-4.9/powerpc-xmon-fix-an-unexpected-xmon-on-off-state-change.patch
queue-4.9/serial-imx-setup-dcedte-early-and-ensure-dcd-and-ri-irqs-to-be-off.patch
queue-4.9/bluetooth-6lowpan-fix-delay-work-init-in-add_peer_chan.patch
queue-4.9/soc-tegra-fix-link-errors-with-pmc-disabled.patch
queue-4.9/test_firmware-fix-setting-old-custom-fw-path-back-on-exit.patch
queue-4.9/scsi-fnic-fix-for-number-of-active-ios-in-fnicstats-becoming-negative.patch
queue-4.9/arm-dts-r8a7793-remove-unit-address-and-reg-from-integrated-cache.patch
queue-4.9/staging-speakup-replace-bug_on-with-warn_on.patch
queue-4.9/hid-reject-input-outside-logical-range-only-if-null-state-is-set.patch
queue-4.9/scsi-sg-close-race-condition-in-sg_remove_sfp_usercontext.patch
queue-4.9/ima-relax-requiring-a-file-signature-for-new-files-with-zero-length.patch
queue-4.9/edac-altera-fix-peripheral-warnings-for-cyclone5.patch
queue-4.9/arm-dts-r8a7793-correct-parent-of-ssi-clocks.patch
queue-4.9/x86-boot-32-defer-resyncing-initial_page_table-until-per-cpu-is-set-up.patch
queue-4.9/pci-msi-stop-disabling-msi-msi-x-in-pci_device_shutdown.patch
queue-4.9/staging-wilc1000-add-check-for-kmalloc-allocation-failure.patch
queue-4.9/scsi-be2iscsi-check-tag-in-beiscsi_mccq_compl_wait.patch
queue-4.9/kvm-svm-setup-mcg_cap-on-amd-properly.patch
queue-4.9/usb-gadget-dummy_hcd-fix-wrong-power-status-bit-clear-reset-in-dummy_hub_control.patch
queue-4.9/ib-hfi1-check-for-qsfp-presence-before-attempting-reads.patch
queue-4.9/usb-dwc3-make-sure-ux_exit_px-is-cleared.patch
queue-4.9/perf-inject-copy-events-when-reordering-events-in-pipe-mode.patch
queue-4.9/power-supply-ab8500_charger-bail-out-in-case-of-error-in-ab8500_charger_init_hw_registers.patch
queue-4.9/media-vsp1-prevent-suspending-and-resuming-drm-pipelines.patch
queue-4.9/scsi-ses-don-t-get-power-status-of-ses-device-slot-on-probe.patch
queue-4.9/drm-vmwgfx-fixes-to-vmwgfx_fb.patch
queue-4.9/eventpoll.h-fix-epoll-event-masks.patch
queue-4.9/clk-qcom-msm8996-fix-the-vfe1-powerdomain-name.patch
queue-4.9/pci-apply-cavium-acs-quirk-only-to-cn81xx-cn83xx-cn88xx-devices.patch
queue-4.9/perf-probe-return-errno-when-not-hitting-any-event.patch
queue-4.9/spi-sun6i-disable-unprepare-clocks-on-remove.patch
queue-4.9/x86-mce-init-some-cpu-features-early.patch
queue-4.9/arm-dts-r8a7790-correct-parent-of-ssi-clocks.patch
queue-4.9/mips-bpf-fix-multiple-problems-in-jit-skb-access-helpers.patch
queue-4.9/net-mvpp2-set-dma-mask-and-coherent-dma-mask-on-ppv2.2.patch
queue-4.9/mwifiex-cfg80211-do-not-change-virtual-interface-during-scan-processing.patch
queue-4.9/ipvlan-add-l2-check-for-packets-arriving-via-virtual-devices.patch
queue-4.9/video-arm-clcd-fix-dma-allocation-size.patch
queue-4.9/drm-edid-set-eld-connector-type-in-drm_edid_to_eld.patch
queue-4.9/iwlwifi-mvm-fix-rx-skb-header-size-and-align-it-properly.patch
queue-4.9/drm-amdkfd-fix-memory-leaks-in-kfd-topology.patch
queue-4.9/pci-hv-properly-handle-pci-bus-remove.patch
queue-4.9/drivers-net-xgene-fix-rx-checksum-validation-logic.patch
queue-4.9/media-i2c-soc_camera-fix-ov6650-sensor-getting-wrong-clock.patch
queue-4.9/pwm-tegra-increase-precision-in-pwm-rate-calculation.patch
queue-4.9/net-ieee802154-adf7242-fix-bug-if-defined-debug.patch
queue-4.9/arm-bcm2835-enable-missing-cma-settings-for-vc4-driver.patch
queue-4.9/agp-intel-flush-all-chipset-writes-after-updating-the-ggtt.patch
queue-4.9/arm-dts-am335x-pepper-fix-the-audio-codec-s-reset-pin.patch
queue-4.9/drivers-net-phy-xgene-fix-mdio-write.patch
queue-4.9/apparmor-make-path_max-parameter-readonly.patch
queue-4.9/perf-evsel-return-exact-sub-event-which-failed-with-eperm-for-wildcards.patch
queue-4.9/powerpc-mm-hugetlb-filter-out-hugepage-size-not-supported-by-page-table-layout.patch
queue-4.9/scsi-core-scsi_get_device_flags_keyed-always-return-device-flags.patch
queue-4.9/f2fs-relax-node-version-check-for-victim-data-in-gc.patch
queue-4.9/scsi-dh-add-new-rdac-devices.patch
queue-4.9/scsi-ses-don-t-ask-for-diagnostic-pages-repeatedly-during-probe.patch
queue-4.9/mwifiex-fix-invalid-port-issue.patch
queue-4.9/solo6x10-release-vb2-buffers-in-solo_stop_streaming.patch
queue-4.9/i40e-fix-ethtool-to-get-eeprom-data-from-x722-interface.patch
queue-4.9/drm-rockchip-vop-enable-pm-domain-before-vop_initial.patch
queue-4.9/bluetooth-avoid-bt_accept_unlink-double-unlinking.patch
queue-4.9/i40e-only-register-client-on-iwarp-capable-devices.patch
queue-4.9/alsa-firewire-lib-add-a-quirk-of-packet-without-valid-eoh-in-cip-format.patch
queue-4.9/drivers-perf-arm_pmu-handle-no-platform_device.patch
queue-4.9/tcp-sysctl-fix-a-race-to-avoid-unexpected-0-window-from-space.patch
queue-4.9/i40e-i40evf-fix-use-after-free-in-rx-cleanup-path.patch
queue-4.9/asoc-nuc900-fix-a-loop-timeout-test.patch
queue-4.9/tools-usbip-fixes-build-with-musl-libc-toolchain.patch
queue-4.9/coresight-fixes-coresight-dt-parse-to-get-correct-output-port-id.patch
queue-4.9/mtd-nand-fix-interpretation-of-nand_cmd_none-in-nand_command.patch
queue-4.9/perf-stat-fix-bug-in-handling-events-in-error-state.patch
queue-4.9/vfio-powerpc-spapr_tce-enforce-iommu-type-compatibility-check.patch
queue-4.9/ath10k-disallow-dfs-simulation-if-dfs-channel-is-not-enabled.patch