* [PATCH 5.4 107/142] cfg80211: fix debugfs rename crash
From: Greg Kroah-Hartman @ 2020-06-01 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, syzbot+fd5332e429401bf42d18,
Johannes Berg
In-Reply-To: <20200601174037.904070960@linuxfoundation.org>
From: Johannes Berg <johannes.berg@intel.com>
commit 0bbab5f0301587cad4e923ccc49bb910db86162c upstream.
Removing the "if (IS_ERR(dir)) dir = NULL;" check only works
if we adjust the remaining code to not rely on it being NULL.
Check IS_ERR_OR_NULL() before attempting to dereference it.
I'm not actually entirely sure this fixes the syzbot crash as
the kernel config indicates that they do have DEBUG_FS in the
kernel, but this is what I found when looking there.
Cc: stable@vger.kernel.org
Fixes: d82574a8e5a4 ("cfg80211: no need to check return value of debugfs_create functions")
Reported-by: syzbot+fd5332e429401bf42d18@syzkaller.appspotmail.com
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200525113816.fc4da3ec3d4b.Ica63a110679819eaa9fb3bc1b7437d96b1fd187d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/wireless/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -142,7 +142,7 @@ int cfg80211_dev_rename(struct cfg80211_
if (result)
return result;
- if (rdev->wiphy.debugfsdir)
+ if (!IS_ERR_OR_NULL(rdev->wiphy.debugfsdir))
debugfs_rename(rdev->wiphy.debugfsdir->d_parent,
rdev->wiphy.debugfsdir,
rdev->wiphy.debugfsdir->d_parent, newname);
^ permalink raw reply
* [PATCH 5.4 102/142] include/asm-generic/topology.h: guard cpumask_of_node() macro argument
From: Greg Kroah-Hartman @ 2020-06-01 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Andrew Morton,
Guenter Roeck, Linus Torvalds, Sasha Levin
In-Reply-To: <20200601174037.904070960@linuxfoundation.org>
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit 4377748c7b5187c3342a60fa2ceb60c8a57a8488 ]
drivers/hwmon/amd_energy.c:195:15: error: invalid operands to binary expression ('void' and 'int')
(channel - data->nr_cpus));
~~~~~~~~~^~~~~~~~~~~~~~~~~
include/asm-generic/topology.h:51:42: note: expanded from macro 'cpumask_of_node'
#define cpumask_of_node(node) ((void)node, cpu_online_mask)
^~~~
include/linux/cpumask.h:618:72: note: expanded from macro 'cpumask_first_and'
#define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p))
^~~~~
Fixes: f0b848ce6fe9 ("cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask")
Fixes: 8abee9566b7e ("hwmon: Add amd_energy driver to report energy counters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: http://lkml.kernel.org/r/20200527134623.930247-1-arnd@arndb.de
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/asm-generic/topology.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 238873739550..5aa8705df87e 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -48,7 +48,7 @@
#ifdef CONFIG_NEED_MULTIPLE_NODES
#define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask)
#else
- #define cpumask_of_node(node) ((void)node, cpu_online_mask)
+ #define cpumask_of_node(node) ((void)(node), cpu_online_mask)
#endif
#endif
#ifndef pcibus_to_node
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 010/177] net: ipip: fix wrong address family in init error path
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Vadim Fedorenko, David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Vadim Fedorenko <vfedorenko@novek.ru>
[ Upstream commit 57ebc8f08504f176eb0f25b3e0fde517dec61a4f ]
In case of error with MPLS support the code is misusing AF_INET
instead of AF_MPLS.
Fixes: 1b69e7e6c4da ("ipip: support MPLS over IPv4")
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/ipip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -698,7 +698,7 @@ out:
rtnl_link_failed:
#if IS_ENABLED(CONFIG_MPLS)
- xfrm4_tunnel_deregister(&mplsip_handler, AF_INET);
+ xfrm4_tunnel_deregister(&mplsip_handler, AF_MPLS);
xfrm_tunnel_mplsip_failed:
#endif
^ permalink raw reply
* [PATCH 5.6 001/177] ax25: fix setsockopt(SO_BINDTODEVICE)
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Eric Dumazet, syzbot, David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 687775cec056b38a4c8f3291e0dd7a9145f7b667 ]
syzbot was able to trigger this trace [1], probably by using
a zero optlen.
While we are at it, cap optlen to IFNAMSIZ - 1 instead of IFNAMSIZ.
[1]
BUG: KMSAN: uninit-value in strnlen+0xf9/0x170 lib/string.c:569
CPU: 0 PID: 8807 Comm: syz-executor483 Not tainted 5.7.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1c9/0x220 lib/dump_stack.c:118
kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
__msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
strnlen+0xf9/0x170 lib/string.c:569
dev_name_hash net/core/dev.c:207 [inline]
netdev_name_node_lookup net/core/dev.c:277 [inline]
__dev_get_by_name+0x75/0x2b0 net/core/dev.c:778
ax25_setsockopt+0xfa3/0x1170 net/ax25/af_ax25.c:654
__compat_sys_setsockopt+0x4ed/0x910 net/compat.c:403
__do_compat_sys_setsockopt net/compat.c:413 [inline]
__se_compat_sys_setsockopt+0xdd/0x100 net/compat.c:410
__ia32_compat_sys_setsockopt+0x62/0x80 net/compat.c:410
do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
do_fast_syscall_32+0x3bf/0x6d0 arch/x86/entry/common.c:398
entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7f57dd9
Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 002b:00000000ffae8c1c EFLAGS: 00000217 ORIG_RAX: 000000000000016e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000101
RDX: 0000000000000019 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 0000000000000012 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Local variable ----devname@ax25_setsockopt created at:
ax25_setsockopt+0xe6/0x1170 net/ax25/af_ax25.c:536
ax25_setsockopt+0xe6/0x1170 net/ax25/af_ax25.c:536
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ax25/af_ax25.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -635,8 +635,10 @@ static int ax25_setsockopt(struct socket
break;
case SO_BINDTODEVICE:
- if (optlen > IFNAMSIZ)
- optlen = IFNAMSIZ;
+ if (optlen > IFNAMSIZ - 1)
+ optlen = IFNAMSIZ - 1;
+
+ memset(devname, 0, sizeof(devname));
if (copy_from_user(devname, optval, optlen)) {
res = -EFAULT;
^ permalink raw reply
* [PATCH 5.6 012/177] net: mvpp2: fix RX hashing for non-10G ports
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Matteo Croce, Russell King,
David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Russell King <rmk+kernel@armlinux.org.uk>
[ Upstream commit 3138a07ce219acde4c0d7ea0b6d54ba64153328b ]
When rxhash is enabled on any ethernet port except the first in each CP
block, traffic flow is prevented. The analysis is below:
I've been investigating this afternoon, and what I've found, comparing
a kernel without 895586d5dc32 and with 895586d5dc32 applied is:
- The table programmed into the hardware via mvpp22_rss_fill_table()
appears to be identical with or without the commit.
- When rxhash is enabled on eth2, mvpp2_rss_port_c2_enable() reports
that c2.attr[0] and c2.attr[2] are written back containing:
- with 895586d5dc32, failing: 00200000 40000000
- without 895586d5dc32, working: 04000000 40000000
- When disabling rxhash, c2.attr[0] and c2.attr[2] are written back as:
04000000 00000000
The second value represents the MVPP22_CLS_C2_ATTR2_RSS_EN bit, the
first value is the queue number, which comprises two fields. The high
5 bits are 24:29 and the low three are 21:23 inclusive. This comes
from:
c2.attr[0] = MVPP22_CLS_C2_ATTR0_QHIGH(qh) |
MVPP22_CLS_C2_ATTR0_QLOW(ql);
So, the working case gives eth2 a queue id of 4.0, or 32 as per
port->first_rxq, and the non-working case a queue id of 0.1, or 1.
The allocation of queue IDs seems to be in mvpp2_port_probe():
if (priv->hw_version == MVPP21)
port->first_rxq = port->id * port->nrxqs;
else
port->first_rxq = port->id * priv->max_port_rxqs;
Where:
if (priv->hw_version == MVPP21)
priv->max_port_rxqs = 8;
else
priv->max_port_rxqs = 32;
Making the port 0 (eth0 / eth1) have port->first_rxq = 0, and port 1
(eth2) be 32. It seems the idea is that the first 32 queues belong to
port 0, the second 32 queues belong to port 1, etc.
mvpp2_rss_port_c2_enable() gets the queue number from it's parameter,
'ctx', which comes from mvpp22_rss_ctx(port, 0). This returns
port->rss_ctx[0].
mvpp22_rss_context_create() is responsible for allocating that, which
it does by looking for an unallocated priv->rss_tables[] pointer. This
table is shared amongst all ports on the CP silicon.
When we write the tables in mvpp22_rss_fill_table(), the RSS table
entry is defined by:
u32 sel = MVPP22_RSS_INDEX_TABLE(rss_ctx) |
MVPP22_RSS_INDEX_TABLE_ENTRY(i);
where rss_ctx is the context ID (queue number) and i is the index in
the table.
If we look at what is written:
- The first table to be written has "sel" values of 00000000..0000001f,
containing values 0..3. This appears to be for eth1. This is table 0,
RX queue number 0.
- The second table has "sel" values of 00000100..0000011f, and appears
to be for eth2. These contain values 0x20..0x23. This is table 1,
RX queue number 0.
- The third table has "sel" values of 00000200..0000021f, and appears
to be for eth3. These contain values 0x40..0x43. This is table 2,
RX queue number 0.
How do queue numbers translate to the RSS table? There is another
table - the RXQ2RSS table, indexed by the MVPP22_RSS_INDEX_QUEUE field
of MVPP22_RSS_INDEX and accessed through the MVPP22_RXQ2RSS_TABLE
register. Before 895586d5dc32, it was:
mvpp2_write(priv, MVPP22_RSS_INDEX,
MVPP22_RSS_INDEX_QUEUE(port->first_rxq));
mvpp2_write(priv, MVPP22_RXQ2RSS_TABLE,
MVPP22_RSS_TABLE_POINTER(port->id));
and after:
mvpp2_write(priv, MVPP22_RSS_INDEX, MVPP22_RSS_INDEX_QUEUE(ctx));
mvpp2_write(priv, MVPP22_RXQ2RSS_TABLE, MVPP22_RSS_TABLE_POINTER(ctx));
Before the commit, for eth2, that would've contained '32' for the
index and '1' for the table pointer - mapping queue 32 to table 1.
Remember that this is queue-high.queue-low of 4.0.
After the commit, we appear to map queue 1 to table 1. That again
looks fine on the face of it.
Section 9.3.1 of the A8040 manual seems indicate the reason that the
queue number is separated. queue-low seems to always come from the
classifier, whereas queue-high can be from the ingress physical port
number or the classifier depending on the MVPP2_CLS_SWFWD_PCTRL_REG.
We set the port bit in MVPP2_CLS_SWFWD_PCTRL_REG, meaning that queue-high
comes from the MVPP2_CLS_SWFWD_P2HQ_REG() register... and this seems to
be where our bug comes from.
mvpp2_cls_oversize_rxq_set() sets this up as:
mvpp2_write(port->priv, MVPP2_CLS_SWFWD_P2HQ_REG(port->id),
(port->first_rxq >> MVPP2_CLS_OVERSIZE_RXQ_LOW_BITS));
val = mvpp2_read(port->priv, MVPP2_CLS_SWFWD_PCTRL_REG);
val |= MVPP2_CLS_SWFWD_PCTRL_MASK(port->id);
mvpp2_write(port->priv, MVPP2_CLS_SWFWD_PCTRL_REG, val);
Setting the MVPP2_CLS_SWFWD_PCTRL_MASK bit means that the queue-high
for eth2 is _always_ 4, so only queues 32 through 39 inclusive are
available to eth2. Yet, we're trying to tell the classifier to set
queue-high, which will be ignored, to zero. Hence, the queue-high
field (MVPP22_CLS_C2_ATTR0_QHIGH()) from the classifier will be
ignored.
This means we end up directing traffic from eth2 not to queue 1, but
to queue 33, and then we tell it to look up queue 33 in the RSS table.
However, RSS table has not been programmed for queue 33, and so it ends
up (presumably) dropping the packets.
It seems that mvpp22_rss_context_create() doesn't take account of the
fact that the upper 5 bits of the queue ID can't actually be changed
due to the settings in mvpp2_cls_oversize_rxq_set(), _or_ it seems that
mvpp2_cls_oversize_rxq_set() has been missed in this commit. Either
way, these two functions mutually disagree with what queue number
should be used.
Looking deeper into what mvpp2_cls_oversize_rxq_set() and the MTU
validation is doing, it seems that MVPP2_CLS_SWFWD_P2HQ_REG() is used
for over-sized packets attempting to egress through this port. With
the classifier having had RSS enabled and directing eth2 traffic to
queue 1, we may still have packets appearing on queue 32 for this port.
However, the only way we may end up with over-sized packets attempting
to egress through eth2 - is if the A8040 forwards frames between its
ports. From what I can see, we don't support that feature, and the
kernel restricts the egress packet size to the MTU. In any case, if we
were to attempt to transmit an oversized packet, we have no support in
the kernel to deal with that appearing in the port's receive queue.
So, this patch attempts to solve the issue by clearing the
MVPP2_CLS_SWFWD_PCTRL_MASK() bit, allowing MVPP22_CLS_C2_ATTR0_QHIGH()
from the classifier to define the queue-high field of the queue number.
My testing seems to confirm my findings above - clearing this bit
means that if I enable rxhash on eth2, the interface can then pass
traffic, as we are now directing traffic to RX queue 1 rather than
queue 33. Traffic still seems to work with rxhash off as well.
Reported-by: Matteo Croce <mcroce@redhat.com>
Tested-by: Matteo Croce <mcroce@redhat.com>
Fixes: 895586d5dc32 ("net: mvpp2: cls: Use RSS contexts to handle RSS tables")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
@@ -1070,7 +1070,7 @@ void mvpp2_cls_oversize_rxq_set(struct m
(port->first_rxq >> MVPP2_CLS_OVERSIZE_RXQ_LOW_BITS));
val = mvpp2_read(port->priv, MVPP2_CLS_SWFWD_PCTRL_REG);
- val |= MVPP2_CLS_SWFWD_PCTRL_MASK(port->id);
+ val &= ~MVPP2_CLS_SWFWD_PCTRL_MASK(port->id);
mvpp2_write(port->priv, MVPP2_CLS_SWFWD_PCTRL_REG, val);
}
^ permalink raw reply
* [PATCH 5.6 016/177] net sched: fix reporting the first-time use timestamp
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jamal Hadi Salim, Roman Mashak,
David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Roman Mashak <mrv@mojatatu.com>
[ Upstream commit b15e62631c5f19fea9895f7632dae9c1b27fe0cd ]
When a new action is installed, firstuse field of 'tcf_t' is explicitly set
to 0. Value of zero means "new action, not yet used"; as a packet hits the
action, 'firstuse' is stamped with the current jiffies value.
tcf_tm_dump() should return 0 for firstuse if action has not yet been hit.
Fixes: 48d8ee1694dd ("net sched actions: aggregate dumping of actions timeinfo")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/act_api.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -69,7 +69,8 @@ static inline void tcf_tm_dump(struct tc
{
dtm->install = jiffies_to_clock_t(jiffies - stm->install);
dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse);
- dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse);
+ dtm->firstuse = stm->firstuse ?
+ jiffies_to_clock_t(jiffies - stm->firstuse) : 0;
dtm->expires = jiffies_to_clock_t(stm->expires);
}
^ permalink raw reply
* [PATCH 5.6 014/177] net: qrtr: Fix passing invalid reference to qrtr_local_enqueue()
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, kbuild test robot, Julia Lawall,
Manivannan Sadhasivam, Bjorn Andersson, David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[ Upstream commit d28ea1fbbf437054ef339afec241019f2c4e2bb6 ]
Once the traversal of the list is completed with list_for_each_entry(),
the iterator (node) will point to an invalid object. So passing this to
qrtr_local_enqueue() which is outside of the iterator block is erroneous
eventhough the object is not used.
So fix this by passing NULL to qrtr_local_enqueue().
Fixes: bdabad3e363d ("net: Add Qualcomm IPC router")
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/qrtr/qrtr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -855,7 +855,7 @@ static int qrtr_bcast_enqueue(struct qrt
}
mutex_unlock(&qrtr_node_lock);
- qrtr_local_enqueue(node, skb, type, from, to);
+ qrtr_local_enqueue(NULL, skb, type, from, to);
return 0;
}
^ permalink raw reply
* [PATCH 5.6 018/177] nexthop: Fix attribute checking for groups
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, ASSOGBA Emery, David Ahern,
David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: David Ahern <dsahern@gmail.com>
[ Upstream commit 84be69b869a5a496a6cfde9b3c29509207a1f1fa ]
For nexthop groups, attributes after NHA_GROUP_TYPE are invalid, but
nh_check_attr_group starts checking at NHA_GROUP. The group type defaults
to multipath and the NHA_GROUP_TYPE is currently optional so this has
slipped through so far. Fix the attribute checking to handle support of
new group types.
Fixes: 430a049190de ("nexthop: Add support for nexthop groups")
Signed-off-by: ASSOGBA Emery <assogba.emery@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/nexthop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -434,7 +434,7 @@ static int nh_check_attr_group(struct ne
if (!valid_group_nh(nh, len, extack))
return -EINVAL;
}
- for (i = NHA_GROUP + 1; i < __NHA_MAX; ++i) {
+ for (i = NHA_GROUP_TYPE + 1; i < __NHA_MAX; ++i) {
if (!tb[i])
continue;
^ permalink raw reply
* [PATCH 5.6 019/177] r8152: support additional Microsoft Surface Ethernet Adapter variant
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Marc Payne, David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Marc Payne <marc.payne@mdpsys.co.uk>
[ Upstream commit c27a204383616efba5a4194075e90819961ff66a ]
Device id 0927 is the RTL8153B-based component of the 'Surface USB-C to
Ethernet and USB Adapter' and may be used as a component of other devices
in future. Tested and working with the r8152 driver.
Update the cdc_ether blacklist due to the RTL8153 'network jam on suspend'
issue which this device will cause (personally confirmed).
Signed-off-by: Marc Payne <marc.payne@mdpsys.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/usb/cdc_ether.c | 11 +++++++++--
drivers/net/usb/r8152.c | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -815,14 +815,21 @@ static const struct usb_device_id produc
.driver_info = 0,
},
-/* Microsoft Surface 3 dock (based on Realtek RTL8153) */
+/* Microsoft Surface Ethernet Adapter (based on Realtek RTL8153) */
{
USB_DEVICE_AND_INTERFACE_INFO(MICROSOFT_VENDOR_ID, 0x07c6, USB_CLASS_COMM,
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
.driver_info = 0,
},
- /* TP-LINK UE300 USB 3.0 Ethernet Adapters (based on Realtek RTL8153) */
+/* Microsoft Surface Ethernet Adapter (based on Realtek RTL8153B) */
+{
+ USB_DEVICE_AND_INTERFACE_INFO(MICROSOFT_VENDOR_ID, 0x0927, USB_CLASS_COMM,
+ USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+ .driver_info = 0,
+},
+
+/* TP-LINK UE300 USB 3.0 Ethernet Adapters (based on Realtek RTL8153) */
{
USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, 0x0601, USB_CLASS_COMM,
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -6901,6 +6901,7 @@ static const struct usb_device_id rtl815
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)},
{REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)},
{REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)},
+ {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927)},
{REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)},
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)},
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)},
^ permalink raw reply
* [PATCH 5.6 025/177] net/mlx5: Fix memory leak in mlx5_events_init
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Moshe Shemesh, Tariq Toukan,
Saeed Mahameed
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Moshe Shemesh <moshe@mellanox.com>
[ Upstream commit df14ad1eccb04a4a28c90389214dbacab085b244 ]
Fix memory leak in mlx5_events_init(), in case
create_single_thread_workqueue() fails, events
struct should be freed.
Fixes: 5d3c537f9070 ("net/mlx5: Handle event of power detection in the PCIE slot")
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx5/core/events.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/mellanox/mlx5/core/events.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c
@@ -346,8 +346,10 @@ int mlx5_events_init(struct mlx5_core_de
events->dev = dev;
dev->priv.events = events;
events->wq = create_singlethread_workqueue("mlx5_events");
- if (!events->wq)
+ if (!events->wq) {
+ kfree(events);
return -ENOMEM;
+ }
INIT_WORK(&events->pcie_core_work, mlx5_pcie_event);
return 0;
^ permalink raw reply
* [PATCH 5.6 029/177] wireguard: queueing: preserve flow hash across packet scrubbing
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dave Taht, Jason A. Donenfeld,
David S. Miller, Toke Høiland-Jørgensen
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
[ Upstream commit c78a0b4a78839d572d8a80f6a62221c0d7843135 ]
It's important that we clear most header fields during encapsulation and
decapsulation, because the packet is substantially changed, and we don't
want any info leak or logic bug due to an accidental correlation. But,
for encapsulation, it's wrong to clear skb->hash, since it's used by
fq_codel and flow dissection in general. Without it, classification does
not proceed as usual. This change might make it easier to estimate the
number of innerflows by examining clustering of out of order packets,
but this shouldn't open up anything that can't already be inferred
otherwise (e.g. syn packet size inference), and fq_codel can be disabled
anyway.
Furthermore, it might be the case that the hash isn't used or queried at
all until after wireguard transmits the encrypted UDP packet, which
means skb->hash might still be zero at this point, and thus no hash
taken over the inner packet data. In order to address this situation, we
force a calculation of skb->hash before encrypting packet data.
Of course this means that fq_codel might transmit packets slightly more
out of order than usual. Toke did some testing on beefy machines with
high quantities of parallel flows and found that increasing the
reply-attack counter to 8192 takes care of the most pathological cases
pretty well.
Reported-by: Dave Taht <dave.taht@gmail.com>
Reviewed-and-tested-by: Toke Høiland-Jørgensen <toke@toke.dk>
Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireguard/messages.h | 2 +-
drivers/net/wireguard/queueing.h | 10 +++++++++-
drivers/net/wireguard/receive.c | 2 +-
drivers/net/wireguard/send.c | 7 ++++++-
4 files changed, 17 insertions(+), 4 deletions(-)
--- a/drivers/net/wireguard/messages.h
+++ b/drivers/net/wireguard/messages.h
@@ -32,7 +32,7 @@ enum cookie_values {
};
enum counter_values {
- COUNTER_BITS_TOTAL = 2048,
+ COUNTER_BITS_TOTAL = 8192,
COUNTER_REDUNDANT_BITS = BITS_PER_LONG,
COUNTER_WINDOW_SIZE = COUNTER_BITS_TOTAL - COUNTER_REDUNDANT_BITS
};
--- a/drivers/net/wireguard/queueing.h
+++ b/drivers/net/wireguard/queueing.h
@@ -87,12 +87,20 @@ static inline bool wg_check_packet_proto
return real_protocol && skb->protocol == real_protocol;
}
-static inline void wg_reset_packet(struct sk_buff *skb)
+static inline void wg_reset_packet(struct sk_buff *skb, bool encapsulating)
{
+ u8 l4_hash = skb->l4_hash;
+ u8 sw_hash = skb->sw_hash;
+ u32 hash = skb->hash;
skb_scrub_packet(skb, true);
memset(&skb->headers_start, 0,
offsetof(struct sk_buff, headers_end) -
offsetof(struct sk_buff, headers_start));
+ if (encapsulating) {
+ skb->l4_hash = l4_hash;
+ skb->sw_hash = sw_hash;
+ skb->hash = hash;
+ }
skb->queue_mapping = 0;
skb->nohdr = 0;
skb->peeked = 0;
--- a/drivers/net/wireguard/receive.c
+++ b/drivers/net/wireguard/receive.c
@@ -485,7 +485,7 @@ int wg_packet_rx_poll(struct napi_struct
if (unlikely(wg_socket_endpoint_from_skb(&endpoint, skb)))
goto next;
- wg_reset_packet(skb);
+ wg_reset_packet(skb, false);
wg_packet_consume_data_done(peer, skb, &endpoint);
free = false;
--- a/drivers/net/wireguard/send.c
+++ b/drivers/net/wireguard/send.c
@@ -170,6 +170,11 @@ static bool encrypt_packet(struct sk_buf
struct sk_buff *trailer;
int num_frags;
+ /* Force hash calculation before encryption so that flow analysis is
+ * consistent over the inner packet.
+ */
+ skb_get_hash(skb);
+
/* Calculate lengths. */
padding_len = calculate_skb_padding(skb);
trailer_len = padding_len + noise_encrypted_len(0);
@@ -298,7 +303,7 @@ void wg_packet_encrypt_worker(struct wor
skb_list_walk_safe(first, skb, next) {
if (likely(encrypt_packet(skb,
PACKET_CB(first)->keypair))) {
- wg_reset_packet(skb);
+ wg_reset_packet(skb, true);
} else {
state = PACKET_STATE_DEAD;
break;
^ permalink raw reply
* [PATCH 5.6 034/177] Revert "virtio-balloon: Revert "virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM""
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jiri Slaby, David Hildenbrand,
Michael S. Tsirkin, Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This reverts commit 37681282be8e89ae8baf26753bf489837d74e08e which is
commit 835a6a649d0dd1b1f46759eb60fff2f63ed253a7 upstream.
Jiri and David agree that it is not needed in the 5.6.y tree, so revert
it.
Reported-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: David Hildenbrand <david@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/virtio/virtio_balloon.c | 107 ++++++++++++++++------------------------
1 file changed, 44 insertions(+), 63 deletions(-)
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/balloon_compaction.h>
+#include <linux/oom.h>
#include <linux/wait.h>
#include <linux/mm.h>
#include <linux/mount.h>
@@ -27,7 +28,9 @@
*/
#define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
#define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
-#define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
+/* Maximum number of (4k) pages to deflate on OOM notifications. */
+#define VIRTIO_BALLOON_OOM_NR_PAGES 256
+#define VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY 80
#define VIRTIO_BALLOON_FREE_PAGE_ALLOC_FLAG (__GFP_NORETRY | __GFP_NOWARN | \
__GFP_NOMEMALLOC)
@@ -112,8 +115,11 @@ struct virtio_balloon {
/* Memory statistics */
struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR];
- /* To register a shrinker to shrink memory upon memory pressure */
+ /* Shrinker to return free pages - VIRTIO_BALLOON_F_FREE_PAGE_HINT */
struct shrinker shrinker;
+
+ /* OOM notifier to deflate on OOM - VIRTIO_BALLOON_F_DEFLATE_ON_OOM */
+ struct notifier_block oom_nb;
};
static struct virtio_device_id id_table[] = {
@@ -788,50 +794,13 @@ static unsigned long shrink_free_pages(s
return blocks_freed * VIRTIO_BALLOON_HINT_BLOCK_PAGES;
}
-static unsigned long leak_balloon_pages(struct virtio_balloon *vb,
- unsigned long pages_to_free)
-{
- return leak_balloon(vb, pages_to_free * VIRTIO_BALLOON_PAGES_PER_PAGE) /
- VIRTIO_BALLOON_PAGES_PER_PAGE;
-}
-
-static unsigned long shrink_balloon_pages(struct virtio_balloon *vb,
- unsigned long pages_to_free)
-{
- unsigned long pages_freed = 0;
-
- /*
- * One invocation of leak_balloon can deflate at most
- * VIRTIO_BALLOON_ARRAY_PFNS_MAX balloon pages, so we call it
- * multiple times to deflate pages till reaching pages_to_free.
- */
- while (vb->num_pages && pages_freed < pages_to_free)
- pages_freed += leak_balloon_pages(vb,
- pages_to_free - pages_freed);
-
- update_balloon_size(vb);
-
- return pages_freed;
-}
-
static unsigned long virtio_balloon_shrinker_scan(struct shrinker *shrinker,
struct shrink_control *sc)
{
- unsigned long pages_to_free, pages_freed = 0;
struct virtio_balloon *vb = container_of(shrinker,
struct virtio_balloon, shrinker);
- pages_to_free = sc->nr_to_scan;
-
- if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT))
- pages_freed = shrink_free_pages(vb, pages_to_free);
-
- if (pages_freed >= pages_to_free)
- return pages_freed;
-
- pages_freed += shrink_balloon_pages(vb, pages_to_free - pages_freed);
-
- return pages_freed;
+ return shrink_free_pages(vb, sc->nr_to_scan);
}
static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker,
@@ -839,26 +808,22 @@ static unsigned long virtio_balloon_shri
{
struct virtio_balloon *vb = container_of(shrinker,
struct virtio_balloon, shrinker);
- unsigned long count;
-
- count = vb->num_pages / VIRTIO_BALLOON_PAGES_PER_PAGE;
- count += vb->num_free_page_blocks * VIRTIO_BALLOON_HINT_BLOCK_PAGES;
- return count;
+ return vb->num_free_page_blocks * VIRTIO_BALLOON_HINT_BLOCK_PAGES;
}
-static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb)
+static int virtio_balloon_oom_notify(struct notifier_block *nb,
+ unsigned long dummy, void *parm)
{
- unregister_shrinker(&vb->shrinker);
-}
+ struct virtio_balloon *vb = container_of(nb,
+ struct virtio_balloon, oom_nb);
+ unsigned long *freed = parm;
-static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
-{
- vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
- vb->shrinker.count_objects = virtio_balloon_shrinker_count;
- vb->shrinker.seeks = DEFAULT_SEEKS;
+ *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
+ VIRTIO_BALLOON_PAGES_PER_PAGE;
+ update_balloon_size(vb);
- return register_shrinker(&vb->shrinker);
+ return NOTIFY_OK;
}
static int virtballoon_probe(struct virtio_device *vdev)
@@ -935,22 +900,35 @@ static int virtballoon_probe(struct virt
virtio_cwrite(vb->vdev, struct virtio_balloon_config,
poison_val, &poison_val);
}
- }
- /*
- * We continue to use VIRTIO_BALLOON_F_DEFLATE_ON_OOM to decide if a
- * shrinker needs to be registered to relieve memory pressure.
- */
- if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
- err = virtio_balloon_register_shrinker(vb);
+
+ /*
+ * We're allowed to reuse any free pages, even if they are
+ * still to be processed by the host.
+ */
+ vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
+ vb->shrinker.count_objects = virtio_balloon_shrinker_count;
+ vb->shrinker.seeks = DEFAULT_SEEKS;
+ err = register_shrinker(&vb->shrinker);
if (err)
goto out_del_balloon_wq;
}
+ if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
+ vb->oom_nb.notifier_call = virtio_balloon_oom_notify;
+ vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY;
+ err = register_oom_notifier(&vb->oom_nb);
+ if (err < 0)
+ goto out_unregister_shrinker;
+ }
+
virtio_device_ready(vdev);
if (towards_target(vb))
virtballoon_changed(vdev);
return 0;
+out_unregister_shrinker:
+ if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT))
+ unregister_shrinker(&vb->shrinker);
out_del_balloon_wq:
if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT))
destroy_workqueue(vb->balloon_wq);
@@ -989,8 +967,11 @@ static void virtballoon_remove(struct vi
{
struct virtio_balloon *vb = vdev->priv;
- if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
- virtio_balloon_unregister_shrinker(vb);
+ if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
+ unregister_oom_notifier(&vb->oom_nb);
+ if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT))
+ unregister_shrinker(&vb->shrinker);
+
spin_lock_irq(&vb->stop_update_lock);
vb->stop_update = true;
spin_unlock_irq(&vb->stop_update_lock);
^ permalink raw reply
* [PATCH 5.6 036/177] net/mlx5: Annotate mutex destroy for root ns
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Roi Dayan, Mark Bloch, Saeed Mahameed
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Roi Dayan <roid@mellanox.com>
commit 9ca415399dae133b00273a4283ef31d003a6818d upstream.
Invoke mutex_destroy() to catch any errors.
Fixes: 2cc43b494a6c ("net/mlx5_core: Managing root flow table")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -416,6 +416,12 @@ static void del_sw_ns(struct fs_node *no
static void del_sw_prio(struct fs_node *node)
{
+ struct mlx5_flow_root_namespace *root_ns;
+ struct mlx5_flow_namespace *ns;
+
+ fs_get_obj(ns, node);
+ root_ns = container_of(ns, struct mlx5_flow_root_namespace, ns);
+ mutex_destroy(&root_ns->chain_lock);
kfree(node);
}
^ permalink raw reply
* [PATCH 5.6 006/177] net: dsa: mt7530: fix roaming from DSA user ports
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, DENG Qingfang, David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: DENG Qingfang <dqfext@gmail.com>
[ Upstream commit 5e5502e012b8129e11be616acb0f9c34bc8f8adb ]
When a client moves from a DSA user port to a software port in a bridge,
it cannot reach any other clients that connected to the DSA user ports.
That is because SA learning on the CPU port is disabled, so the switch
ignores the client's frames from the CPU port and still thinks it is at
the user port.
Fix it by enabling SA learning on the CPU port.
To prevent the switch from learning from flooding frames from the CPU
port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames,
and let the switch flood them instead of trapping to the CPU port.
Multicast frames still need to be trapped to the CPU port for snooping,
so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames
to disable SA learning.
Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/dsa/mt7530.c | 9 ++-------
drivers/net/dsa/mt7530.h | 1 +
net/dsa/tag_mtk.c | 15 +++++++++++++++
3 files changed, 18 insertions(+), 7 deletions(-)
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -639,11 +639,8 @@ mt7530_cpu_port_enable(struct mt7530_pri
mt7530_write(priv, MT7530_PVC_P(port),
PORT_SPEC_TAG);
- /* Disable auto learning on the cpu port */
- mt7530_set(priv, MT7530_PSC_P(port), SA_DIS);
-
- /* Unknown unicast frame fordwarding to the cpu port */
- mt7530_set(priv, MT7530_MFC, UNU_FFP(BIT(port)));
+ /* Unknown multicast frame forwarding to the cpu port */
+ mt7530_rmw(priv, MT7530_MFC, UNM_FFP_MASK, UNM_FFP(BIT(port)));
/* Set CPU port number */
if (priv->id == ID_MT7621)
@@ -1247,8 +1244,6 @@ mt7530_setup(struct dsa_switch *ds)
/* Enable and reset MIB counters */
mt7530_mib_reset(ds);
- mt7530_clear(priv, MT7530_MFC, UNU_FFP_MASK);
-
for (i = 0; i < MT7530_NUM_PORTS; i++) {
/* Disable forwarding by default on all ports */
mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
--- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h
@@ -31,6 +31,7 @@ enum {
#define MT7530_MFC 0x10
#define BC_FFP(x) (((x) & 0xff) << 24)
#define UNM_FFP(x) (((x) & 0xff) << 16)
+#define UNM_FFP_MASK UNM_FFP(~0)
#define UNU_FFP(x) (((x) & 0xff) << 8)
#define UNU_FFP_MASK UNU_FFP(~0)
#define CPU_EN BIT(7)
--- a/net/dsa/tag_mtk.c
+++ b/net/dsa/tag_mtk.c
@@ -15,6 +15,7 @@
#define MTK_HDR_XMIT_TAGGED_TPID_8100 1
#define MTK_HDR_RECV_SOURCE_PORT_MASK GENMASK(2, 0)
#define MTK_HDR_XMIT_DP_BIT_MASK GENMASK(5, 0)
+#define MTK_HDR_XMIT_SA_DIS BIT(6)
static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb,
struct net_device *dev)
@@ -22,6 +23,9 @@ static struct sk_buff *mtk_tag_xmit(stru
struct dsa_port *dp = dsa_slave_to_port(dev);
u8 *mtk_tag;
bool is_vlan_skb = true;
+ unsigned char *dest = eth_hdr(skb)->h_dest;
+ bool is_multicast_skb = is_multicast_ether_addr(dest) &&
+ !is_broadcast_ether_addr(dest);
/* Build the special tag after the MAC Source Address. If VLAN header
* is present, it's required that VLAN header and special tag is
@@ -47,6 +51,10 @@ static struct sk_buff *mtk_tag_xmit(stru
MTK_HDR_XMIT_UNTAGGED;
mtk_tag[1] = (1 << dp->index) & MTK_HDR_XMIT_DP_BIT_MASK;
+ /* Disable SA learning for multicast frames */
+ if (unlikely(is_multicast_skb))
+ mtk_tag[1] |= MTK_HDR_XMIT_SA_DIS;
+
/* Tag control information is kept for 802.1Q */
if (!is_vlan_skb) {
mtk_tag[2] = 0;
@@ -61,6 +69,9 @@ static struct sk_buff *mtk_tag_rcv(struc
{
int port;
__be16 *phdr, hdr;
+ unsigned char *dest = eth_hdr(skb)->h_dest;
+ bool is_multicast_skb = is_multicast_ether_addr(dest) &&
+ !is_broadcast_ether_addr(dest);
if (unlikely(!pskb_may_pull(skb, MTK_HDR_LEN)))
return NULL;
@@ -86,6 +97,10 @@ static struct sk_buff *mtk_tag_rcv(struc
if (!skb->dev)
return NULL;
+ /* Only unicast or broadcast frames are offloaded */
+ if (likely(!is_multicast_skb))
+ skb->offload_fwd_mark = 1;
+
return skb;
}
^ permalink raw reply
* [PATCH 5.6 007/177] net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Grygorii Strashko <grygorii.strashko@ti.com>
[ Upstream commit 4c64b83d03f4aafcdf710caad994cbc855802e74 ]
vlan_for_each() are required to be called with rtnl_lock taken, otherwise
ASSERT_RTNL() warning will be triggered - which happens now during System
resume from suspend:
cpsw_suspend()
|- cpsw_ndo_stop()
|- __hw_addr_ref_unsync_dev()
|- cpsw_purge_all_mc()
|- vlan_for_each()
|- ASSERT_RTNL();
Hence, fix it by surrounding cpsw_ndo_stop() by rtnl_lock/unlock() calls.
Fixes: 15180eca569b ("net: ethernet: ti: cpsw: fix vlan mcast")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/ti/cpsw.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1752,11 +1752,15 @@ static int cpsw_suspend(struct device *d
struct cpsw_common *cpsw = dev_get_drvdata(dev);
int i;
+ rtnl_lock();
+
for (i = 0; i < cpsw->data.slaves; i++)
if (cpsw->slaves[i].ndev)
if (netif_running(cpsw->slaves[i].ndev))
cpsw_ndo_stop(cpsw->slaves[i].ndev);
+ rtnl_unlock();
+
/* Select sleep pin state */
pinctrl_pm_select_sleep_state(dev);
^ permalink raw reply
* [PATCH 5.6 050/177] ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Johan Jonker, Heiko Stuebner,
Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Johan Jonker <jbx6244@gmail.com>
[ Upstream commit 855bdca1781c79eb661f89c8944c4a719ce720e8 ]
A test with the command below gives these errors:
arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-0:
'#address-cells' is a required property
arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-1:
'#address-cells' is a required property
arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-0:
'#address-cells' is a required property
arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-1:
'#address-cells' is a required property
The $nodename pattern for spi nodes is
"^spi(@.*|-[0-9a-f])*$". To prevent warnings rename
'spi-0' and 'spi-1' pinctrl sub nodenames to
'spi0' and 'spi1' in 'rk322x.dtsi'.
make ARCH=arm dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/spi-controller.yaml
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200424123923.8192-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/rk322x.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 729119952c68..a83f65486ad4 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -1033,7 +1033,7 @@
};
};
- spi-0 {
+ spi0 {
spi0_clk: spi0-clk {
rockchip,pins = <0 RK_PB1 2 &pcfg_pull_up>;
};
@@ -1051,7 +1051,7 @@
};
};
- spi-1 {
+ spi1 {
spi1_clk: spi1-clk {
rockchip,pins = <0 RK_PC7 2 &pcfg_pull_up>;
};
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 000/177] 5.6.16-rc1 review
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
ben.hutchings, lkft-triage, stable
This is the start of the stable review cycle for the 5.6.16 release.
There are 177 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 03 Jun 2020 17:38:19 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.6.16-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 5.6.16-rc1
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build
Nathan Chancellor <natechancellor@gmail.com>
netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: conntrack: comparison of unsigned in cthelper confirmation
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Revert "Input: i8042 - add ThinkPad S230u to i8042 nomux list"
Petr Mladek <pmladek@suse.com>
powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again
Qiushi Wu <wu000273@umn.edu>
bonding: Fix reference count leak in bond_sysfs_slave_add.
Vladimir Oltean <vladimir.oltean@nxp.com>
net: dsa: declare lockless TX feature for slave ports
David Ahern <dsahern@gmail.com>
ipv4: nexthop version of fib_info_nh_uses_dev
David Ahern <dsahern@gmail.com>
nexthop: Expand nexthop_is_multipath in a few places
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
nexthops: don't modify published nexthop groups
David Ahern <dsahern@gmail.com>
nexthops: Move code from remove_nexthop_from_groups to remove_nh_grp_entry
Eric Dumazet <edumazet@google.com>
crypto: chelsio/chtls: properly set tp->lsndtime
Qiushi Wu <wu000273@umn.edu>
qlcnic: fix missing release in qlcnic_83xx_interrupt_test.
Björn Töpel <bjorn.topel@intel.com>
xsk: Add overflow check for u64 division, stored into u32
Jay Lang <jaytlang@mit.edu>
x86/ioperm: Prevent a memory leak when fork fails
Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
ieee80211: Fix incorrect mask for default PE duration
Edwin Peer <edwin.peer@broadcom.com>
bnxt_en: fix firmware message length endianness
Michael Chan <michael.chan@broadcom.com>
bnxt_en: Fix accumulation of bp->net_stats_prev.
Xin Long <lucien.xin@gmail.com>
esp6: get the right proto for transport mode in esp6_gso_encap
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nfnetlink_cthelper: unbreak userspace helper support
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: conntrack: make conntrack userspace helpers work again
Phil Sutter <phil@nwl.cc>
netfilter: ipset: Fix subcounter update skip
Michael Braun <michael-dev@fami-braun.de>
netfilter: nft_reject_bridge: enable reject with bridge vlan
Xin Long <lucien.xin@gmail.com>
ip_vti: receive ipip packet by calling ip_tunnel_rcv
Antony Antony <antony@phenome.org>
xfrm: fix error in comment
Xin Long <lucien.xin@gmail.com>
xfrm: fix a NULL-ptr deref in xfrm_local_error
Xin Long <lucien.xin@gmail.com>
xfrm: fix a warning in xfrm_policy_insert_list
Nicolas Dichtel <nicolas.dichtel@6wind.com>
xfrm interface: fix oops when deleting a x-netns interface
Xin Long <lucien.xin@gmail.com>
xfrm: call xfrm_output_gso when inner_protocol is set in xfrm_output
Sabrina Dubroca <sd@queasysnail.net>
xfrm: espintcp: save and call old ->sk_destruct
Xin Long <lucien.xin@gmail.com>
xfrm: remove the xfrm_state_put call becofe going to out_reset
Xin Long <lucien.xin@gmail.com>
xfrm: do pskb_pull properly in __xfrm_transport_prep
Xin Long <lucien.xin@gmail.com>
xfrm: allow to accept packets with ipv6 NEXTHDR_HOP in xfrm_input
Al Viro <viro@zeniv.linux.org.uk>
copy_xstate_to_kernel(): don't leave parts of destination uninitialized
Alexander Dahl <post@lespocky.de>
x86/dma: Fix max PFN arithmetic overflow on 32 bit systems
Linus Lüssing <ll@simonwunderlich.de>
mac80211: mesh: fix discovery timer re-arming issue / crash
Johannes Berg <johannes.berg@intel.com>
cfg80211: fix debugfs rename crash
Helge Deller <deller@gmx.de>
parisc: Fix kernel panic in mem_init()
Qiushi Wu <wu000273@umn.edu>
iommu: Fix reference count leak in iommu_group_alloc.
Linus Walleij <linus.walleij@linaro.org>
gpio: fix locking open drain IRQ lines
Jens Axboe <axboe@kernel.dk>
Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT"
Arnd Bergmann <arnd@arndb.de>
include/asm-generic/topology.h: guard cpumask_of_node() macro argument
Alexander Potapenko <glider@google.com>
fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()
Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
mm: remove VM_BUG_ON(PageSlab()) from page_mapcount()
Hugh Dickins <hughd@google.com>
mm,thp: stop leaking unreleased file pages
Valentine Fatiev <valentinef@mellanox.com>
IB/ipoib: Fix double free of skb in case of multicast traffic in CM mode
Aric Cyr <aric.cyr@amd.com>
drm/amd/display: Fix potential integer wraparound resulting in a hang
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
drm/amd/display: Defer cursor lock until after VUPDATE
Aric Cyr <aric.cyr@amd.com>
drm/amd/display: Use cursor locking to prevent flip delays
Anthony Koo <Anthony.Koo@amd.com>
drm/amd/display: Added locking for atomic update stream and update planes
Anthony Koo <Anthony.Koo@amd.com>
drm/amd/display: Indicate dsc updates explicitly
Anthony Koo <Anthony.Koo@amd.com>
drm/amd/display: Split program front end part that occur outside lock
Simon Ser <contact@emersion.fr>
drm/amd/display: drop cursor position check in atomic test
Jason Gunthorpe <jgg@ziepe.ca>
RDMA/core: Fix double destruction of uobject
Jeff Layton <jlayton@kernel.org>
ceph: flush release queue when handling caps for unknown inode
Jerry Lee <leisurelysw24@gmail.com>
libceph: ignore pool overlay and cache logic on redirects
Kailang Yang <kailang@realtek.com>
ALSA: hda/realtek - Add new codec supported for ALC287
Takashi Iwai <tiwai@suse.de>
ALSA: usb-audio: Quirks for Gigabyte TRX40 Aorus Master onboard audio
Vinod Koul <vkoul@kernel.org>
clk: qcom: gcc: Fix parent for gpll0_out_even
Eric W. Biederman <ebiederm@xmission.com>
exec: Always set cap_ambient in cap_bprm_set_creds
Chris Chiu <chiu@endlessm.com>
ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC
Takashi Iwai <tiwai@suse.de>
ALSA: hda/realtek - Add a model for Thinkpad T570 without DAC workaround
Changming Liu <liu.changm@northeastern.edu>
ALSA: hwdep: fix a left shifting 1 by 31 UB bug
Qiushi Wu <wu000273@umn.edu>
RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()
Tiezhu Yang <yangtiezhu@loongson.cn>
gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()
Tiezhu Yang <yangtiezhu@loongson.cn>
gpio: pxa: Fix return value of pxa_gpio_probe()
Peng Hao <richard.peng@oppo.com>
mmc: block: Fix use-after-free issue for rpmb
Maor Gottlieb <maorg@mellanox.com>
RDMA/mlx5: Fix NULL pointer dereference in destroy_prefetch_work
Lubomir Rintel <lkundrak@v3.sk>
ARM: dts: mmp3: Drop usb-nop-xceiv from HSIC phy
Lubomir Rintel <lkundrak@v3.sk>
ARM: dts: mmp3-dell-ariel: Fix the SPI devices
Lubomir Rintel <lkundrak@v3.sk>
ARM: dts: mmp3: Use the MMP3 compatible string for /clocks
Hamish Martin <hamish.martin@alliedtelesis.co.nz>
ARM: dts: bcm: HR2: Fix PPI interrupt types
Vincent Stehlé <vincent.stehle@laposte.net>
ARM: dts: bcm2835-rpi-zero-w: Fix led polarity
Robert Beckett <bob.beckett@collabora.com>
ARM: dts/imx6q-bx50v3: Set display interface clock parents
Kaike Wan <kaike.wan@intel.com>
IB/qib: Call kobject_put() when kobject_init_and_add() fails
Paul Cercueil <paul@crapouillou.net>
gpu/drm: Ingenic: Fix opaque pointer casted to wrong type
Paul Cercueil <paul@crapouillou.net>
gpu/drm: ingenic: Fix bogus crtc_atomic_check callback
Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
soc: mediatek: cmdq: return send msg error code
Hsin-Yi Wang <hsinyi@chromium.org>
arm64: dts: mt8173: fix vcodec-enc clock
Takashi Iwai <tiwai@suse.de>
gpio: exar: Fix bad handling for ida_simple_get error path
Russell King <rmk+kernel@armlinux.org.uk>
ARM: uaccess: fix DACR mismatch with nested exceptions
Russell King <rmk+kernel@armlinux.org.uk>
ARM: uaccess: integrate uaccess_save and uaccess_restore
Russell King <rmk+kernel@armlinux.org.uk>
ARM: uaccess: consolidate uaccess asm to asm/uaccess-asm.h
Łukasz Stelmach <l.stelmach@samsung.com>
ARM: 8970/1: decompressor: increase tag size
Wei Yongjun <weiyongjun1@huawei.com>
Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
Evan Green <evgreen@chromium.org>
Input: synaptics-rmi4 - really fix attn_data use-after-free
Kevin Locke <kevin@kevinlocke.name>
Input: i8042 - add ThinkPad S230u to i8042 reset list
Sascha Hauer <s.hauer@pengutronix.de>
gpio: mvebu: Fix probing for chips without PWM
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Input: dlink-dir685-touchkeys - fix a typo in driver name
Łukasz Patron <priv.luk@gmail.com>
Input: xpad - add custom init packet for Xbox One S controllers
Brendan Shanks <bshanks@codeweavers.com>
Input: evdev - call input_flush_device() on release(), not flush()
Kevin Locke <kevin@kevinlocke.name>
Input: i8042 - add ThinkPad S230u to i8042 nomux list
James Hilliard <james.hilliard1@gmail.com>
Input: usbtouchscreen - add support for BonXeon TP
Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
drivers: net: hamradio: Fix suspicious RCU usage warning in bpqether.c
Matteo Croce <mcroce@redhat.com>
samples: bpf: Fix build error
Al Viro <viro@zeniv.linux.org.uk>
csky: Fixup raw_copy_from_user()
Steve French <stfrench@microsoft.com>
cifs: Fix null pointer check in cifs_read
Kefeng Wang <wangkefeng.wang@huawei.com>
riscv: pgtable: Fix __kernel_map_pages build error if NOMMU
Amy Shih <amy.shih@advantech.com.tw>
hwmon: (nct7904) Fix incorrect range of temperature limit registers
Bernard Zhao <bernard@vivo.com>
drm/meson: pm resume add return errno branch
Liu Yibin <jiulong@linux.alibaba.com>
csky: Fixup remove duplicate irq_disable
Mao Han <han_mao@linux.alibaba.com>
csky: Fixup perf callchain unwind
Liu Yibin <jiulong@linux.alibaba.com>
csky: Fixup msa highest 3 bits mask
Tero Kristo <t-kristo@ti.com>
clk: ti: am33xx: fix RTC clock parent
Kefeng Wang <wangkefeng.wang@huawei.com>
riscv: Add pgprot_writecombine/device and PAGE_SHARED defination if NOMMU
Kefeng Wang <wangkefeng.wang@huawei.com>
riscv: stacktrace: Fix undefined reference to `walk_stackframe'
Kefeng Wang <wangkefeng.wang@huawei.com>
riscv: Fix unmet direct dependencies built based on SOC_VIRT
Denis V. Lunev <den@openvz.org>
IB/i40iw: Remove bogus call to netdev_master_upper_dev_get()
Leo (Hanghong) Ma <hanghong.ma@amd.com>
drm/amd/amdgpu: Update update_config() logic
Arnd Bergmann <arnd@arndb.de>
net: freescale: select CONFIG_FIXED_PHY where needed
Masahiro Yamada <masahiroy@kernel.org>
usb: gadget: legacy: fix redundant initialization warnings
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
usb: phy: twl6030-usb: Fix a resource leak in an error handling path in 'twl6030_usb_probe()'
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
usb: dwc3: pci: Enable extcon driver for Intel Merrifield
Lei Xue <carmark.dlut@gmail.com>
cachefiles: Fix race between read_waiter and read_copier involving op->to_do
Felix Kuehling <Felix.Kuehling@amd.com>
drm/amdgpu: Use GEM obj reference for KFD BOs
Evan Quan <evan.quan@amd.com>
drm/amd/powerplay: perform PG ungate prior to CG ungate
Evan Quan <evan.quan@amd.com>
drm/amdgpu: drop unnecessary cancel_delayed_work_sync on PG ungate
Andreas Gruenbacher <agruenba@redhat.com>
gfs2: Grab glock reference sooner in gfs2_add_revoke
Bob Peterson <rpeterso@redhat.com>
gfs2: don't call quota_unhold if quotas are not locked
Bob Peterson <rpeterso@redhat.com>
gfs2: move privileged user check to gfs2_quota_lock_check
John Stultz <john.stultz@linaro.org>
kselftests: dmabuf-heaps: Fix confused return value on expected error testing
Chuhong Yuan <hslester96@gmail.com>
net: microchip: encx24j600: add missed kthread_stop
Tony Lindgren <tony@atomide.com>
ARM: dts: omap4-droid4: Fix occasional lost wakeirq for uart1
Tony Lindgren <tony@atomide.com>
ARM: dts: omap4-droid4: Fix flakey wlan by disabling internal pull for gpio
Andrew Oakley <andrew@adoakley.name>
ALSA: usb-audio: add mapping for ASRock TRX40 Creator
Stephen Warren <swarren@nvidia.com>
gpio: tegra: mask GPIO IRQs during IRQ shutdown
Johan Jonker <jbx6244@gmail.com>
ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi
Johan Jonker <jbx6244@gmail.com>
ARM: dts: rockchip: swap clock-names of gpu nodes
Johan Jonker <jbx6244@gmail.com>
arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node
Johan Jonker <jbx6244@gmail.com>
arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts
Johan Jonker <jbx6244@gmail.com>
ARM: dts: rockchip: fix phy nodename for rk3229-xms6
Johan Jonker <jbx6244@gmail.com>
ARM: dts: rockchip: fix phy nodename for rk3228-evb
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
arm64: dts: qcom: db820c: fix audio configuration
Vladimir Oltean <vladimir.oltean@nxp.com>
net: mscc: ocelot: fix address ageing time (again)
Jiri Pirko <jiri@mellanox.com>
mlxsw: spectrum: Fix use-after-free of split/unsplit/type_set in case reload fails
Tang Bin <tangbin@cmss.chinamobile.com>
net: sgi: ioc3-eth: Fix return value check in ioc3eth_probe()
Qiushi Wu <wu000273@umn.edu>
net/mlx4_core: fix a memory leak bug.
Qiushi Wu <wu000273@umn.edu>
net: sun: fix missing release regions in cas_init_one().
Vadim Fedorenko <vfedorenko@novek.ru>
net/tls: free record only on encryption error
Vadim Fedorenko <vfedorenko@novek.ru>
net/tls: fix encryption error checking
Roi Dayan <roid@mellanox.com>
net/mlx5: Annotate mutex destroy for root ns
Eran Ben Elisha <eranbe@mellanox.com>
net/mlx5: Avoid processing commands before cmdif is ready
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Revert "virtio-balloon: Revert "virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM""
Roi Dayan <roid@mellanox.com>
net/mlx5: Fix cleaning unmanaged flow tables
Eran Ben Elisha <eranbe@mellanox.com>
net/mlx5: Fix a race when moving command interface to events mode
Heiner Kallweit <hkallweit1@gmail.com>
r8169: fix OCP access on RTL8117
Jason A. Donenfeld <Jason@zx2c4.com>
wireguard: noise: separate receive counter from send counter
Jason A. Donenfeld <Jason@zx2c4.com>
wireguard: queueing: preserve flow hash across packet scrubbing
Jason A. Donenfeld <Jason@zx2c4.com>
wireguard: noise: read preshared key while taking lock
Shay Drory <shayd@mellanox.com>
net/mlx5: Fix error flow in case of function_setup failure
Moshe Shemesh <moshe@mellanox.com>
net/mlx5e: Update netdev txq on completions during closure
Moshe Shemesh <moshe@mellanox.com>
net/mlx5: Fix memory leak in mlx5_events_init
Roi Dayan <roid@mellanox.com>
net/mlx5e: Fix inner tirs handling
Tariq Toukan <tariqt@mellanox.com>
net/mlx5e: kTLS, Destroy key object after destroying the TIS
Eric Dumazet <edumazet@google.com>
tipc: block BH before using dst_cache
Jere Leppänen <jere.leppanen@nokia.com>
sctp: Start shutdown on association restart if in SHUTDOWN-SENT state and socket is closed
Neil Horman <nhorman@tuxdriver.com>
sctp: Don't add the shutdown timer if its already been added
Marc Payne <marc.payne@mdpsys.co.uk>
r8152: support additional Microsoft Surface Ethernet Adapter variant
David Ahern <dsahern@gmail.com>
nexthop: Fix attribute checking for groups
Vinay Kumar Yadav <vinay.yadav@chelsio.com>
net/tls: fix race condition causing kernel panic
Roman Mashak <mrv@mojatatu.com>
net sched: fix reporting the first-time use timestamp
Yuqi Jin <jinyuqi@huawei.com>
net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()"
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
net: qrtr: Fix passing invalid reference to qrtr_local_enqueue()
Stephen Worley <sworley@cumulusnetworks.com>
net: nlmsg_cancel() if put fails for nhmsg
Russell King <rmk+kernel@armlinux.org.uk>
net: mvpp2: fix RX hashing for non-10G ports
Moshe Shemesh <moshe@mellanox.com>
net/mlx5: Add command entry handling completion
Vadim Fedorenko <vfedorenko@novek.ru>
net: ipip: fix wrong address family in init error path
Martin KaFai Lau <kafai@fb.com>
net: inet_csk: Fix so_reuseport bind-address cache in tb->fast*
Boris Sukholitko <boris.sukholitko@broadcom.com>
__netif_receive_skb_core: pass skb by reference
Grygorii Strashko <grygorii.strashko@ti.com>
net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend
DENG Qingfang <dqfext@gmail.com>
net: dsa: mt7530: fix roaming from DSA user ports
Sabrina Dubroca <sd@queasysnail.net>
net: don't return invalid table id error when we fall back to PF_UNSPEC
Claudiu Manoil <claudiu.manoil@nxp.com>
felix: Fix initialization of ioremap resources
Michal Kubecek <mkubecek@suse.cz>
ethtool: count header size in reply size estimate
Vladimir Oltean <vladimir.oltean@nxp.com>
dpaa_eth: fix usage as DSA master, try 3
Eric Dumazet <edumazet@google.com>
ax25: fix setsockopt(SO_BINDTODEVICE)
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/compressed/vmlinux.lds.S | 2 +-
arch/arm/boot/dts/bcm-hr2.dtsi | 6 +-
arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 2 +-
arch/arm/boot/dts/imx6q-b450v3.dts | 7 -
arch/arm/boot/dts/imx6q-b650v3.dts | 7 -
arch/arm/boot/dts/imx6q-b850v3.dts | 11 --
arch/arm/boot/dts/imx6q-bx50v3.dtsi | 15 +++
arch/arm/boot/dts/mmp3-dell-ariel.dts | 12 +-
arch/arm/boot/dts/mmp3.dtsi | 8 +-
arch/arm/boot/dts/motorola-mapphone-common.dtsi | 43 +++++-
arch/arm/boot/dts/rk3036.dtsi | 2 +-
arch/arm/boot/dts/rk3228-evb.dts | 2 +-
arch/arm/boot/dts/rk3229-xms6.dts | 2 +-
arch/arm/boot/dts/rk322x.dtsi | 6 +-
arch/arm/boot/dts/rk3xxx.dtsi | 2 +-
arch/arm/include/asm/assembler.h | 75 +----------
arch/arm/include/asm/uaccess-asm.h | 117 ++++++++++++++++
arch/arm/kernel/entry-armv.S | 11 +-
arch/arm/kernel/entry-header.S | 9 +-
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 4 +-
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 19 ++-
arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +
arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 2 +-
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 +-
arch/csky/abiv1/inc/abi/entry.h | 4 +-
arch/csky/abiv2/inc/abi/entry.h | 4 +-
arch/csky/include/asm/uaccess.h | 49 +++----
arch/csky/kernel/entry.S | 2 -
arch/csky/kernel/perf_callchain.c | 9 +-
arch/csky/lib/usercopy.c | 8 +-
arch/parisc/mm/init.c | 2 +-
arch/powerpc/Kconfig | 1 +
arch/riscv/Kconfig.socs | 17 +--
arch/riscv/include/asm/mmio.h | 2 +
arch/riscv/include/asm/pgtable.h | 3 +
arch/riscv/kernel/stacktrace.c | 2 +-
arch/x86/include/asm/dma.h | 2 +-
arch/x86/include/asm/io_bitmap.h | 4 +-
arch/x86/kernel/fpu/xstate.c | 86 ++++++------
arch/x86/kernel/ioport.c | 22 +--
arch/x86/kernel/process.c | 4 +-
block/blk-core.c | 11 +-
drivers/clk/qcom/gcc-sm8150.c | 3 +-
drivers/clk/ti/clk-33xx.c | 2 +-
drivers/crypto/chelsio/chtls/chtls_io.c | 2 +-
drivers/gpio/gpio-bcm-kona.c | 2 +-
drivers/gpio/gpio-exar.c | 7 +-
drivers/gpio/gpio-mvebu.c | 15 ++-
drivers/gpio/gpio-pxa.c | 4 +-
drivers/gpio/gpio-tegra.c | 1 +
drivers/gpio/gpiolib.c | 11 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 -
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +-
drivers/gpu/drm/amd/display/dc/core/dc.c | 124 +++++++++++++----
drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 40 +-----
drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 +
.../amd/display/dc/dce110/dce110_hw_sequencer.c | 30 ++---
.../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 148 ++++++++++++++++-----
.../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 13 ++
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 4 +
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 15 +++
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 20 ++-
.../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 14 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 108 +++++++--------
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h | 7 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 5 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 1 +
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.h | 3 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 +
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 5 +-
.../gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 4 +
drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 16 +++
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 12 +-
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 6 +-
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +-
drivers/gpu/drm/ingenic/ingenic-drm.c | 6 +-
drivers/gpu/drm/meson/meson_drv.c | 4 +-
drivers/hwmon/nct7904.c | 4 +-
drivers/infiniband/core/rdma_core.c | 20 ++-
drivers/infiniband/hw/i40iw/i40iw_cm.c | 8 --
drivers/infiniband/hw/mlx5/mr.c | 1 +
drivers/infiniband/hw/qib/qib_sysfs.c | 9 +-
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
drivers/infiniband/ulp/ipoib/ipoib.h | 4 +
drivers/infiniband/ulp/ipoib/ipoib_cm.c | 15 ++-
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 9 +-
drivers/infiniband/ulp/ipoib/ipoib_main.c | 10 +-
drivers/input/evdev.c | 19 +--
drivers/input/joystick/xpad.c | 12 ++
drivers/input/keyboard/dlink-dir685-touchkeys.c | 2 +-
drivers/input/rmi4/rmi_driver.c | 5 +-
drivers/input/serio/i8042-x86ia64io.h | 7 +
drivers/input/touchscreen/usbtouchscreen.c | 1 +
drivers/iommu/iommu.c | 2 +-
drivers/mmc/core/block.c | 2 +-
drivers/net/bonding/bond_sysfs_slave.c | 4 +-
drivers/net/dsa/mt7530.c | 9 +-
drivers/net/dsa/mt7530.h | 1 +
drivers/net/dsa/ocelot/felix.c | 23 ++--
drivers/net/dsa/ocelot/felix.h | 6 +-
drivers/net/dsa/ocelot/felix_vsc9959.c | 22 ++-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 +--
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 -
drivers/net/ethernet/freescale/Kconfig | 2 +
drivers/net/ethernet/freescale/dpaa/Kconfig | 1 +
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 59 +++++++-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +-
.../ethernet/mellanox/mlx5/core/en_accel/ktls.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 9 +-
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +
drivers/net/ethernet/mellanox/mlx5/core/events.c | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 17 ++-
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 7 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 14 +-
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 8 ++
drivers/net/ethernet/microchip/encx24j600.c | 5 +-
drivers/net/ethernet/mscc/ocelot.c | 2 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 4 +-
drivers/net/ethernet/realtek/r8169_main.c | 17 ++-
drivers/net/ethernet/sgi/ioc3-eth.c | 8 +-
drivers/net/ethernet/sun/cassini.c | 3 +-
drivers/net/ethernet/ti/cpsw.c | 4 +
drivers/net/hamradio/bpqether.c | 3 +-
drivers/net/usb/cdc_ether.c | 11 +-
drivers/net/usb/r8152.c | 1 +
drivers/net/wireguard/messages.h | 2 +-
drivers/net/wireguard/noise.c | 22 ++-
drivers/net/wireguard/noise.h | 14 +-
drivers/net/wireguard/queueing.h | 10 +-
drivers/net/wireguard/receive.c | 44 +++---
drivers/net/wireguard/selftest/counter.c | 17 ++-
drivers/net/wireguard/send.c | 19 +--
drivers/soc/mediatek/mtk-cmdq-helper.c | 4 +-
drivers/usb/dwc3/dwc3-pci.c | 1 +
drivers/usb/gadget/legacy/inode.c | 3 +-
drivers/usb/phy/phy-twl6030-usb.c | 12 +-
drivers/virtio/virtio_balloon.c | 107 ++++++---------
fs/binfmt_elf.c | 2 +-
fs/cachefiles/rdwr.c | 2 +-
fs/ceph/caps.c | 2 +-
fs/cifs/file.c | 2 +-
fs/gfs2/log.c | 6 +-
fs/gfs2/quota.c | 6 +-
fs/gfs2/quota.h | 3 +-
include/asm-generic/topology.h | 2 +-
include/linux/ieee80211.h | 2 +-
include/linux/mlx5/driver.h | 16 +++
include/linux/mm.h | 15 ++-
include/linux/netfilter/nf_conntrack_pptp.h | 2 +-
include/net/act_api.h | 3 +-
include/net/espintcp.h | 1 +
include/net/ip_fib.h | 11 +-
include/net/nexthop.h | 67 +++++++---
include/net/tls.h | 4 +
include/rdma/uverbs_std_types.h | 2 +-
include/uapi/linux/xfrm.h | 2 +-
mm/khugepaged.c | 1 +
net/ax25/af_ax25.c | 6 +-
net/bridge/netfilter/nft_reject_bridge.c | 6 +
net/ceph/osd_client.c | 4 +-
net/core/dev.c | 20 ++-
net/dsa/slave.c | 1 +
net/dsa/tag_mtk.c | 15 +++
net/ethtool/netlink.c | 4 +-
net/ethtool/strset.c | 1 -
net/ipv4/esp4_offload.c | 4 +-
net/ipv4/fib_frontend.c | 22 +--
net/ipv4/inet_connection_sock.c | 43 +++---
net/ipv4/ip_vti.c | 23 +++-
net/ipv4/ipip.c | 2 +-
net/ipv4/ipmr.c | 2 +-
net/ipv4/netfilter/nf_nat_pptp.c | 7 +-
net/ipv4/nexthop.c | 105 +++++++++------
net/ipv4/route.c | 14 +-
net/ipv6/esp6_offload.c | 13 +-
net/ipv6/ip6_fib.c | 2 +-
net/ipv6/ip6mr.c | 2 +-
net/mac80211/mesh_hwmp.c | 7 +
net/netfilter/ipset/ip_set_list_set.c | 2 +-
net/netfilter/nf_conntrack_core.c | 80 ++++++++++-
net/netfilter/nf_conntrack_pptp.c | 62 +++++----
net/netfilter/nfnetlink_cthelper.c | 3 +-
net/qrtr/qrtr.c | 2 +-
net/sctp/sm_sideeffect.c | 14 +-
net/sctp/sm_statefuns.c | 9 +-
net/tipc/udp_media.c | 6 +-
net/tls/tls_sw.c | 50 +++++--
net/wireless/core.c | 2 +-
net/xdp/xdp_umem.c | 8 +-
net/xfrm/espintcp.c | 2 +
net/xfrm/xfrm_device.c | 8 +-
net/xfrm/xfrm_input.c | 2 +-
net/xfrm/xfrm_interface.c | 21 +++
net/xfrm/xfrm_output.c | 15 ++-
net/xfrm/xfrm_policy.c | 7 +-
samples/bpf/lwt_len_hist_user.c | 2 -
security/commoncap.c | 1 +
sound/core/hwdep.c | 4 +-
sound/pci/hda/patch_realtek.c | 39 ++++--
sound/usb/mixer.c | 8 ++
sound/usb/mixer_maps.c | 24 ++++
sound/usb/quirks-table.h | 26 ++++
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 1 +
213 files changed, 1811 insertions(+), 1019 deletions(-)
^ permalink raw reply
* [PATCH 5.6 055/177] net: microchip: encx24j600: add missed kthread_stop
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Chuhong Yuan, David S. Miller,
Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Chuhong Yuan <hslester96@gmail.com>
[ Upstream commit ff8ce319e9c25e920d994cc35236f0bb32dfc8f3 ]
This driver calls kthread_run() in probe, but forgets to call
kthread_stop() in probe failure and remove.
Add the missed kthread_stop() to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/microchip/encx24j600.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/encx24j600.c b/drivers/net/ethernet/microchip/encx24j600.c
index 39925e4bf2ec..b25a13da900a 100644
--- a/drivers/net/ethernet/microchip/encx24j600.c
+++ b/drivers/net/ethernet/microchip/encx24j600.c
@@ -1070,7 +1070,7 @@ static int encx24j600_spi_probe(struct spi_device *spi)
if (unlikely(ret)) {
netif_err(priv, probe, ndev, "Error %d initializing card encx24j600 card\n",
ret);
- goto out_free;
+ goto out_stop;
}
eidled = encx24j600_read_reg(priv, EIDLED);
@@ -1088,6 +1088,8 @@ static int encx24j600_spi_probe(struct spi_device *spi)
out_unregister:
unregister_netdev(priv->ndev);
+out_stop:
+ kthread_stop(priv->kworker_task);
out_free:
free_netdev(ndev);
@@ -1100,6 +1102,7 @@ static int encx24j600_spi_remove(struct spi_device *spi)
struct encx24j600_priv *priv = dev_get_drvdata(&spi->dev);
unregister_netdev(priv->ndev);
+ kthread_stop(priv->kworker_task);
free_netdev(priv->ndev);
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 056/177] kselftests: dmabuf-heaps: Fix confused return value on expected error testing
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Shuah Khan, Sumit Semwal,
Benjamin Gaignard, Brian Starkey, Laura Abbott, Andrew F. Davis,
linux-kselftest, John Stultz, Shuah Khan, Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: John Stultz <john.stultz@linaro.org>
[ Upstream commit 4bb9d46d47b105a774f9dca642f5271375bca4b2 ]
When I added the expected error testing, I forgot I need to set
the return to zero when we successfully see an error.
Without this change we only end up testing a single heap
before the test quits.
Cc: Shuah Khan <shuah@kernel.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: "Andrew F. Davis" <afd@ti.com>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
index cd5e1f602ac9..909da9cdda97 100644
--- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
@@ -351,6 +351,7 @@ static int test_alloc_errors(char *heap_name)
}
printf("Expected error checking passed\n");
+ ret = 0;
out:
if (dmabuf_fd >= 0)
close(dmabuf_fd);
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 057/177] gfs2: move privileged user check to gfs2_quota_lock_check
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Bob Peterson, Andreas Gruenbacher,
Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Bob Peterson <rpeterso@redhat.com>
[ Upstream commit 4ed0c30811cb4d30ef89850b787a53a84d5d2bcb ]
Before this patch, function gfs2_quota_lock checked if it was called
from a privileged user, and if so, it bypassed the quota check:
superuser can operate outside the quotas.
That's the wrong place for the check because the lock/unlock functions
are separate from the lock_check function, and you can do lock and
unlock without actually checking the quotas.
This patch moves the check to gfs2_quota_lock_check.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/gfs2/quota.c | 3 +--
fs/gfs2/quota.h | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index e9f93045eb01..832d44782f74 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1040,8 +1040,7 @@ int gfs2_quota_lock(struct gfs2_inode *ip, kuid_t uid, kgid_t gid)
u32 x;
int error = 0;
- if (capable(CAP_SYS_RESOURCE) ||
- sdp->sd_args.ar_quota != GFS2_QUOTA_ON)
+ if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON)
return 0;
error = gfs2_quota_hold(ip, uid, gid);
diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h
index 765627d9a91e..fe68a91dc16f 100644
--- a/fs/gfs2/quota.h
+++ b/fs/gfs2/quota.h
@@ -44,7 +44,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip,
int ret;
ap->allowed = UINT_MAX; /* Assume we are permitted a whole lot */
- if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF)
+ if (capable(CAP_SYS_RESOURCE) ||
+ sdp->sd_args.ar_quota == GFS2_QUOTA_OFF)
return 0;
ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE);
if (ret)
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 041/177] net: sgi: ioc3-eth: Fix return value check in ioc3eth_probe()
From: Greg Kroah-Hartman @ 2020-06-01 17:52 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Zhang Shengju, Tang Bin,
David S. Miller
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Tang Bin <tangbin@cmss.chinamobile.com>
commit a7654211d0ffeaa8eb0545ea00f8445242cbce05 upstream.
In the function devm_platform_ioremap_resource(), if get resource
failed, the return value is ERR_PTR() not NULL. Thus it must be
replaced by IS_ERR(), or else it may result in crashes if a critical
error path is encountered.
Fixes: 0ce5ebd24d25 ("mfd: ioc3: Add driver for SGI IOC3 chip")
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/sgi/ioc3-eth.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -865,14 +865,14 @@ static int ioc3eth_probe(struct platform
ip = netdev_priv(dev);
ip->dma_dev = pdev->dev.parent;
ip->regs = devm_platform_ioremap_resource(pdev, 0);
- if (!ip->regs) {
- err = -ENOMEM;
+ if (IS_ERR(ip->regs)) {
+ err = PTR_ERR(ip->regs);
goto out_free;
}
ip->ssram = devm_platform_ioremap_resource(pdev, 1);
- if (!ip->ssram) {
- err = -ENOMEM;
+ if (IS_ERR(ip->ssram)) {
+ err = PTR_ERR(ip->ssram);
goto out_free;
}
^ permalink raw reply
* [PATCH 5.6 060/177] drm/amdgpu: drop unnecessary cancel_delayed_work_sync on PG ungate
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Evan Quan, Alex Deucher, Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Evan Quan <evan.quan@amd.com>
[ Upstream commit 1fe48ec08d9f2e26d893a6c05bd6c99a3490f9ef ]
As this is already properly handled in amdgpu_gfx_off_ctrl(). In fact,
this unnecessary cancel_delayed_work_sync may leave a small time window
for race condition and is dangerous.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +-----
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++---------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 02702597ddeb..012df3d574bf 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -4241,11 +4241,7 @@ static int gfx_v10_0_set_powergating_state(void *handle,
switch (adev->asic_type) {
case CHIP_NAVI10:
case CHIP_NAVI14:
- if (!enable) {
- amdgpu_gfx_off_ctrl(adev, false);
- cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
- } else
- amdgpu_gfx_off_ctrl(adev, true);
+ amdgpu_gfx_off_ctrl(adev, enable);
break;
default:
break;
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 906648fca9ef..914dbd901b98 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4734,10 +4734,9 @@ static int gfx_v9_0_set_powergating_state(void *handle,
switch (adev->asic_type) {
case CHIP_RAVEN:
case CHIP_RENOIR:
- if (!enable) {
+ if (!enable)
amdgpu_gfx_off_ctrl(adev, false);
- cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
- }
+
if (adev->pg_flags & AMD_PG_SUPPORT_RLC_SMU_HS) {
gfx_v9_0_enable_sck_slow_down_on_power_up(adev, true);
gfx_v9_0_enable_sck_slow_down_on_power_down(adev, true);
@@ -4761,12 +4760,7 @@ static int gfx_v9_0_set_powergating_state(void *handle,
amdgpu_gfx_off_ctrl(adev, true);
break;
case CHIP_VEGA12:
- if (!enable) {
- amdgpu_gfx_off_ctrl(adev, false);
- cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
- } else {
- amdgpu_gfx_off_ctrl(adev, true);
- }
+ amdgpu_gfx_off_ctrl(adev, enable);
break;
default:
break;
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 062/177] drm/amdgpu: Use GEM obj reference for KFD BOs
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Felix Kuehling, Alex Sierra,
Christian König, Alex Deucher, Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Felix Kuehling <Felix.Kuehling@amd.com>
[ Upstream commit 39b3128d7ffd44e400e581e6f49e88cb42bef9a1 ]
Releasing the AMDGPU BO ref directly leads to problems when BOs were
exported as DMA bufs. Releasing the GEM reference makes sure that the
AMDGPU/TTM BO is not freed too early.
Also take a GEM reference when importing BOs from DMABufs to keep
references to imported BOs balances properly.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: Alex Sierra <alex.sierra@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index fa8ac9d19a7a..6326c1792270 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1304,7 +1304,7 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(
}
/* Free the BO*/
- amdgpu_bo_unref(&mem->bo);
+ drm_gem_object_put_unlocked(&mem->bo->tbo.base);
mutex_destroy(&mem->lock);
kfree(mem);
@@ -1647,7 +1647,8 @@ int amdgpu_amdkfd_gpuvm_import_dmabuf(struct kgd_dev *kgd,
ALLOC_MEM_FLAGS_VRAM : ALLOC_MEM_FLAGS_GTT) |
ALLOC_MEM_FLAGS_WRITABLE | ALLOC_MEM_FLAGS_EXECUTABLE;
- (*mem)->bo = amdgpu_bo_ref(bo);
+ drm_gem_object_get(&bo->tbo.base);
+ (*mem)->bo = bo;
(*mem)->va = va;
(*mem)->domain = (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM) ?
AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT;
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 064/177] usb: dwc3: pci: Enable extcon driver for Intel Merrifield
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Andy Shevchenko, Felipe Balbi,
Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[ Upstream commit 066c09593454e89bc605ffdff1c9810061f9b1e1 ]
Intel Merrifield provides a DR support via PMIC which has its own
extcon driver.
Add a property string to link to that driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/dwc3/dwc3-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 7051611229c9..b67372737dc9 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -114,6 +114,7 @@ static const struct property_entry dwc3_pci_intel_properties[] = {
static const struct property_entry dwc3_pci_mrfld_properties[] = {
PROPERTY_ENTRY_STRING("dr_mode", "otg"),
+ PROPERTY_ENTRY_STRING("linux,extcon-name", "mrfld_bcove_pwrsrc"),
PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
{}
};
--
2.25.1
^ permalink raw reply related
* [PATCH 5.6 067/177] net: freescale: select CONFIG_FIXED_PHY where needed
From: Greg Kroah-Hartman @ 2020-06-01 17:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Florian Fainelli,
Jakub Kicinski, Sasha Levin
In-Reply-To: <20200601174048.468952319@linuxfoundation.org>
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit 99352c79af3e5f2e4724abf37fa5a2a3299b1c81 ]
I ran into a randconfig build failure with CONFIG_FIXED_PHY=m
and CONFIG_GIANFAR=y:
x86_64-linux-ld: drivers/net/ethernet/freescale/gianfar.o:(.rodata+0x418): undefined reference to `fixed_phy_change_carrier'
It seems the same thing can happen with dpaa and ucc_geth, so change
all three to do an explicit 'select FIXED_PHY'.
The fixed-phy driver actually has an alternative stub function that
theoretically allows building network drivers when fixed-phy is
disabled, but I don't see how that would help here, as the drivers
presumably would not work then.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/freescale/Kconfig | 2 ++
drivers/net/ethernet/freescale/dpaa/Kconfig | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig
index 2bd7ace0a953..bfc6bfe94d0a 100644
--- a/drivers/net/ethernet/freescale/Kconfig
+++ b/drivers/net/ethernet/freescale/Kconfig
@@ -77,6 +77,7 @@ config UCC_GETH
depends on QUICC_ENGINE && PPC32
select FSL_PQ_MDIO
select PHYLIB
+ select FIXED_PHY
---help---
This driver supports the Gigabit Ethernet mode of the QUICC Engine,
which is available on some Freescale SOCs.
@@ -90,6 +91,7 @@ config GIANFAR
depends on HAS_DMA
select FSL_PQ_MDIO
select PHYLIB
+ select FIXED_PHY
select CRC32
---help---
This driver supports the Gigabit TSEC on the MPC83xx, MPC85xx,
diff --git a/drivers/net/ethernet/freescale/dpaa/Kconfig b/drivers/net/ethernet/freescale/dpaa/Kconfig
index 3b325733a4f8..0a54c7e0e4ae 100644
--- a/drivers/net/ethernet/freescale/dpaa/Kconfig
+++ b/drivers/net/ethernet/freescale/dpaa/Kconfig
@@ -3,6 +3,7 @@ menuconfig FSL_DPAA_ETH
tristate "DPAA Ethernet"
depends on FSL_DPAA && FSL_FMAN
select PHYLIB
+ select FIXED_PHY
select FSL_FMAN_MAC
---help---
Data Path Acceleration Architecture Ethernet driver,
--
2.25.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox