2020-04-11 12:30:57

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 00/29] 4.4.219-rc1 review

This is the start of the stable review cycle for the 4.4.219 release.
There are 29 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 Mon, 13 Apr 2020 11:51:28 +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/v4.x/stable-review/patch-4.4.219-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-4.4.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>
Linux 4.4.219-rc1

Hans Verkuil <[email protected]>
drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()

Taniya Das <[email protected]>
clk: qcom: rcg: Return failure for RCG update

Avihai Horon <[email protected]>
RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow

Qiujun Huang <[email protected]>
Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl

Kaike Wan <[email protected]>
IB/hfi1: Call kobject_put() when kobject_init_and_add() fails

Paul Cercueil <[email protected]>
ASoC: jz4740-i2s: Fix divider written at incorrect offset in register

Ross Lagerwall <[email protected]>
xen-netfront: Update features after registering netdev

Ross Lagerwall <[email protected]>
xen-netfront: Fix mismatched rtnl_unlock

Gustavo A. R. Silva <[email protected]>
power: supply: axp288_charger: Fix unchecked return value

David Ahern <[email protected]>
tools/accounting/getdelays.c: fix netlink attribute length

Jason A. Donenfeld <[email protected]>
random: always use batched entropy for get_random_u{32,64}

Richard Palethorpe <[email protected]>
slcan: Don't transmit uninitialized stack data in padding

Jisheng Zhang <[email protected]>
net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting

Randy Dunlap <[email protected]>
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED

Daniel Jordan <[email protected]>
padata: always acquire cpu_hotplug_lock before pinst->lock

Krzysztof Opasiak <[email protected]>
usb: gadget: printer: Drop unused device qualifier descriptor

Krzysztof Opasiak <[email protected]>
usb: gadget: uac2: Drop unused device qualifier descriptor

Guillaume Nault <[email protected]>
l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()

Guillaume Nault <[email protected]>
l2tp: ensure sessions are freed after their PPPOL2TP socket

Gao Feng <[email protected]>
l2tp: Refactor the codes with existing macros instead of literal number

Guillaume Nault <[email protected]>
l2tp: fix duplicate session creation

Guillaume Nault <[email protected]>
l2tp: ensure session can't get removed during pppol2tp_session_ioctl()

Guillaume Nault <[email protected]>
l2tp: fix race in l2tp_recv_common()

Shmulik Ladkani <[email protected]>
net: l2tp: Make l2tp_ip6 namespace aware

[email protected] <[email protected]>
l2tp: Correctly return -EBADF from pppol2tp_getname.

Marcelo Ricardo Leitner <[email protected]>
sctp: fix possibly using a bad saddr with a given dst

William Dauchy <[email protected]>
net, ip_tunnel: fix interface lookup with no key

Qian Cai <[email protected]>
ipv4: fix a RCU-list lock in fib_triestat_seq_show

Gerd Hoffmann <[email protected]>
drm/bochs: downgrade pci_request_region failure from error to warning


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

Diffstat:

Documentation/accounting/getdelays.c | 2 +-
Makefile | 4 +-
drivers/char/random.c | 6 -
drivers/clk/qcom/clk-rcg2.c | 2 +-
drivers/gpu/drm/bochs/bochs_hw.c | 6 +-
drivers/gpu/drm/drm_dp_mst_topology.c | 1 +
drivers/infiniband/core/cma.c | 1 +
drivers/net/can/slcan.c | 4 +-
.../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +-
drivers/net/xen-netfront.c | 11 +-
drivers/power/axp288_charger.c | 4 +
drivers/staging/rdma/hfi1/sysfs.c | 13 +-
drivers/usb/gadget/function/f_printer.c | 8 --
drivers/usb/gadget/function/f_uac2.c | 12 --
kernel/padata.c | 4 +-
mm/mempolicy.c | 6 +-
net/bluetooth/rfcomm/tty.c | 4 +-
net/ipv4/fib_trie.c | 3 +
net/ipv4/ip_tunnel.c | 6 +-
net/l2tp/l2tp_core.c | 149 ++++++++++++++++-----
net/l2tp/l2tp_core.h | 4 +
net/l2tp/l2tp_eth.c | 10 +-
net/l2tp/l2tp_ip.c | 17 ++-
net/l2tp/l2tp_ip6.c | 28 ++--
net/l2tp/l2tp_ppp.c | 110 +++++++--------
net/sctp/ipv6.c | 20 ++-
net/sctp/protocol.c | 28 ++--
sound/soc/jz4740/jz4740-i2s.c | 2 +-
28 files changed, 285 insertions(+), 182 deletions(-)



2020-04-11 12:31:03

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 05/29] l2tp: Correctly return -EBADF from pppol2tp_getname.

From: [email protected] <[email protected]>

commit 4ac36a4adaf80013a60013d6f829f5863d5d0e05 upstream.

If 'tunnel' is NULL we should return -EBADF but the 'end_put_sess' path
unconditionally sets 'error' back to zero. Rework the error path so it
more closely matches pppol2tp_sendmsg.

Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
Signed-off-by: Phil Turnbull <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
net/l2tp/l2tp_ppp.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -889,10 +889,8 @@ static int pppol2tp_getname(struct socke

pls = l2tp_session_priv(session);
tunnel = l2tp_sock_to_tunnel(pls->tunnel_sock);
- if (tunnel == NULL) {
- error = -EBADF;
+ if (tunnel == NULL)
goto end_put_sess;
- }

inet = inet_sk(tunnel->sock);
if ((tunnel->version == 2) && (tunnel->sock->sk_family == AF_INET)) {
@@ -970,12 +968,11 @@ static int pppol2tp_getname(struct socke
}

*usockaddr_len = len;
+ error = 0;

sock_put(pls->tunnel_sock);
end_put_sess:
sock_put(sk);
- error = 0;
-
end:
return error;
}


2020-04-11 12:31:15

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 09/29] l2tp: fix duplicate session creation

From: Guillaume Nault <[email protected]>

commit dbdbc73b44782e22b3b4b6e8b51e7a3d245f3086 upstream.

l2tp_session_create() relies on its caller for checking for duplicate
sessions. This is racy since a session can be concurrently inserted
after the caller's verification.

Fix this by letting l2tp_session_create() verify sessions uniqueness
upon insertion. Callers need to be adapted to check for
l2tp_session_create()'s return code instead of calling
l2tp_session_find().

pppol2tp_connect() is a bit special because it has to work on existing
sessions (if they're not connected) or to create a new session if none
is found. When acting on a preexisting session, a reference must be
held or it could go away on us. So we have to use l2tp_session_get()
instead of l2tp_session_find() and drop the reference before exiting.

Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support")
Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
Signed-off-by: Guillaume Nault <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/l2tp/l2tp_core.c | 70 ++++++++++++++++++++++++++++++++++++++-------------
net/l2tp/l2tp_eth.c | 10 +------
net/l2tp/l2tp_ppp.c | 60 +++++++++++++++++++++----------------------
3 files changed, 84 insertions(+), 56 deletions(-)

--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -377,6 +377,48 @@ struct l2tp_session *l2tp_session_find_b
}
EXPORT_SYMBOL_GPL(l2tp_session_find_by_ifname);

+static int l2tp_session_add_to_tunnel(struct l2tp_tunnel *tunnel,
+ struct l2tp_session *session)
+{
+ struct l2tp_session *session_walk;
+ struct hlist_head *g_head;
+ struct hlist_head *head;
+ struct l2tp_net *pn;
+
+ head = l2tp_session_id_hash(tunnel, session->session_id);
+
+ write_lock_bh(&tunnel->hlist_lock);
+ hlist_for_each_entry(session_walk, head, hlist)
+ if (session_walk->session_id == session->session_id)
+ goto exist;
+
+ if (tunnel->version == L2TP_HDR_VER_3) {
+ pn = l2tp_pernet(tunnel->l2tp_net);
+ g_head = l2tp_session_id_hash_2(l2tp_pernet(tunnel->l2tp_net),
+ session->session_id);
+
+ spin_lock_bh(&pn->l2tp_session_hlist_lock);
+ hlist_for_each_entry(session_walk, g_head, global_hlist)
+ if (session_walk->session_id == session->session_id)
+ goto exist_glob;
+
+ hlist_add_head_rcu(&session->global_hlist, g_head);
+ spin_unlock_bh(&pn->l2tp_session_hlist_lock);
+ }
+
+ hlist_add_head(&session->hlist, head);
+ write_unlock_bh(&tunnel->hlist_lock);
+
+ return 0;
+
+exist_glob:
+ spin_unlock_bh(&pn->l2tp_session_hlist_lock);
+exist:
+ write_unlock_bh(&tunnel->hlist_lock);
+
+ return -EEXIST;
+}
+
/* Lookup a tunnel by id
*/
struct l2tp_tunnel *l2tp_tunnel_find(struct net *net, u32 tunnel_id)
@@ -1792,6 +1834,7 @@ EXPORT_SYMBOL_GPL(l2tp_session_set_heade
struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg)
{
struct l2tp_session *session;
+ int err;

session = kzalloc(sizeof(struct l2tp_session) + priv_size, GFP_KERNEL);
if (session != NULL) {
@@ -1847,6 +1890,13 @@ struct l2tp_session *l2tp_session_create

l2tp_session_set_header_len(session, tunnel->version);

+ err = l2tp_session_add_to_tunnel(tunnel, session);
+ if (err) {
+ kfree(session);
+
+ return ERR_PTR(err);
+ }
+
/* Bump the reference count. The session context is deleted
* only when this drops to zero.
*/
@@ -1856,28 +1906,14 @@ struct l2tp_session *l2tp_session_create
/* Ensure tunnel socket isn't deleted */
sock_hold(tunnel->sock);

- /* Add session to the tunnel's hash list */
- write_lock_bh(&tunnel->hlist_lock);
- hlist_add_head(&session->hlist,
- l2tp_session_id_hash(tunnel, session_id));
- write_unlock_bh(&tunnel->hlist_lock);
-
- /* And to the global session list if L2TPv3 */
- if (tunnel->version != L2TP_HDR_VER_2) {
- struct l2tp_net *pn = l2tp_pernet(tunnel->l2tp_net);
-
- spin_lock_bh(&pn->l2tp_session_hlist_lock);
- hlist_add_head_rcu(&session->global_hlist,
- l2tp_session_id_hash_2(pn, session_id));
- spin_unlock_bh(&pn->l2tp_session_hlist_lock);
- }
-
/* Ignore management session in session count value */
if (session->session_id != 0)
atomic_inc(&l2tp_session_count);
+
+ return session;
}

- return session;
+ return ERR_PTR(-ENOMEM);
}
EXPORT_SYMBOL_GPL(l2tp_session_create);

--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -223,12 +223,6 @@ static int l2tp_eth_create(struct net *n
goto out;
}

- session = l2tp_session_find(net, tunnel, session_id);
- if (session) {
- rc = -EEXIST;
- goto out;
- }
-
if (cfg->ifname) {
dev = dev_get_by_name(net, cfg->ifname);
if (dev) {
@@ -242,8 +236,8 @@ static int l2tp_eth_create(struct net *n

session = l2tp_session_create(sizeof(*spriv), tunnel, session_id,
peer_session_id, cfg);
- if (!session) {
- rc = -ENOMEM;
+ if (IS_ERR(session)) {
+ rc = PTR_ERR(session);
goto out;
}

--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -600,6 +600,7 @@ static int pppol2tp_connect(struct socke
int error = 0;
u32 tunnel_id, peer_tunnel_id;
u32 session_id, peer_session_id;
+ bool drop_refcnt = false;
int ver = 2;
int fd;

@@ -708,36 +709,36 @@ static int pppol2tp_connect(struct socke
if (tunnel->peer_tunnel_id == 0)
tunnel->peer_tunnel_id = peer_tunnel_id;

- /* Create session if it doesn't already exist. We handle the
- * case where a session was previously created by the netlink
- * interface by checking that the session doesn't already have
- * a socket and its tunnel socket are what we expect. If any
- * of those checks fail, return EEXIST to the caller.
- */
- session = l2tp_session_find(sock_net(sk), tunnel, session_id);
- if (session == NULL) {
- /* Default MTU must allow space for UDP/L2TP/PPP
- * headers.
+ session = l2tp_session_get(sock_net(sk), tunnel, session_id, false);
+ if (session) {
+ drop_refcnt = true;
+ ps = l2tp_session_priv(session);
+
+ /* Using a pre-existing session is fine as long as it hasn't
+ * been connected yet.
*/
- cfg.mtu = cfg.mru = 1500 - PPPOL2TP_HEADER_OVERHEAD;
+ if (ps->sock) {
+ error = -EEXIST;
+ goto end;
+ }

- /* Allocate and initialize a new session context. */
- session = l2tp_session_create(sizeof(struct pppol2tp_session),
- tunnel, session_id,
- peer_session_id, &cfg);
- if (session == NULL) {
- error = -ENOMEM;
+ /* consistency checks */
+ if (ps->tunnel_sock != tunnel->sock) {
+ error = -EEXIST;
goto end;
}
} else {
- ps = l2tp_session_priv(session);
- error = -EEXIST;
- if (ps->sock != NULL)
- goto end;
+ /* Default MTU must allow space for UDP/L2TP/PPP headers */
+ cfg.mtu = 1500 - PPPOL2TP_HEADER_OVERHEAD;
+ cfg.mru = cfg.mtu;

- /* consistency checks */
- if (ps->tunnel_sock != tunnel->sock)
+ session = l2tp_session_create(sizeof(struct pppol2tp_session),
+ tunnel, session_id,
+ peer_session_id, &cfg);
+ if (IS_ERR(session)) {
+ error = PTR_ERR(session);
goto end;
+ }
}

/* Associate session with its PPPoL2TP socket */
@@ -802,6 +803,8 @@ out_no_ppp:
session->name);

end:
+ if (drop_refcnt)
+ l2tp_session_dec_refcount(session);
release_sock(sk);

return error;
@@ -829,12 +832,6 @@ static int pppol2tp_session_create(struc
if (tunnel->sock == NULL)
goto out;

- /* Check that this session doesn't already exist */
- error = -EEXIST;
- session = l2tp_session_find(net, tunnel, session_id);
- if (session != NULL)
- goto out;
-
/* Default MTU values. */
if (cfg->mtu == 0)
cfg->mtu = 1500 - PPPOL2TP_HEADER_OVERHEAD;
@@ -842,12 +839,13 @@ static int pppol2tp_session_create(struc
cfg->mru = cfg->mtu;

/* Allocate and initialize a new session context. */
- error = -ENOMEM;
session = l2tp_session_create(sizeof(struct pppol2tp_session),
tunnel, session_id,
peer_session_id, cfg);
- if (session == NULL)
+ if (IS_ERR(session)) {
+ error = PTR_ERR(session);
goto out;
+ }

ps = l2tp_session_priv(session);
ps->tunnel_sock = tunnel->sock;


2020-04-11 12:31:23

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 26/29] Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl

From: Qiujun Huang <[email protected]>

commit 71811cac8532b2387b3414f7cd8fe9e497482864 upstream.

Needn't call 'rfcomm_dlc_put' here, because 'rfcomm_dlc_exists' didn't
increase dlc->refcnt.

Reported-by: [email protected]
Signed-off-by: Qiujun Huang <[email protected]>
Suggested-by: Hillf Danton <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
net/bluetooth/rfcomm/tty.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -413,10 +413,8 @@ static int __rfcomm_create_dev(struct so
dlc = rfcomm_dlc_exists(&req.src, &req.dst, req.channel);
if (IS_ERR(dlc))
return PTR_ERR(dlc);
- else if (dlc) {
- rfcomm_dlc_put(dlc);
+ if (dlc)
return -EBUSY;
- }
dlc = rfcomm_dlc_alloc(GFP_KERNEL);
if (!dlc)
return -ENOMEM;


2020-04-11 12:31:29

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 23/29] xen-netfront: Update features after registering netdev

From: Ross Lagerwall <[email protected]>

commit 45c8184c1bed1ca8a7f02918552063a00b909bf5 upstream.

Update the features after calling register_netdev() otherwise the
device features are not set up correctly and it not possible to change
the MTU of the device. After this change, the features reported by
ethtool match the device's features before the commit which introduced
the issue and it is possible to change the device's MTU.

Fixes: f599c64fdf7d ("xen-netfront: Fix race between device setup and open")
Reported-by: Liam Shepherd <[email protected]>
Signed-off-by: Ross Lagerwall <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Nobuhiro Iwamatsu (CIP) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
drivers/net/xen-netfront.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1982,10 +1982,6 @@ static int xennet_connect(struct net_dev
/* talk_to_netback() sets the correct number of queues */
num_queues = dev->real_num_tx_queues;

- rtnl_lock();
- netdev_update_features(dev);
- rtnl_unlock();
-
if (dev->reg_state == NETREG_UNINITIALIZED) {
err = register_netdev(dev);
if (err) {
@@ -1995,6 +1991,10 @@ static int xennet_connect(struct net_dev
}
}

+ rtnl_lock();
+ netdev_update_features(dev);
+ rtnl_unlock();
+
/*
* All public and private state should now be sane. Get
* ready to start sending and receiving packets and give the driver


2020-04-11 12:31:38

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 06/29] net: l2tp: Make l2tp_ip6 namespace aware

From: Shmulik Ladkani <[email protected]>

commit 0e6b5259824e97a0f7e7b450421ff12865d3b0e2 upstream.

l2tp_ip6 tunnel and session lookups were still using init_net, although
the l2tp core infrastructure already supports lookups keyed by 'net'.

As a result, l2tp_ip6_recv discarded packets for tunnels/sessions
created in namespaces other than the init_net.

Fix, by using dev_net(skb->dev) or sock_net(sk) where appropriate.

Signed-off-by: Shmulik Ladkani <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/l2tp/l2tp_ip6.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -127,6 +127,7 @@ static inline struct sock *l2tp_ip6_bind
*/
static int l2tp_ip6_recv(struct sk_buff *skb)
{
+ struct net *net = dev_net(skb->dev);
struct sock *sk;
u32 session_id;
u32 tunnel_id;
@@ -153,7 +154,7 @@ static int l2tp_ip6_recv(struct sk_buff
}

/* Ok, this is a data packet. Lookup the session. */
- session = l2tp_session_find(&init_net, NULL, session_id);
+ session = l2tp_session_find(net, NULL, session_id);
if (session == NULL)
goto discard;

@@ -190,7 +191,7 @@ pass_up:
goto discard;

tunnel_id = ntohl(*(__be32 *) &skb->data[4]);
- tunnel = l2tp_tunnel_find(&init_net, tunnel_id);
+ tunnel = l2tp_tunnel_find(net, tunnel_id);
if (tunnel) {
sk = tunnel->sock;
sock_hold(sk);
@@ -198,7 +199,7 @@ pass_up:
struct ipv6hdr *iph = ipv6_hdr(skb);

read_lock_bh(&l2tp_ip6_lock);
- sk = __l2tp_ip6_bind_lookup(&init_net, &iph->daddr,
+ sk = __l2tp_ip6_bind_lookup(net, &iph->daddr,
0, tunnel_id);
if (!sk) {
read_unlock_bh(&l2tp_ip6_lock);
@@ -267,6 +268,7 @@ static int l2tp_ip6_bind(struct sock *sk
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sockaddr_l2tpip6 *addr = (struct sockaddr_l2tpip6 *) uaddr;
+ struct net *net = sock_net(sk);
__be32 v4addr = 0;
int addr_type;
int err;
@@ -288,7 +290,7 @@ static int l2tp_ip6_bind(struct sock *sk

err = -EADDRINUSE;
read_lock_bh(&l2tp_ip6_lock);
- if (__l2tp_ip6_bind_lookup(&init_net, &addr->l2tp_addr,
+ if (__l2tp_ip6_bind_lookup(net, &addr->l2tp_addr,
sk->sk_bound_dev_if, addr->l2tp_conn_id))
goto out_in_use;
read_unlock_bh(&l2tp_ip6_lock);
@@ -461,7 +463,7 @@ static int l2tp_ip6_backlog_recv(struct
return 0;

drop:
- IP_INC_STATS(&init_net, IPSTATS_MIB_INDISCARDS);
+ IP_INC_STATS(sock_net(sk), IPSTATS_MIB_INDISCARDS);
kfree_skb(skb);
return -1;
}


2020-04-11 12:31:51

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 29/29] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()

From: Hans Verkuil <[email protected]>

commit a4c30a4861c54af78c4eb8b7855524c1a96d9f80 upstream.

When parsing the reply of a DP_REMOTE_DPCD_READ DPCD command the
result is wrong due to a missing idx increment.

This was never noticed since DP_REMOTE_DPCD_READ is currently not
used, but if you enable it, then it is all wrong.

Signed-off-by: Hans Verkuil <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
drivers/gpu/drm/drm_dp_mst_topology.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -431,6 +431,7 @@ static bool drm_dp_sideband_parse_remote
if (idx > raw->curlen)
goto fail_len;
repmsg->u.remote_dpcd_read_ack.num_bytes = raw->msg[idx];
+ idx++;
if (idx > raw->curlen)
goto fail_len;



2020-04-11 12:32:20

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 03/29] net, ip_tunnel: fix interface lookup with no key

From: William Dauchy <[email protected]>

[ Upstream commit 25629fdaff2ff509dd0b3f5ff93d70a75e79e0a1 ]

when creating a new ipip interface with no local/remote configuration,
the lookup is done with TUNNEL_NO_KEY flag, making it impossible to
match the new interface (only possible match being fallback or metada
case interface); e.g: `ip link add tunl1 type ipip dev eth0`

To fix this case, adding a flag check before the key comparison so we
permit to match an interface with no local/remote config; it also avoids
breaking possible userland tools relying on TUNNEL_NO_KEY flag and
uninitialised key.

context being on my side, I'm creating an extra ipip interface attached
to the physical one, and moving it to a dedicated namespace.

Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Signed-off-by: William Dauchy <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/ipv4/ip_tunnel.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -155,11 +155,8 @@ struct ip_tunnel *ip_tunnel_lookup(struc
cand = t;
}

- if (flags & TUNNEL_NO_KEY)
- goto skip_key_lookup;
-
hlist_for_each_entry_rcu(t, head, hash_node) {
- if (t->parms.i_key != key ||
+ if ((!(flags & TUNNEL_NO_KEY) && t->parms.i_key != key) ||
t->parms.iph.saddr != 0 ||
t->parms.iph.daddr != 0 ||
!(t->dev->flags & IFF_UP))
@@ -171,7 +168,6 @@ struct ip_tunnel *ip_tunnel_lookup(struc
cand = t;
}

-skip_key_lookup:
if (cand)
return cand;



2020-04-11 20:38:57

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 4.4 00/29] 4.4.219-rc1 review

On 4/11/20 5:08 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.219 release.
> There are 29 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 Mon, 13 Apr 2020 11:51:28 +0000.
> Anything received after that time might be too late.
>

Build results:
total: 169 pass: 169 fail: 0
Qemu test results:
total: 335 pass: 335 fail: 0

Guenter

2020-04-12 10:06:20

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [PATCH 4.4 00/29] 4.4.219-rc1 review

On Sat, 11 Apr 2020 at 17:41, Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 4.4.219 release.
> There are 29 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 Mon, 13 Apr 2020 11:51:28 +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/v4.x/stable-review/patch-4.4.219-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-4.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Summary
------------------------------------------------------------------------

kernel: 4.4.219-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.4.y
git commit: 8cd74c57ff4a364d0a753e448ce5eab18cc5bb75
git describe: v4.4.218-30-g8cd74c57ff4a
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.4-oe/build/v4.4.218-30-g8cd74c57ff4a


No regressions (compared to build v4.4.218)

No fixes (compared to build v4.4.218)


Ran 27015 total tests in the following environments and test suites.

Environments
--------------
- i386
- juno-r2 - arm64
- juno-r2-compat
- juno-r2-kasan
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
- x86-kasan

Test Suites
-----------
* build
* kselftest
* kvm-unit-tests
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* network-basic-tests
* perf
* v4l2-compliance
* spectre-meltdown-checker-test
* install-android-platform-tools-r2600
* kselftest-vsyscall-mode-native

Summary
------------------------------------------------------------------------

kernel: 4.4.219-rc1
git repo: https://git.linaro.org/lkft/arm64-stable-rc.git
git branch: 4.4.219-rc1-hikey-20200411-691
git commit: 9b98182ae4842aa200b9878be74c2fa565a1ab29
git describe: 4.4.219-rc1-hikey-20200411-691
Test details: https://qa-reports.linaro.org/lkft/linaro-hikey-stable-rc-4.4-oe/build/4.4.219-rc1-hikey-20200411-691


No regressions (compared to build 4.4.219-rc1-hikey-20200409-690)


No fixes (compared to build 4.4.219-rc1-hikey-20200409-690)

Ran 1726 total tests in the following environments and test suites.

Environments
--------------
- hi6220-hikey - arm64

Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance

--
Linaro LKFT
https://lkft.linaro.org

2020-04-14 13:32:08

by Chris Paterson

[permalink] [raw]
Subject: RE: [PATCH 4.4 00/29] 4.4.219-rc1 review

Hello Greg,

> From: [email protected] <[email protected]> On
> Behalf Of Greg Kroah-Hartman
> Sent: 11 April 2020 13:09
>
> This is the start of the stable review cycle for the 4.4.219 release.
> There are 29 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 Mon, 13 Apr 2020 11:51:28 +0000.
> Anything received after that time might be too late.

No build issues seen for CIP configs for Linux 4.4.219-rc1 (8cd74c57ff4a).

Build logs: https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/pipelines/134988008
GitLab CI Pipeline: https://gitlab.com/cip-project/cip-testing/linux-cip-pipelines/-/blob/master/trees/linux-4.4.y.yml

Kind regards, Chris

>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-
> 4.4.219-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-4.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
> -------------
> Pseudo-Shortlog of commits:
>
> Greg Kroah-Hartman <[email protected]>
> Linux 4.4.219-rc1
>
> Hans Verkuil <[email protected]>
> drm_dp_mst_topology: fix broken
> drm_dp_sideband_parse_remote_dpcd_read()
>
> Taniya Das <[email protected]>
> clk: qcom: rcg: Return failure for RCG update
>
> Avihai Horon <[email protected]>
> RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
>
> Qiujun Huang <[email protected]>
> Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
>
> Kaike Wan <[email protected]>
> IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
>
> Paul Cercueil <[email protected]>
> ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
>
> Ross Lagerwall <[email protected]>
> xen-netfront: Update features after registering netdev
>
> Ross Lagerwall <[email protected]>
> xen-netfront: Fix mismatched rtnl_unlock
>
> Gustavo A. R. Silva <[email protected]>
> power: supply: axp288_charger: Fix unchecked return value
>
> David Ahern <[email protected]>
> tools/accounting/getdelays.c: fix netlink attribute length
>
> Jason A. Donenfeld <[email protected]>
> random: always use batched entropy for get_random_u{32,64}
>
> Richard Palethorpe <[email protected]>
> slcan: Don't transmit uninitialized stack data in padding
>
> Jisheng Zhang <[email protected]>
> net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
>
> Randy Dunlap <[email protected]>
> mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
>
> Daniel Jordan <[email protected]>
> padata: always acquire cpu_hotplug_lock before pinst->lock
>
> Krzysztof Opasiak <[email protected]>
> usb: gadget: printer: Drop unused device qualifier descriptor
>
> Krzysztof Opasiak <[email protected]>
> usb: gadget: uac2: Drop unused device qualifier descriptor
>
> Guillaume Nault <[email protected]>
> l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()
>
> Guillaume Nault <[email protected]>
> l2tp: ensure sessions are freed after their PPPOL2TP socket
>
> Gao Feng <[email protected]>
> l2tp: Refactor the codes with existing macros instead of literal number
>
> Guillaume Nault <[email protected]>
> l2tp: fix duplicate session creation
>
> Guillaume Nault <[email protected]>
> l2tp: ensure session can't get removed during pppol2tp_session_ioctl()
>
> Guillaume Nault <[email protected]>
> l2tp: fix race in l2tp_recv_common()
>
> Shmulik Ladkani <[email protected]>
> net: l2tp: Make l2tp_ip6 namespace aware
>
> [email protected] <[email protected]>
> l2tp: Correctly return -EBADF from pppol2tp_getname.
>
> Marcelo Ricardo Leitner <[email protected]>
> sctp: fix possibly using a bad saddr with a given dst
>
> William Dauchy <[email protected]>
> net, ip_tunnel: fix interface lookup with no key
>
> Qian Cai <[email protected]>
> ipv4: fix a RCU-list lock in fib_triestat_seq_show
>
> Gerd Hoffmann <[email protected]>
> drm/bochs: downgrade pci_request_region failure from error to warning
>
>
> -------------
>
> Diffstat:
>
> Documentation/accounting/getdelays.c | 2 +-
> Makefile | 4 +-
> drivers/char/random.c | 6 -
> drivers/clk/qcom/clk-rcg2.c | 2 +-
> drivers/gpu/drm/bochs/bochs_hw.c | 6 +-
> drivers/gpu/drm/drm_dp_mst_topology.c | 1 +
> drivers/infiniband/core/cma.c | 1 +
> drivers/net/can/slcan.c | 4 +-
> .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +-
> drivers/net/xen-netfront.c | 11 +-
> drivers/power/axp288_charger.c | 4 +
> drivers/staging/rdma/hfi1/sysfs.c | 13 +-
> drivers/usb/gadget/function/f_printer.c | 8 --
> drivers/usb/gadget/function/f_uac2.c | 12 --
> kernel/padata.c | 4 +-
> mm/mempolicy.c | 6 +-
> net/bluetooth/rfcomm/tty.c | 4 +-
> net/ipv4/fib_trie.c | 3 +
> net/ipv4/ip_tunnel.c | 6 +-
> net/l2tp/l2tp_core.c | 149 ++++++++++++++++-----
> net/l2tp/l2tp_core.h | 4 +
> net/l2tp/l2tp_eth.c | 10 +-
> net/l2tp/l2tp_ip.c | 17 ++-
> net/l2tp/l2tp_ip6.c | 28 ++--
> net/l2tp/l2tp_ppp.c | 110 +++++++--------
> net/sctp/ipv6.c | 20 ++-
> net/sctp/protocol.c | 28 ++--
> sound/soc/jz4740/jz4740-i2s.c | 2 +-
> 28 files changed, 285 insertions(+), 182 deletions(-)
>

2020-04-14 15:19:29

by Jon Hunter

[permalink] [raw]
Subject: Re: [PATCH 4.4 00/29] 4.4.219-rc1 review


On 11/04/2020 13:08, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.219 release.
> There are 29 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 Mon, 13 Apr 2020 11:51:28 +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/v4.x/stable-review/patch-4.4.219-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-4.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h


Sorry this is late, but all tests are passing for Tegra ...

Test results for stable-v4.4:
6 builds: 6 pass, 0 fail
12 boots: 12 pass, 0 fail
19 tests: 19 pass, 0 fail

Linux version: 4.4.219-rc1-g8cd74c57ff4a
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra30-cardhu-a04

Cheers
Jon

--
nvpublic

2020-04-14 15:21:16

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 4.4 00/29] 4.4.219-rc1 review

On Tue, Apr 14, 2020 at 11:35:53AM +0100, Jon Hunter wrote:
>
> On 11/04/2020 13:08, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.219 release.
> > There are 29 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 Mon, 13 Apr 2020 11:51:28 +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/v4.x/stable-review/patch-4.4.219-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-4.4.y
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
>
>
> Sorry this is late, but all tests are passing for Tegra ...
>
> Test results for stable-v4.4:
> 6 builds: 6 pass, 0 fail
> 12 boots: 12 pass, 0 fail
> 19 tests: 19 pass, 0 fail
>
> Linux version: 4.4.219-rc1-g8cd74c57ff4a
> Boards tested: tegra124-jetson-tk1, tegra20-ventana,
> tegra30-cardhu-a04
>

No problems, thanks for testing all of these and letting me know.

greg k-h