4.19.88-stable review
Subsystems (8)
Greg Kroah-Hartman
maintainerPATCH 234/321 geneve: change NET_UDP_TUNNEL dependency to select
In reply to Greg Kroah-HartmanFrom: Matteo Croce <[email protected]>
[ Upstream commit a7603ac1fc8ce1409f8ff70e6ce505f308b2c002 ]
Due to the depends on NET_UDP_TUNNEL, at the moment it is impossible to compile GENEVE if no other protocol depending on NET_UDP_TUNNEL is selected.
Fix this changing the depends to a select, and drop NET_IP_TUNNEL from the select list, as it already depends on NET_UDP_TUNNEL.
--- drivers/net/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/Kconfig +2 -2
@@ -197,9 +197,9 @@ config VXLAN config GENEVE tristate "Generic Network Virtualization Encapsulation" - depends on INET && NET_UDP_TUNNEL + depends on INET depends on IPV6 || !IPV6 - select NET_IP_TUNNEL + select NET_UDP_TUNNEL select GRO_CELLS ---help--- This allows one to create geneve virtual interfaces that provide
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 235/321 net: fix possible overflow in __sk_mem_raise_allocated()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 5bf325a53202b8728cf7013b72688c46071e212e ]
With many active TCP sockets, fat TCP sockets could fool __sk_mem_raise_allocated() thanks to an overflow.
They would increase their share of the memory, instead of decreasing it.
--- include/net/sock.h | 2 +- net/core/sock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/net/sock.h +1 -1
@@ -1272,7 +1272,7 @@ static inline void sk_sockets_allocated_inc(struct sock *sk)percpu_counter_inc (sk->sk_prot->sockets_allocated); } -static inline int +static inline u64 sk_sockets_allocated_read_positive (struct sock *sk) {return percpu_counter_read_positive (sk->sk_prot->sockets_allocated);
net/core/sock.c +1 -1
@@ -2435,7 +2435,7 @@ int __sk_mem_raise_allocated(struct sock *sk, int size, int amt, int kind) }if (sk_has_memory_pressure (sk)) { -int alloc; +u64 alloc;if (!sk_under_memory_pressure (sk))return 1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 236/321 net: ip_gre: do not report erspan_ver for gre or gretap
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
[ Upstream commit 2bdf700e538828d6456150b9319e5f689b062d54 ]
Report erspan version field to userspace in ipgre_fill_info just for erspan tunnels. The issue can be triggered with the following reproducer:
$ip link add name gre1 type gre local 192.168.0.1 remote 192.168.1.1
$ip link set dev gre1 up
$ip -d link sh gre1
13: gre1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1476 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/gre 192.168.0.1 peer 192.168.1.1 promiscuity 0 minmtu 0 maxmtu 0
gre remote 192.168.1.1 local 192.168.0.1 ttl inherit erspan_ver 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1--- net/ipv4/ip_gre.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-)
net/ipv4/ip_gre.c +17 -16
@@ -1466,9 +1466,23 @@ static int ipgre_fill_info(struct sk_buff *skb, const struct net_device *dev)struct ip_tunnel_parm *p = &t->parms;__be16 o_flags = p->o_flags; -if ((t->erspan_ver ==1 || t->erspan_ver ==2 ) && - !t->collect_md) - o_flags |=TUNNEL_KEY ; +if (t->erspan_ver ==1 || t->erspan_ver ==2 ) { +if (!t->collect_md) + o_flags |=TUNNEL_KEY ; + +if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_VER , t->erspan_ver)) + goto nla_put_failure; + +if (t->erspan_ver ==1 ) { +if (nla_put_u32 (skb,IFLA_GRE_ERSPAN_INDEX , t->index)) + goto nla_put_failure; + }else { +if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_DIR , t->dir)) + goto nla_put_failure; +if (nla_put_u16 (skb,IFLA_GRE_ERSPAN_HWID , t->hwid)) + goto nla_put_failure; + } + }if (nla_put_u32 (skb,IFLA_GRE_LINK , p->link) || nla_put_be16(skb, IFLA_GRE_IFLAGS,
@@ -1504,19 +1518,6 @@ static int ipgre_fill_info(struct sk_buff *skb, const struct net_device *dev) goto nla_put_failure; } -if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_VER , t->erspan_ver)) - goto nla_put_failure; - -if (t->erspan_ver ==1 ) { -if (nla_put_u32 (skb,IFLA_GRE_ERSPAN_INDEX , t->index)) - goto nla_put_failure; - }else if (t->erspan_ver ==2 ) { -if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_DIR , t->dir)) - goto nla_put_failure; -if (nla_put_u16 (skb,IFLA_GRE_ERSPAN_HWID , t->hwid)) - goto nla_put_failure; - } -return 0 ; nla_put_failure:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 237/321 net: ip6_gre: do not report erspan_ver for ip6gre or ip6gretap
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
[ Upstream commit 103d0244d29fcaf38f1339d4538919bbbc051490 ]
Report erspan version field to userspace in ip6gre_fill_info just for erspan_v6 tunnels. Moreover report IFLA_GRE_ERSPAN_INDEX only for erspan version 1.
The issue can be triggered with the following reproducer:
$ip link add name gre6 type ip6gre local 2001::1 remote 2002::2
$ip link set gre6 up
$ip -d link sh gre6
14: grep6@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1448 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/gre6 2001::1 peer 2002::2 promiscuity 0 minmtu 0 maxmtu 0
ip6gre remote 2002::2 local 2001::1 hoplimit 64 encaplimit 4 tclass 0x00 flowlabel 0x00000 erspan_index 0 erspan_ver 0 addrgenmode eui64--- net/ipv6/ip6_gre.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
net/ipv6/ip6_gre.c +18 -18
@@ -2135,9 +2135,23 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev)struct __ip6_tnl_parm *p = &t->parms;__be16 o_flags = p->o_flags; -if ((p->erspan_ver ==1 || p->erspan_ver ==2 ) && - !p->collect_md) - o_flags |=TUNNEL_KEY ; +if (p->erspan_ver ==1 || p->erspan_ver ==2 ) { +if (!p->collect_md) + o_flags |=TUNNEL_KEY ; + +if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_VER , p->erspan_ver)) + goto nla_put_failure; + +if (p->erspan_ver ==1 ) { +if (nla_put_u32 (skb,IFLA_GRE_ERSPAN_INDEX , p->index)) + goto nla_put_failure; + }else { +if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_DIR , p->dir)) + goto nla_put_failure; +if (nla_put_u16 (skb,IFLA_GRE_ERSPAN_HWID , p->hwid)) + goto nla_put_failure; + } + }if (nla_put_u32 (skb,IFLA_GRE_LINK , p->link) || nla_put_be16(skb, IFLA_GRE_IFLAGS,
@@ -2152,8 +2166,7 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev)nla_put_u8 (skb,IFLA_GRE_ENCAP_LIMIT , p->encap_limit) ||nla_put_be32 (skb,IFLA_GRE_FLOWINFO , p->flowinfo) ||nla_put_u32 (skb,IFLA_GRE_FLAGS , p->flags) || -nla_put_u32 (skb,IFLA_GRE_FWMARK , p->fwmark) || - nla_put_u32(skb, IFLA_GRE_ERSPAN_INDEX, p->index)) + nla_put_u32(skb, IFLA_GRE_FWMARK, p->fwmark)) goto nla_put_failure; if (nla_put_u16(skb, IFLA_GRE_ENCAP_TYPE,
@@ -2171,19 +2184,6 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev) goto nla_put_failure; } -if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_VER , p->erspan_ver)) - goto nla_put_failure; - -if (p->erspan_ver ==1 ) { -if (nla_put_u32 (skb,IFLA_GRE_ERSPAN_INDEX , p->index)) - goto nla_put_failure; - }else if (p->erspan_ver ==2 ) { -if (nla_put_u8 (skb,IFLA_GRE_ERSPAN_DIR , p->dir)) - goto nla_put_failure; -if (nla_put_u16 (skb,IFLA_GRE_ERSPAN_HWID , p->hwid)) - goto nla_put_failure; - } -return 0 ; nla_put_failure:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 238/321 sctp: dont compare hb_timer expire date before starting it
In reply to Greg Kroah-HartmanFrom: Maciej Kwiecien <[email protected]>
[ Upstream commit d1f20c03f48102e52eb98b8651d129b83134cae4 ]
hb_timer might not start at all for a particular transport because its start is conditional. In a result a node is not sending heartbeats.
Function sctp_transport_reset_hb_timer has two roles:
- initial start of hb_timer for a given transport,
- update expire date of hb_timer for a given transport.
The function is optimized to update timer's expire only if it is before a new calculated one but this comparison is invalid for a timer which has not yet started. Such a timer has expire == 0 and if a new expire value is bigger than (MAX_JIFFIES / 2 + 2) then "time_before" macro will fail and timer will not start resulting in no heartbeat packets send by the node.
This was found when association was initialized within first 5 mins after system boot due to jiffies init value which is near to MAX_JIFFIES.
Test kernel version: 4.9.154 (ARCH=arm)
hb_timer.expire = 0; //initialized, not started timernew_expire = MAX_JIFFIES / 2 + 2; //or moretime_before(hb_timer.expire, new_expire) == false
--- net/sctp/transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/sctp/transport.c +2 -1
@@ -207,7 +207,8 @@ void sctp_transport_reset_hb_timer(struct sctp_transport *transport)/* When a data chunk is sent, reset the heartbeat interval. */ expires = jiffies +sctp_transport_timeout (transport); -if (time_before (transport->hb_timer.expires, expires) && +if ((time_before (transport->hb_timer.expires, expires) || + !timer_pending (&transport->hb_timer)) && !mod_timer (&transport->hb_timer, expires +prandom_u32_max (transport->rto)))sctp_transport_hold (transport);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 239/321 bpf: decrease usercnt if bpf_map_new_fd() fails in bpf_map_get_fd_by_id()
In reply to Greg Kroah-HartmanFrom: Peng Sun <[email protected]>
[ Upstream commit 781e62823cb81b972dc8652c1827205cda2ac9ac ]
In bpf/syscall.c, bpf_map_get_fd_by_id() use bpf_map_inc_not_zero() to increase the refcount, both map->refcnt and map->usercnt. Then, if bpf_map_new_fd() fails, should handle map->usercnt too.
--- kernel/bpf/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/syscall.c +1 -1
@@ -1887,7 +1887,7 @@ static int bpf_map_get_fd_by_id(const union bpf_attr *attr) fd =bpf_map_new_fd (map, f_flags);if (fd <0 ) -bpf_map_put (map); +bpf_map_put_with_uref (map);return fd; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 214/321 tipc: fix memory leak in tipc_nl_compat_publ_dump
In reply to Greg Kroah-HartmanFrom: Gustavo A. R. Silva <[email protected]>
[ Upstream commit f87d8ad9233f115db92c6c087d58403b0009ed36 ]
There is a memory leak in case genlmsg_put fails.
Fix this by freeing *args* before return.
Addresses-Coverity-ID: 1476406 ("Resource leak")
--- net/tipc/netlink_compat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/tipc/netlink_compat.c +3 -1
@@ -983,8 +983,10 @@ static int tipc_nl_compat_publ_dump(struct tipc_nl_compat_msg *msg, u32 sock) hdr =genlmsg_put (args,0 ,0 , &tipc_genl_family,NLM_F_MULTI ,TIPC_NL_PUBL_GET ); -if (!hdr) +if (!hdr) { +kfree_skb (args);return -EMSGSIZE ; + } nest =nla_nest_start (args,TIPC_NLA_SOCK );if (!nest) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 241/321 net: dev: Use unsigned integer as an argument to left-shift
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
[ Upstream commit f4d7b3e23d259c44f1f1c39645450680fcd935d6 ]
1 << 31 is Undefined Behaviour according to the C standard. Use U type modifier to avoid theoretical overflow.
--- include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/netdevice.h +1 -1
@@ -3790,7 +3790,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)if (debug_value ==0 )/* no output */ return 0 ;/* set low N bits */ -return (1 << debug_value) -1 ; +return (1U << debug_value) -1 ; }static inline void __netif_tx_lock (struct netdev_queue *txq,int cpu)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 242/321 kvm: properly check debugfs dentry before using it
In reply to Greg Kroah-HartmanFrom: Greg Kroah-Hartman <[email protected]>
[ Upstream commit 8ed0579c12b2fe56a1fac2f712f58fc26c1dc49b ]
debugfs can now report an error code if something went wrong instead of just NULL. So if the return value is to be used as a "real" dentry, it needs to be checked if it is an error before dereferencing it.
This is now happening because of ff9fb72bc077 ("debugfs: return error values, not NULL"). syzbot has found a way to trigger multiple debugfs files attempting to be created, which fails, and then the error code gets passed to dentry_path_raw() which obviously does not like it.
--- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
virt/kvm/kvm_main.c +1 -1
@@ -3990,7 +3990,7 @@ static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm) }add_uevent_var (env,"PID=%d" , kvm->userspace_pid); -if (kvm->debugfs_dentry) { +if (!IS_ERR_OR_NULL (kvm->debugfs_dentry)) {char *tmp, *p =kmalloc (PATH_MAX ,GFP_KERNEL );if (p) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 244/321 net: hns3: Change fw error code NOT_EXEC to NOT_SUPPORTED
In reply to Greg Kroah-HartmanFrom: Yunsheng Lin <[email protected]>
[ Upstream commit 4a402f47cfce904051cd8b31bef4fe2910d9dce9 ]
According to firmware error code definition, the error code of 2 means NOT_SUPPORTED, this patch changes it to NOT_SUPPORTED.
--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c +2 -0
@@ -260,6 +260,8 @@ int hclge_cmd_send(struct hclge_hw *hw, struct hclge_desc *desc, int num)if (desc_ret ==HCLGE_CMD_EXEC_SUCCESS ) retval =0 ; +else if (desc_ret ==HCLGE_CMD_NOT_SUPPORTED ) + retval = -EOPNOTSUPP ;else retval = -EIO ; hw->cmq.last_status = desc_ret;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h +1 -1
@@ -39,7 +39,7 @@ struct hclge_cmq_ring {enum hclge_cmd_return_status {HCLGE_CMD_EXEC_SUCCESS =0 ,HCLGE_CMD_NO_AUTH =1 , -HCLGE_CMD_NOT_EXEC =2 , +HCLGE_CMD_NOT_SUPPORTED =2 ,HCLGE_CMD_QUEUE_FULL =3 , };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 245/321 net: hns3: fix PFC not setting problem for DCB module
In reply to Greg Kroah-HartmanFrom: Yunsheng Lin <[email protected]>
[ Upstream commit d3ad430ac531e65f29c9737f86744c425c9173ef ]
The PFC enabling is based on user priority, currently it is based on TC, which may cause PFC not setting correctly when pri to TC mapping is not one to one relation.
This patch adds pfc_en in tm_info to fix it.
--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 7 ++++--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c +4 -3
@@ -245,6 +245,9 @@ static int hclge_ieee_setpfc(struct hnae3_handle *h, struct ieee_pfc *pfc) hdev->flag & HCLGE_FLAG_MQPRIO_ENABLE)return -EINVAL ; +if (pfc->pfc_en == hdev->tm_info.pfc_en) +return 0 ; + prio_tc = hdev->tm_info.prio_tc; pfc_map =0 ;
@@ -257,10 +260,8 @@ static int hclge_ieee_setpfc(struct hnae3_handle *h, struct ieee_pfc *pfc) } } -if (pfc_map == hdev->tm_info.hw_pfc_map) -return 0 ; - hdev->tm_info.hw_pfc_map = pfc_map; + hdev->tm_info.pfc_en = pfc->pfc_en;return hclge_pause_setup_hw (hdev); }
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +1 -0
@@ -249,6 +249,7 @@ struct hclge_tm_info {struct hclge_tc_info tc_info[HNAE3_MAX_TC ];enum hclge_fc_mode fc_mode;u8 hw_pfc_map;/* Allow for packet drop or not on this TC */ +u8 pfc_en;/* PFC enabled or not for user priority */ };struct hclge_comm_stats_str {
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +1 -1
@@ -1162,7 +1162,7 @@ static int hclge_pfc_setup_hw(struct hclge_dev *hdev)HCLGE_RX_MAC_PAUSE_EN_MSK ;return hclge_pfc_pause_en_cfg (hdev, enable_bitmap, - hdev->tm_info.hw_pfc_map); + hdev->tm_info.pfc_en); }/* Each Tc has a 1024 queue sets to backpress, it divides to
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 246/321 net: hns3: fix an issue for hclgevf_ae_get_hdev
In reply to Greg Kroah-HartmanFrom: Peng Li <[email protected]>
[ Upstream commit eed9535f9f716a532ec0c5d6cc7a48584acdf435 ]
HNS3 VF driver support NIC and Roce, hdev stores NIC handle and Roce handle, should use correct parameter for container_of.
--- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +6 -1
@@ -26,7 +26,12 @@ MODULE_DEVICE_TABLE(pci, ae_algovf_pci_tbl);static inline struct hclgevf_dev *hclgevf_ae_get_hdev (struct hnae3_handle *handle) { - return container_of(handle, struct hclgevf_dev, nic); +if (!handle->client) + return container_of(handle, struct hclgevf_dev, nic); +else if (handle->client->type ==HNAE3_CLIENT_ROCE ) + return container_of(handle, struct hclgevf_dev, roce); +else + return container_of(handle, struct hclgevf_dev, nic); }static int hclgevf_tqps_update_stats (struct hnae3_handle *handle)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 250/321 scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery
In reply to Greg Kroah-HartmanFrom: John Garry <[email protected]>
[ Upstream commit cec9771d2e954650095aa37a6a97722c8194e7d2 ]
+----------+ +----------+ | | | | | |--- 3.0 G ---| |--- 6.0 G --- SAS disk | | | | | |--- 3.0 G ---| |--- 6.0 G --- SAS disk |initiator | | | | device |--- 3.0 G ---| Expander |--- 6.0 G --- SAS disk | | | | | |--- 3.0 G ---| |--- 6.0 G --- SATA disk -->failed to connect | | | | | | | |--- 6.0 G --- SATA disk -->failed to connect | | | | +----------+ +----------+
According to Serial Attached SCSI - 1.1 (SAS-1.1):
If an expander PHY attached to a SATA PHY is using a physical link rate greater than the maximum connection rate supported by the pathway from an STP initiator port, a management application client should use the SMP PHY CONTROL function (see 10.4.3.10) to set the PROGRAMMED MAXIMUM PHYSICAL LINK RATE field of the expander PHY to the maximum connection rate supported by the pathway from that STP initiator port.
Currently libsas does not support checking if this condition occurs, nor rectifying when it does.
Such a condition is not at all common, however it has been seen on some pre-silicon environments where the initiator PHY only supports a 1.5 Gbit maximum linkrate, mated with 12G expander PHYs and 3/6G SATA phy.
This patch adds support for checking and rectifying this condition during initial device discovery only.
We do support checking min pathway connection rate during revalidation phase, when new devices can be detected in the topology. However we do not support in the case of the the user reprogramming PHY linkrates, such that min pathway condition is not met/maintained.
A note on root port PHY rates:
The libsas root port PHY rates calculation is broken. Libsas sets the rates (min, max, and current linkrate) of a root port to the same linkrate of the first PHY member of that same port. In doing so, it assumes that all other PHYs which subsequently join the port to have the same negotiated linkrate, when they could actually be different.
In practice this doesn't happen, as initiator and expander PHYs are normally initialised with consistent min/max linkrates.
This has not caused an issue so far, so leave alone for now.
--- drivers/scsi/libsas/sas_expander.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/scsi/libsas/sas_expander.c +20 -0
@@ -817,6 +817,26 @@ static struct domain_device *sas_ex_discover_end_dev(#ifdef CONFIG_SCSI_SAS_ATA if ((phy->attached_tproto &SAS_PROTOCOL_STP ) || phy->attached_sata_dev) { +if (child->linkrate > parent->min_linkrate) { +struct sas_phy_linkrates rates = { + .maximum_linkrate = parent->min_linkrate, + .minimum_linkrate = parent->min_linkrate, + }; +int ret; + +pr_notice ("ex %016llx phy%02d SATA device linkrate > min pathway connection rate, attempting to lower device linkrate\n" , +SAS_ADDR (child->sas_addr), phy_id); + ret =sas_smp_phy_control (parent, phy_id, +PHY_FUNC_LINK_RESET , &rates); +if (ret) { +pr_err ("ex %016llx phy%02d SATA device could not set linkrate (%d)\n" , +SAS_ADDR (child->sas_addr), phy_id, ret); + goto out_free; + } +pr_notice ("ex %016llx phy%02d SATA device set linkrate successfully\n" , +SAS_ADDR (child->sas_addr), phy_id); + child->linkrate = child->min_linkrate; + } res =sas_get_ata_info (child, phy);if (res) goto out_free;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 249/321 apparmor: delete the dentry in aafs_remove() to avoid a leak
In reply to Greg Kroah-HartmanFrom: Chris Coulson <[email protected]>
[ Upstream commit 201218e4d3dfa1346e30997f48725acce3f26d01 ]
Although the apparmorfs dentries are always dropped from the dentry cache when the usage count drops to zero, there is no guarantee that this will happen in aafs_remove(), as another thread might still be using it. In this scenario, this means that the dentry will temporarily continue to appear in the results of lookups, even after the call to aafs_remove().
In the case of removal of a profile - it also causes simple_rmdir() on the profile directory to fail, as the directory won't be empty until the usage counts of all child dentries have decreased to zero. This results in the dentry for the profile directory leaking and appearing empty in the file system tree forever.
--- security/apparmor/apparmorfs.c | 1 + 1 file changed, 1 insertion(+)
security/apparmor/apparmorfs.c +1 -0
@@ -361,6 +361,7 @@ static void aafs_remove(struct dentry *dentry)simple_rmdir (dir, dentry); elsesimple_unlink (dir ,dentry ); +d_delete (dentry);dput (dentry); }inode_unlock (dir);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 215/321 net/core/neighbour: tell kmemleak about hash tables
In reply to Greg Kroah-HartmanFrom: Konstantin Khlebnikov <[email protected]>
[ Upstream commit 85704cb8dcfd88d351bfc87faaeba1c8214f3177 ]
This fixes false-positive kmemleak reports about leaked neighbour entries:
unreferenced object 0xffff8885c6e4d0a8 (size 1024):
comm "softirq", pid 0, jiffies 4294922664 (age 167640.804s) hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 20 2c f3 83 ff ff ff ff ........ ,......
08 c0 ef 5f 84 88 ff ff 01 8c 7d 02 01 00 00 00 ..._......}.....
backtrace:
[<00000000748509fe>] ip6_finish_output2+0x887/0x1e40
[<0000000036d7a0d8>] ip6_output+0x1ba/0x600
[<0000000027ea7dba>] ip6_send_skb+0x92/0x2f0
[<00000000d6e2111d>] udp_v6_send_skb.isra.24+0x680/0x15e0
[<000000000668a8be>] udpv6_sendmsg+0x18c9/0x27a0
[<000000004bd5fa90>] sock_sendmsg+0xb3/0xf0
[<000000008227b29f>] ___sys_sendmsg+0x745/0x8f0
[<000000008698009d>] __sys_sendmsg+0xde/0x170
[<00000000889dacf1>] do_syscall_64+0x9b/0x400
[<0000000081cdb353>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[<000000005767ed39>] 0xffffffffffffffff--- net/core/neighbour.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
net/core/neighbour.c +9 -4
@@ -18,6 +18,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/slab.h> +#include <linux/kmemleak.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/module.h>
@@ -363,12 +364,14 @@ static struct neigh_hash_table *neigh_hash_alloc(unsigned int shift) ret =kmalloc (sizeof (*ret),GFP_ATOMIC );if (!ret)return NULL ; -if (size <=PAGE_SIZE ) +if (size <=PAGE_SIZE ) { buckets =kzalloc (size,GFP_ATOMIC ); -else + }else { buckets = (struct neighbour __rcu **)__get_free_pages (GFP_ATOMIC | __GFP_ZERO,get_order (size)); +kmemleak_alloc (buckets, size,0 ,GFP_ATOMIC ); + }if (!buckets) {kfree (ret);return NULL ;
@@ -388,10 +391,12 @@ static void neigh_hash_free_rcu(struct rcu_head *head)size_t size = (1 << nht->hash_shift) *sizeof (struct neighbour *);struct neighbour __rcu **buckets = nht->hash_buckets; -if (size <=PAGE_SIZE ) +if (size <=PAGE_SIZE ) {kfree (buckets); -else + }else { +kmemleak_free (buckets);free_pages ((unsigned long )buckets,get_order (size)); + }kfree (nht); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 252/321 ACPI / APEI: Switch estatus pool to use vmalloc memory
In reply to Greg Kroah-HartmanFrom: James Morse <[email protected]>
[ Upstream commit 0ac234be1a9497498e57d958f4251f5257b116b4 ]
The ghes code is careful to parse and round firmware's advertised memory requirements for CPER records, up to a maximum of 64K. However when ghes_estatus_pool_expand() does its work, it splits the requested size into PAGE_SIZE granules.
This means if firmware generates 5K of CPER records, and correctly describes this in the table, __process_error() will silently fail as it is unable to allocate more than PAGE_SIZE.
Switch the estatus pool to vmalloc() memory. On x86 vmalloc() memory may fault and be fixed up by vmalloc_fault(). To prevent this call vmalloc_sync_all() before an NMI handler could discover the memory.
--- drivers/acpi/apei/ghes.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
drivers/acpi/apei/ghes.c +15 -15
@@ -170,40 +170,40 @@ static int ghes_estatus_pool_init(void)return 0 ; } -static void ghes_estatus_pool_free_chunk_page (struct gen_pool *pool, +static void ghes_estatus_pool_free_chunk (struct gen_pool *pool,struct gen_pool_chunk *chunk,void *data) { -free_page (chunk->start_addr); +vfree ((void *)chunk->start_addr); }static void ghes_estatus_pool_exit (void ) {gen_pool_for_each_chunk (ghes_estatus_pool, - ghes_estatus_pool_free_chunk_page,NULL ); + ghes_estatus_pool_free_chunk,NULL );gen_pool_destroy (ghes_estatus_pool); }static int ghes_estatus_pool_expand (unsigned long len) { -unsigned long i, pages, size, addr; -int ret; +unsigned long size, addr; ghes_estatus_pool_size_request +=PAGE_ALIGN (len); size =gen_pool_size (ghes_estatus_pool);if (size >= ghes_estatus_pool_size_request)return 0 ; - pages = (ghes_estatus_pool_size_request - size) /PAGE_SIZE ; -for (i =0 ; i < pages; i++) { - addr =__get_free_page (GFP_KERNEL ); -if (!addr) -return -ENOMEM ; - ret =gen_pool_add (ghes_estatus_pool, addr,PAGE_SIZE ,-1 ); -if (ret) -return ret; - } -return 0 ; + addr = (unsigned long )vmalloc (PAGE_ALIGN (len)); +if (!addr) +return -ENOMEM ; + +/* +* New allocation must be visible in all pgd before it can be found by +* an NMI allocating from the pool. +*/ +vmalloc_sync_all (); + +return gen_pool_add (ghes_estatus_pool, addr,PAGE_ALIGN (len),-1 ); }static int map_gen_v2 (struct ghes *ghes)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 216/321 ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs
In reply to Greg Kroah-HartmanFrom: Miquel Raynal <[email protected]>
[ Upstream commit 96dbcb40e4b1a387cdb9b21f43638c759aebb5a4 ]
At the beginning, only Armada 38x SoCs where supported by the ahci_mvebu.c driver. Commit 15d3ce7b63bd ("ata: ahci_mvebu: add support for Armada 3700 variant") introduced Armada 3700 support. As opposed to Armada 38x SoCs, the 3700 variants do not have to configure mbus and the regret option. This patch took care of avoiding such configuration when not needed in the probe function, but failed to do the same in the resume path. While doing so looks harmless by experience, let's clean the driver logic and avoid doing this useless configuration with Armada 3700 SoCs.
Because the logic is very similar between these two places, it has been decided to factorize this code and put it in a "Armada 38x configuration function". This function is part of a new (per-compatible) platform data structure, so that the addition of such configuration function for Armada 3700 will be eased.
--- drivers/ata/ahci_mvebu.c | 68 ++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 17 deletions(-)
drivers/ata/ahci_mvebu.c +51 -17
@@ -28,6 +28,10 @@#define AHCI_WINDOW_BASE (win) (0x64 + ((win) << 4))#define AHCI_WINDOW_SIZE (win) (0x68 + ((win) << 4)) +struct ahci_mvebu_plat_data { +int (*plat_config)(struct ahci_host_priv *hpriv); +}; +static void ahci_mvebu_mbus_config (struct ahci_host_priv *hpriv,const struct mbus_dram_target_info *dram) {
@@ -62,6 +66,22 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv)writel (0x80 , hpriv->mmio +AHCI_VENDOR_SPECIFIC_0_DATA ); } +static int ahci_mvebu_armada_380_config (struct ahci_host_priv *hpriv) +{ +const struct mbus_dram_target_info *dram; +int rc =0 ; + + dram =mv_mbus_dram_info (); +if (dram) +ahci_mvebu_mbus_config (hpriv, dram); +else + rc = -ENODEV ; + +ahci_mvebu_regret_option (hpriv); + +return rc; +} +/** * ahci_mvebu_stop_engine *
@@ -126,13 +146,10 @@ static int ahci_mvebu_resume(struct platform_device *pdev) {struct ata_host *host =platform_get_drvdata (pdev);struct ahci_host_priv *hpriv = host->private_data; -const struct mbus_dram_target_info *dram; +const struct ahci_mvebu_plat_data *pdata = hpriv->plat_data; - dram =mv_mbus_dram_info (); -if (dram) -ahci_mvebu_mbus_config (hpriv, dram); - -ahci_mvebu_regret_option (hpriv); +if (pdata->plat_config) + pdata->plat_config (hpriv);return ahci_platform_resume_host (&pdev->dev); }
@@ -154,28 +171,31 @@ static struct scsi_host_template ahci_platform_sht = {static int ahci_mvebu_probe (struct platform_device *pdev) { +const struct ahci_mvebu_plat_data *pdata;struct ahci_host_priv *hpriv; -const struct mbus_dram_target_info *dram;int rc; + pdata =of_device_get_match_data (&pdev->dev); +if (!pdata) +return -EINVAL ; + hpriv =ahci_platform_get_resources (pdev,0 );if (IS_ERR (hpriv))return PTR_ERR (hpriv); + hpriv->plat_data = (void *)pdata; + rc =ahci_platform_enable_resources (hpriv);if (rc)return rc; hpriv->stop_engine = ahci_mvebu_stop_engine; -if (of_device_is_compatible (pdev->dev.of_node, -"marvell,armada-380-ahci" )) { - dram =mv_mbus_dram_info (); -if (!dram) -return -ENODEV ; - -ahci_mvebu_mbus_config (hpriv, dram); -ahci_mvebu_regret_option (hpriv); + pdata = hpriv->plat_data; +if (pdata->plat_config) { + rc = pdata->plat_config (hpriv); +if (rc) + goto disable_resources; } rc = ahci_platform_init_host(pdev, hpriv, &ahci_mvebu_port_info,
@@ -190,9 +210,23 @@ disable_resources:return rc; } +static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = { + .plat_config = ahci_mvebu_armada_380_config, +}; + +static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = { + .plat_config =NULL , +}; +static const struct of_device_id ahci_mvebu_of_match[] = { - { .compatible ="marvell,armada-380-ahci" , }, - { .compatible ="marvell,armada-3700-ahci" , }, + { + .compatible ="marvell,armada-380-ahci" , + .data = &ahci_mvebu_armada_380_plat_data, + }, + { + .compatible ="marvell,armada-3700-ahci" , + .data = &ahci_mvebu_armada_3700_plat_data, + }, { }, };MODULE_DEVICE_TABLE (of, ahci_mvebu_of_match);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 217/321 PCI/MSI: Return -ENOSPC from pci_alloc_irq_vectors_affinity()
In reply to Greg Kroah-HartmanFrom: Ming Lei <[email protected]>
[ Upstream commit 77f88abd4a6f73a1a68dbdc0e3f21575fd508fc3 ]
The API of pci_alloc_irq_vectors_affinity() says it returns -ENOSPC if fewer than @min_vecs interrupt vectors are available for @dev.
However, if a device supports MSI-X but not MSI and a caller requests @min_vecs that can't be satisfied by MSI-X, we previously returned -EINVAL (from the failed attempt to enable MSI), not -ENOSPC.
When -ENOSPC is returned, callers may reduce the number IRQs they request and try again. Most callers can use the @min_vecs and @max_vecs parameters to avoid this retry loop, but that doesn't work when using IRQ affinity "nr_sets" because rebalancing the sets is driver-specific.
This return value bug has been present since pci_alloc_irq_vectors() was added in v4.10 by aff171641d18 ("PCI: Provide sensible IRQ vector alloc/free routines"), but it wasn't an issue because @min_vecs/@max_vecs removed the need for callers to iteratively reduce the number of IRQs requested and retry the allocation, so they didn't need to distinguish -ENOSPC from -EINVAL.
In v5.0, 6da4b3ab9a6e ("genirq/affinity: Add support for allocating interrupt sets") added IRQ sets to the interface, which reintroduced the need to check for -ENOSPC and possibly reduce the number of IRQs requested and retry the allocation.
--- drivers/pci/msi.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
drivers/pci/msi.c +13 -9
@@ -1155,7 +1155,8 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs, const struct irq_affinity *affd) {static const struct irq_affinity msi_default_affd; -int vecs = -ENOSPC ; +int msix_vecs = -ENOSPC ; +int msi_vecs = -ENOSPC ;if (flags &PCI_IRQ_AFFINITY ) {if (!affd)
@@ -1166,16 +1167,17 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs, }if (flags &PCI_IRQ_MSIX ) { - vecs =__pci_enable_msix_range (dev,NULL , min_vecs, max_vecs, - affd); -if (vecs >0 ) -return vecs; + msix_vecs =__pci_enable_msix_range (dev,NULL , min_vecs, + max_vecs, affd); +if (msix_vecs >0 ) +return msix_vecs; }if (flags &PCI_IRQ_MSI ) { - vecs =__pci_enable_msi_range (dev, min_vecs, max_vecs, affd); -if (vecs >0 ) -return vecs; + msi_vecs =__pci_enable_msi_range (dev, min_vecs, max_vecs, + affd); +if (msi_vecs >0 ) +return msi_vecs; }/* use legacy irq if allowed */
@@ -1186,7 +1188,9 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs, } } -return vecs; +if (msix_vecs == -ENOSPC ) +return -ENOSPC ; +return msi_vecs; }EXPORT_SYMBOL (pci_alloc_irq_vectors_affinity);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 218/321 net/core/neighbour: fix kmemleak minimal reference count for hash tables
In reply to Greg Kroah-HartmanFrom: Konstantin Khlebnikov <[email protected]>
[ Upstream commit 01b833ab44c9e484060aad72267fc7e71beb559b ]
This should be 1 for normal allocations, 0 disables leak reporting.
--- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/neighbour.c +1 -1
@@ -370,7 +370,7 @@ static struct neigh_hash_table *neigh_hash_alloc(unsigned int shift) buckets = (struct neighbour __rcu **)__get_free_pages (GFP_ATOMIC | __GFP_ZERO,get_order (size)); -kmemleak_alloc (buckets, size,0 ,GFP_ATOMIC ); +kmemleak_alloc (buckets, size,1 ,GFP_ATOMIC ); }if (!buckets) {kfree (ret);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 219/321 serial: 8250: Fix serial8250 initialization crash
In reply to Greg Kroah-HartmanFrom: He Zhe <[email protected]>
[ Upstream commit 352c4cf40c4a7d439fa5d30aa2160f54b394da82 ]
The initialization code of interrupt backoff work might reference NULL pointer and cause the following crash, if no port was found.
[ 10.017727] CPU 0 Unable to handle kernel paging request at virtual address 000001b0, epc == 807088e0, ra == 8070863c ---- snip ---- [ 11.704470] [<807088e0>] serial8250_register_8250_port+0x318/0x4ac [ 11.747251] [<80708d74>] serial8250_probe+0x148/0x1c0 [ 11.789301] [<80728450>] platform_drv_probe+0x40/0x94 [ 11.830515] [<807264f8>] really_probe+0xf8/0x318 [ 11.870876] [<80726b7c>] __driver_attach+0x110/0x12c [ 11.910960] [<80724374>] bus_for_each_dev+0x78/0xcc [ 11.951134] [<80725958>] bus_add_driver+0x200/0x234 [ 11.989756] [<807273d8>] driver_register+0x84/0x148 [ 12.029832] [<80d72f84>] serial8250_init+0x138/0x198 [ 12.070447] [<80100e6c>] do_one_initcall+0x5c/0x2a0 [ 12.110104] [<80d3a208>] kernel_init_freeable+0x370/0x484 [ 12.150722] [<80a49420>] kernel_init+0x10/0xf8 [ 12.191517] [<8010756c>] ret_from_kernel_thread+0x14/0x1c
This patch makes sure the initialization code can be reached only if a port is found.
--- drivers/tty/serial/8250/8250_core.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/tty/serial/8250/8250_core.c +9 -8
@@ -1074,15 +1074,16 @@ int serial8250_register_8250_port(struct uart_8250_port *up) ret =0 ; } - } -/* Initialise interrupt backoff work if required */ -if (up->overrun_backoff_time_ms >0 ) { - uart->overrun_backoff_time_ms = up->overrun_backoff_time_ms; -INIT_DELAYED_WORK (&uart->overrun_backoff, - serial_8250_overrun_backoff_work); - }else { - uart->overrun_backoff_time_ms =0 ; +/* Initialise interrupt backoff work if required */ +if (up->overrun_backoff_time_ms >0 ) { + uart->overrun_backoff_time_ms = + up->overrun_backoff_time_ms; +INIT_DELAYED_WORK (&uart->overrun_backoff, + serial_8250_overrun_backoff_work); + }else { + uart->overrun_backoff_time_ms =0 ; + } }mutex_unlock (&serial_mutex);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 220/321 gpu: ipu-v3: pre: dont trigger update if buffer address doesnt change
In reply to Greg Kroah-HartmanFrom: Lucas Stach <[email protected]>
[ Upstream commit eb0200a4357da100064971689d3a0e9e3cf57f33 ]
On a NOP double buffer update where current buffer address is the same as the next buffer address, the SDW_UPDATE bit clears too late. As we are now using this bit to determine when it is safe to signal flip completion to userspace this will delay completion of atomic commits where one plane doesn't change the buffer by a whole frame period.
Fix this by remembering the last buffer address and just skip the double buffer update if it would not change the buffer address.
--- drivers/gpu/ipu-v3/ipu-pre.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/ipu-v3/ipu-pre.c +6 -0
@@ -106,6 +106,7 @@ struct ipu_pre {void *buffer_virt;bool in_use;unsigned int safe_window_end; +unsigned int last_bufaddr; };static DEFINE_MUTEX (ipu_pre_list_mutex);
@@ -185,6 +186,7 @@ void ipu_pre_configure(struct ipu_pre *pre, unsigned int width,writel (bufaddr, pre->regs +IPU_PRE_CUR_BUF );writel (bufaddr, pre->regs +IPU_PRE_NEXT_BUF ); + pre->last_bufaddr = bufaddr; val =IPU_PRE_PREF_ENG_CTRL_INPUT_PIXEL_FORMAT (0 ) | IPU_PRE_PREF_ENG_CTRL_INPUT_ACTIVE_BPP(active_bpp) |
@@ -242,7 +244,11 @@ void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr)unsigned short current_yblock;u32 val; +if (bufaddr == pre->last_bufaddr) +return ; +writel (bufaddr, pre->regs +IPU_PRE_NEXT_BUF ); + pre->last_bufaddr = bufaddr; do { if (time_after(jiffies, timeout)) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 254/321 scsi: libsas: Check SMP PHY control function result
In reply to Greg Kroah-HartmanFrom: John Garry <[email protected]>
[ Upstream commit 01929a65dfa13e18d89264ab1378854a91857e59 ]
Currently the SMP PHY control execution result is checked, however the function result for the command is not.
As such, we may be missing all potential errors, like SMP FUNCTION FAILED, INVALID REQUEST FRAME LENGTH, etc., meaning the PHY control request has failed.
In some scenarios we need to ensure the function result is accepted, so add a check for this.
--- drivers/scsi/libsas/sas_expander.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/scsi/libsas/sas_expander.c +8 -1
@@ -614,7 +614,14 @@ int sas_smp_phy_control(struct domain_device *dev, int phy_id, } res =smp_execute_task (dev, pc_req,PC_REQ_SIZE , pc_resp,PC_RESP_SIZE ); - +if (res) { +pr_err ("ex %016llx phy%02d PHY control failed: %d\n" , +SAS_ADDR (dev->sas_addr), phy_id, res); + }else if (pc_resp[2 ] !=SMP_RESP_FUNC_ACC ) { +pr_err ("ex %016llx phy%02d PHY control failed: function result 0x%x\n" , +SAS_ADDR (dev->sas_addr), phy_id, pc_resp[2 ]); + res = pc_resp[2 ]; + }kfree (pc_resp);kfree (pc_req);return res;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 263/321 mm, gup: add missing refcount overflow checks on s390
In reply to Greg Kroah-HartmanFrom: Vlastimil Babka <[email protected]>
The mainline commit 8fde12ca79af ("mm: prevent get_user_pages() from overflowing page refcount") was backported to 4.19.y stable as commit d972ebbf42ba. The backport however missed that in 4.19, there are several arch-specific gup.c versions with fast gup implementations, so these do not prevent refcount overflow.
This stable-only commit fixes the s390 version, and is based on the backport in SUSE SLES/openSUSE 4.12-based kernels.
The remaining architectures with own gup.c are sparc, mips, sh. It's unlikely the known overflow scenario based on FUSE, which needs 140GB of RAM, is a problem for those architectures, and I don't feel confident enough to patch them.
--- arch/s390/mm/gup.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
arch/s390/mm/gup.c +6 -3
@@ -39,7 +39,8 @@ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,VM_BUG_ON (!pfn_valid (pte_pfn (pte))); page =pte_page (pte); head =compound_head (page); -if (!page_cache_get_speculative (head)) +if (unlikely (WARN_ON_ONCE (page_ref_count (head) <0 ) + || !page_cache_get_speculative (head)))return 0 ;if (unlikely (pte_val (pte) !=pte_val (*ptep))) {put_page (head);
@@ -77,7 +78,8 @@ static inline int gup_huge_pmd(pmd_t *pmdp, pmd_t pmd, unsigned long addr, refs++; }while (addr +=PAGE_SIZE , addr != end); -if (!page_cache_add_speculative (head, refs)) { +if (unlikely (WARN_ON_ONCE (page_ref_count (head) <0 ) + || !page_cache_add_speculative (head, refs))) { *nr -= refs;return 0 ; }
@@ -151,7 +153,8 @@ static int gup_huge_pud(pud_t *pudp, pud_t pud, unsigned long addr, refs++; }while (addr +=PAGE_SIZE , addr != end); -if (!page_cache_add_speculative (head, refs)) { +if (unlikely (WARN_ON_ONCE (page_ref_count (head) <0 ) + || !page_cache_add_speculative (head, refs))) { *nr -= refs;return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 264/321 KVM: nVMX: rename enter_vmx_non_root_mode to nested_vmx_enter_non_root_mode
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit d63907dc7dd11d98c8ffbdaf8311987e5a508744 upstream.
...to be more consistent with the nested VMX nomenclature.
--- arch/x86/kvm/vmx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/x86/kvm/vmx.c +5 -5
@@ -12680,7 +12680,7 @@ static int check_vmentry_postreqs(struct* If exit_qual is NULL, this is being called from state restore (either RSM * or KVM_SET_NESTED_STATE). Otherwise it's called from vmlaunch/vmresume. */ -static int enter_vmx_non_root_mode (struct kvm_vcpu *vcpu,u32 *exit_qual) +static int nested_vmx_enter_non_root_mode (struct kvm_vcpu *vcpu,u32 *exit_qual) {struct vcpu_vmx *vmx =to_vmx (vcpu);struct vmcs12 *vmcs12 =get_vmcs12 (vcpu);
@@ -12845,7 +12845,7 @@ static int nested_vmx_run(struct kvm_vcp*/ vmx->nested.nested_run_pending =1 ; - ret =enter_vmx_non_root_mode (vcpu, &exit_qual); + ret =nested_vmx_enter_non_root_mode (vcpu, &exit_qual);if (ret) {nested_vmx_entry_failure (vcpu, vmcs12, ret, exit_qual); vmx->nested.nested_run_pending =0 ;
@@ -12856,7 +12856,7 @@ static int nested_vmx_run(struct kvm_vcp vmx->vcpu.arch.l1tf_flush_l1d = true;/* -* Must happen outside of enter_vmx_non_root_mode() as it will +* Must happen outside of nested_vmx_enter_non_root_mode() as it will * also be used as part of restoring nVMX state for * snapshot restore (migration). *
@@ -14089,7 +14089,7 @@ static int vmx_pre_leave_smm(struct kvm_if (vmx->nested.smm.guest_mode) { vcpu->arch.hflags &= ~HF_SMM_MASK ; - ret =enter_vmx_non_root_mode (vcpu,NULL ); + ret =nested_vmx_enter_non_root_mode (vcpu,NULL ); vcpu->arch.hflags |=HF_SMM_MASK ;if (ret)return ret;
@@ -14300,7 +14300,7 @@ static int vmx_set_nested_state(struct kreturn -EINVAL ; vmx->nested.dirty_vmcs12 = true; - ret =enter_vmx_non_root_mode (vcpu,NULL ); + ret =nested_vmx_enter_non_root_mode (vcpu,NULL );if (ret)return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 266/321 clk: at91: fix update bit maps on CFG_MOR write
In reply to Greg Kroah-HartmanFrom: Eugen Hristev <[email protected]>
commit 263eaf8f172d9f44e15d6aca85fe40ec18d2c477 upstream.
The regmap update bits call was not selecting the proper mask, considering the bits which was updating.
Update the mask from call to also include OSCBYPASS.
Removed MOSCEN which was not updated.
--- drivers/clk/at91/clk-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/at91/clk-main.c +1 -1
@@ -162,7 +162,7 @@ at91_clk_register_main_osc(struct regmapif (bypass)regmap_update_bits (regmap,AT91_CKGR_MOR ,MOR_KEY_MASK | -AT91_PMC_MOSCEN , +AT91_PMC_OSCBYPASS ,AT91_PMC_OSCBYPASS |AT91_PMC_KEY ); hw = &osc->hw;
Greg Kroah-Hartman
maintainerPATCH 267/321 clk: at91: generated: set audio_pll_allowed in at91_clk_register_generated()
In reply to Greg Kroah-HartmanFrom: Alexandre Belloni <[email protected]>
commit c1e4580a1d0ff510d56268c1fc7fcfeec366fe70 upstream.
Set gck->audio_pll_allowed in at91_clk_register_generated. This makes it easier to do it from code that is not parsing device tree.
Also, this fixes an issue where the resulting clk_hw can be dereferenced before being tested for error.
--- drivers/clk/at91/clk-generated.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-)
drivers/clk/at91/clk-generated.c +10 -18
@@ -284,7 +284,7 @@ static void clk_generated_startup(structstatic struct clk_hw *__init at91_clk_register_generated (struct regmap *regmap,spinlock_t *lock,const char *name,const char **parent_names, -u8 num_parents,u8 id, +u8 num_parents,u8 id,bool pll_audio,const struct clk_range *range) {struct clk_generated *gck;
@@ -308,6 +308,7 @@ at91_clk_register_generated(struct regma gck->regmap = regmap; gck->lock = lock; gck->range = *range; + gck->audio_pll_allowed = pll_audio;clk_generated_startup (gck); hw = &gck->hw;
@@ -333,7 +334,6 @@ static void __init of_sama5d2_clk_generastruct device_node *gcknp;struct clk_range range =CLK_RANGE (0 ,0 );struct regmap *regmap; -struct clk_generated *gck; num_parents =of_clk_get_parent_count (np);if (num_parents ==0 || num_parents >GENERATED_SOURCE_MAX )
@@ -350,6 +350,8 @@ static void __init of_sama5d2_clk_generareturn ;for_each_child_of_node (np, gcknp) { +bool pll_audio = false; +if (of_property_read_u32 (gcknp,"reg" , &id))continue ;
@@ -362,24 +364,14 @@ static void __init of_sama5d2_clk_generaof_at91_get_clk_range (gcknp,"atmel,clk-output-range" , &range); +if (of_device_is_compatible (np,"atmel,sama5d2-clk-generated" ) && + (id ==GCK_ID_I2S0 || id ==GCK_ID_I2S1 || + id ==GCK_ID_CLASSD )) + pll_audio = true; + hw =at91_clk_register_generated (regmap, &pmc_pcr_lock, name, parent_names, num_parents, - id, &range); - - gck =to_clk_generated (hw); - -if (of_device_is_compatible (np, -"atmel,sama5d2-clk-generated" )) { -if (gck->id ==GCK_ID_SSC0 || gck->id ==GCK_ID_SSC1 || - gck->id ==GCK_ID_I2S0 || gck->id ==GCK_ID_I2S1 || - gck->id ==GCK_ID_CLASSD ) - gck->audio_pll_allowed = true; -else - gck->audio_pll_allowed = false; - }else { - gck->audio_pll_allowed = false; - } - + id, pll_audio, &range);if (IS_ERR (hw))continue ;
Greg Kroah-Hartman
maintainerPATCH 269/321 staging: rtl8192e: fix potential use after free
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
commit b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 upstream.
The variable skb is released via kfree_skb() when the return value of _rtl92e_tx is not zero. However, after that, skb is accessed again to read its length, which may result in a use after free bug. This patch fixes the bug by moving the release operation to where skb is never used later.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +3 -2
@@ -1627,14 +1627,15 @@ static void _rtl92e_hard_data_xmit(strucmemcpy ((unsigned char *)(skb->cb), &dev,sizeof (dev));skb_push (skb, priv->rtllib->tx_headroom); ret =_rtl92e_tx (dev, skb); -if (ret !=0 ) -kfree_skb (skb);if (queue_index !=MGNT_QUEUE ) { priv->rtllib->stats.tx_bytes += (skb->len - priv->rtllib->tx_headroom); priv->rtllib->stats.tx_packets++; } + +if (ret !=0 ) +kfree_skb (skb); }static int _rtl92e_hard_start_xmit (struct sk_buff *skb,struct net_device *dev)
Greg Kroah-Hartman
maintainerPATCH 270/321 staging: rtl8723bs: Drop ACPI device ids
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit 2d9d2491530a156b9a5614adf9dc79285e35d55e upstream.
The driver only binds by SDIO device-ids, all the ACPI device-id does is causing the driver to load unnecessarily on devices where the DSDT contains a bogus OBDA8723 device.
--- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0 -6
@@ -22,13 +22,7 @@ static const struct sdio_device_id sdio_ { SDIO_DEVICE(0x024c, 0xb723), }, { /* end: all zeroes */ }, }; -static const struct acpi_device_id acpi_ids[] = { - {"OBDA8723" ,0x0000 }, - {} -}; -MODULE_DEVICE_TABLE (sdio, sdio_ids); -MODULE_DEVICE_TABLE (acpi, acpi_ids);static int rtw_drv_init (struct sdio_func *func,const struct sdio_device_id *id);static void rtw_dev_remove (struct sdio_func *func);
Greg Kroah-Hartman
maintainerPATCH 272/321 USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P
In reply to Greg Kroah-HartmanFrom: Fabio D'Urso <[email protected]>
commit c1a1f273d0825774c80896b8deb1c9ea1d0b91e3 upstream.
This device presents itself as a USB hub with three attached devices:
- An ACM serial port connected to the GPS module (not affected by this commit)
- An FTDI serial port connected to the GPS module (1546:0502)
- Another FTDI serial port connected to the ODIN-W2 radio module (1546:0503)
This commit registers U-Blox's VID and the PIDs of the second and third devices.
--- drivers/usb/serial/ftdi_sio.c | 3 +++ drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++ 2 files changed, 10 insertions(+)
drivers/usb/serial/ftdi_sio.c +3 -0
@@ -1023,6 +1023,9 @@ static const struct usb_device_id id_tab/* Sienna devices */ { USB_DEVICE(FTDI_VID, FTDI_SIENNA_PID) }, { USB_DEVICE(ECHELON_VID, ECHELON_U20_PID) }, +/* U-Blox devices */ + { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) }, + { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) }, { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +7 -0
@@ -1558,3 +1558,10 @@*/ #define UNJO_VID 0x22B7#define UNJO_ISODEBUG_V1_PID 0x150D + +/* +* U-Blox products (http://www.u-blox.com). +*/ +#define UBLOX_VID 0x1546 +#define UBLOX_C099F9P_ZED_PID 0x0502 +#define UBLOX_C099F9P_ODIN_PID 0x0503
Greg Kroah-Hartman
maintainerPATCH 255/321 RDMA/hns: Fix the bug with updating rq head pointer when flush cqe
In reply to Greg Kroah-HartmanFrom: Lijun Ou <[email protected]>
[ Upstream commit 9c6ccc035c209dda07685e8dba829a203ba17499 ]
When flush cqe with srq, the driver disable to update the rq head pointer into the hardware.
--- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +7 -3
@@ -3503,13 +3503,16 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,roce_set_field (qpc_mask->byte_160_sq_ci_pi,V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M ,V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S ,0 ); -roce_set_field (context->byte_84_rq_ci_pi, + +if (!ibqp->srq) { +roce_set_field (context->byte_84_rq_ci_pi,V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M ,V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S , hr_qp->rq.head); -roce_set_field (qpc_mask->byte_84_rq_ci_pi, +roce_set_field (qpc_mask->byte_84_rq_ci_pi,V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M ,V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S ,0 ); + } }if (attr_mask &IB_QP_AV ) {
@@ -3971,7 +3974,8 @@ static void hns_roce_set_qps_to_err(struct hns_roce_dev *hr_dev, u32 qpn)if (hr_qp->ibqp.uobject) {if (hr_qp->sdb_en ==1 ) { hr_qp->sq.head = *(int *)(hr_qp->sdb.virt_addr); - hr_qp->rq.head = *(int *)(hr_qp->rdb.virt_addr); +if (hr_qp->rdb_en ==1 ) + hr_qp->rq.head = *(int *)(hr_qp->rdb.virt_addr); }else {dev_warn (hr_dev->dev,"flush cqe is unsupported in userspace!\n" );return ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 274/321 mei: me: add comet point V device id
In reply to Greg Kroah-HartmanFrom: Alexander Usyskin <[email protected]>
commit 82b29b9f72afdccb40ea5f3c13c6a3cb65a597bc upstream.
Comet Point (Comet Lake) V device id.
--- drivers/misc/mei/hw-me-regs.h | 1 + drivers/misc/mei/pci-me.c | 1 + 2 files changed, 2 insertions(+)
drivers/misc/mei/hw-me-regs.h +1 -0
@@ -141,6 +141,7 @@#define MEI_DEV_ID_CMP_LP 0x02e0/* Comet Point LP */ #define MEI_DEV_ID_CMP_LP_3 0x02e4/* Comet Point LP 3 (iTouch) */ +#define MEI_DEV_ID_CMP_V 0xA3BA/* Comet Point Lake V */ #define MEI_DEV_ID_ICP_LP 0x34E0/* Ice Lake Point LP */
drivers/misc/mei/pci-me.c +1 -0
@@ -107,6 +107,7 @@ static const struct pci_device_id mei_me {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP, MEI_ME_PCH12_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP_3, MEI_ME_PCH8_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_V, MEI_ME_PCH12_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)},
Greg Kroah-Hartman
maintainerPATCH 276/321 xfrm: Fix memleak on xfrm state destroy
In reply to Greg Kroah-HartmanFrom: Steffen Klassert <[email protected]>
commit 86c6739eda7d2a03f2db30cbee67a5fb81afa8ba upstream.
We leak the page that we use to create skb page fragments when destroying the xfrm_state. Fix this by dropping a page reference if a page was assigned to the xfrm_state.
--- net/xfrm/xfrm_state.c | 2 ++ 1 file changed, 2 insertions(+)
net/xfrm/xfrm_state.c +2 -0
@@ -456,6 +456,8 @@ static void ___xfrm_state_destroy(struct x->type->destructor (x);xfrm_put_type (x->type); } +if (x->xfrag.page) +put_page (x->xfrag.page);xfrm_dev_state_free (x);security_xfrm_state_free (x);xfrm_state_free (x);
Greg Kroah-Hartman
maintainerPATCH 278/321 net: macb: fix error format in dev_err()
In reply to Greg Kroah-HartmanFrom: Luca Ceresoli <[email protected]>
commit f413cbb332a0b5251a790f396d0eb4ebcade5dec upstream.
Errors are negative numbers. Using %u shows them as very large positive numbers such as 4294967277 that don't make sense. Use the %d format instead, and get a much nicer -19.
--- drivers/net/ethernet/cadence/macb_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/net/ethernet/cadence/macb_main.c +7 -7
@@ -3328,7 +3328,7 @@ static int macb_clk_init(struct platformif (!err) err = -ENODEV ; -dev_err (&pdev->dev,"failed to get macb_clk (%u)\n" , err); +dev_err (&pdev->dev,"failed to get macb_clk (%d)\n" , err);return err; }
@@ -3337,7 +3337,7 @@ static int macb_clk_init(struct platformif (!err) err = -ENODEV ; -dev_err (&pdev->dev,"failed to get hclk (%u)\n" , err); +dev_err (&pdev->dev,"failed to get hclk (%d)\n" , err);return err; }
@@ -3351,25 +3351,25 @@ static int macb_clk_init(struct platform err =clk_prepare_enable (*pclk);if (err) { -dev_err (&pdev->dev,"failed to enable pclk (%u)\n" , err); +dev_err (&pdev->dev,"failed to enable pclk (%d)\n" , err);return err; } err =clk_prepare_enable (*hclk);if (err) { -dev_err (&pdev->dev,"failed to enable hclk (%u)\n" , err); +dev_err (&pdev->dev,"failed to enable hclk (%d)\n" , err); goto err_disable_pclk; } err =clk_prepare_enable (*tx_clk);if (err) { -dev_err (&pdev->dev,"failed to enable tx_clk (%u)\n" , err); +dev_err (&pdev->dev,"failed to enable tx_clk (%d)\n" , err); goto err_disable_hclk; } err =clk_prepare_enable (*rx_clk);if (err) { -dev_err (&pdev->dev,"failed to enable rx_clk (%u)\n" , err); +dev_err (&pdev->dev,"failed to enable rx_clk (%d)\n" , err); goto err_disable_txclk; }
@@ -3839,7 +3839,7 @@ static int at91ether_clk_init(struct pla err =clk_prepare_enable (*pclk);if (err) { -dev_err (&pdev->dev,"failed to enable pclk (%u)\n" , err); +dev_err (&pdev->dev,"failed to enable pclk (%d)\n" , err);return err; }
Greg Kroah-Hartman
maintainerPATCH 277/321 media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
In reply to Greg Kroah-HartmanFrom: Eugen Hristev <[email protected]>
commit a0816e5088baab82aa738d61a55513114a673c8e upstream.
Control DO_WHITE_BALANCE is a button, with read only and execute-on-write flags. Adding this control in the proper list in the fill function.
After adding it here, we can see output of v4l2-ctl -L do_white_balance 0x0098090d (button) : flags=write-only, execute-on-write
--- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/v4l2-core/v4l2-ctrls.c +1 -0
@@ -1145,6 +1145,7 @@ void v4l2_ctrl_fill(u32 id, const char *case V4L2_CID_FLASH_STROBE_STOP :case V4L2_CID_AUTO_FOCUS_START :case V4L2_CID_AUTO_FOCUS_STOP : +case V4L2_CID_DO_WHITE_BALANCE : *type =V4L2_CTRL_TYPE_BUTTON ; *flags |=V4L2_CTRL_FLAG_WRITE_ONLY |V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ;
Greg Kroah-Hartman
maintainerPATCH 282/321 macvlan: schedule bc_work even if error
In reply to Greg Kroah-HartmanFrom: Menglong Dong <[email protected]>
[ Upstream commit 1d7ea55668878bb350979c377fc72509dd6f5b21 ]
While enqueueing a broadcast skb to port->bc_queue, schedule_work() is called to add port->bc_work, which processes the skbs in bc_queue, to "events" work queue. If port->bc_queue is full, the skb will be discarded and schedule_work(&port->bc_work) won't be called. However, if port->bc_queue is full and port->bc_work is not running or pending, port->bc_queue will keep full and schedule_work() won't be called any more, and all broadcast skbs to macvlan will be discarded. This case can happen:
macvlan_process_broadcast() is the pending function of port->bc_work, it moves all the skbs in port->bc_queue to the queue "list", and processes the skbs in "list". During this, new skbs will keep being added to port->bc_queue in macvlan_broadcast_enqueue(), and port->bc_queue may already full when macvlan_process_broadcast() return. This may happen, especially when there are a lot of real-time threads and the process is preempted.
Fix this by calling schedule_work(&port->bc_work) even if port->bc_work is full in macvlan_broadcast_enqueue().
--- drivers/net/macvlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/macvlan.c +2 -1
@@ -363,10 +363,11 @@ static void macvlan_broadcast_enqueue(st }spin_unlock (&port->bc_queue.lock); +schedule_work (&port->bc_work); +if (err) goto free_nskb; -schedule_work (&port->bc_work);return ; free_nskb:
Greg Kroah-Hartman
maintainerPATCH 256/321 RDMA/hns: Bugfix for the scene without receiver queue
In reply to Greg Kroah-HartmanFrom: Lijun Ou <[email protected]>
[ Upstream commit 4d103905eb1e4f14cb62fcf962c9d35da7005dea ]
In some application scenario, the user could not have receive queue when run rdma write or read operation.
--- drivers/infiniband/hw/hns/hns_roce_qp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_qp.c +2 -1
@@ -522,7 +522,8 @@ static int hns_roce_qp_has_sq(struct ib_qp_init_attr *attr)static int hns_roce_qp_has_rq (struct ib_qp_init_attr *attr) {if (attr->qp_type ==IB_QPT_XRC_INI || - attr->qp_type ==IB_QPT_XRC_TGT || attr->srq) + attr->qp_type ==IB_QPT_XRC_TGT || attr->srq || + !attr->cap.max_recv_wr)return 0 ;return 1 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 283/321 net: psample: fix skb_over_panic
In reply to Greg Kroah-HartmanFrom: Nikolay Aleksandrov <[email protected]>
[ Upstream commit 7eb9d7675c08937cd11d32b0b40442d4d731c5ee ]
We need to calculate the skb size correctly otherwise we risk triggering skb_over_panic[1]. The issue is that data_len is added to the skb in a nl attribute, but we don't account for its header size (nlattr 4 bytes) and alignment. We account for it when calculating the total size in the > PSAMPLE_MAX_PACKET_SIZE comparison correctly, but not when allocating after that. The fix is simple - use nla_total_size() for data_len when allocating.
To reproduce:
$ tc qdisc add dev eth1 clsact $ tc filter add dev eth1 egress matchall action sample rate 1 group 1 trunc 129 $ mausezahn eth1 -b bcast -a rand -c 1 -p 129 < skb_over_panic BUG(), tail is 4 bytes past skb->end >
[1] Trace:
[ 50.459526][ T3480] skbuff: skb_over_panic: text:(____ptrval____) len:196 put:136 head:(____ptrval____) data:(____ptrval____) tail:0xc4 end:0xc0 dev:<NULL> [ 50.474339][ T3480] ------------[ cut here ]------------ [ 50.481132][ T3480] kernel BUG at net/core/skbuff.c:108! [ 50.486059][ T3480] invalid opcode: 0000 [#1] PREEMPT SMP [ 50.489463][ T3480] CPU: 3 PID: 3480 Comm: mausezahn Not tainted 5.4.0-rc7 #108 [ 50.492844][ T3480] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-2.fc30 04/01/2014 [ 50.496551][ T3480] RIP: 0010:skb_panic+0x79/0x7b [ 50.498261][ T3480] Code: bc 00 00 00 41 57 4c 89 e6 48 c7 c7 90 29 9a 83 4c 8b 8b c0 00 00 00 50 8b 83 b8 00 00 00 50 ff b3 c8 00 00 00 e8 ae ef c0 fe <0f> 0b e8 2f df c8 fe 48 8b 55 08 44 89 f6 4c 89 e7 48 c7 c1 a0 22 [ 50.504111][ T3480] RSP: 0018:ffffc90000447a10 EFLAGS: 00010282 [ 50.505835][ T3480] RAX: 0000000000000087 RBX: ffff888039317d00 RCX: 0000000000000000 [ 50.507900][ T3480] RDX: 0000000000000000 RSI: ffffffff812716e1 RDI: 00000000ffffffff [ 50.509820][ T3480] RBP: ffffc90000447a60 R08: 0000000000000001 R09: 0000000000000000 [ 50.511735][ T3480] R10: ffffffff81d4f940 R11: 0000000000000000 R12: ffffffff834a22b0 [ 50.513494][ T3480] R13: ffffffff82c10433 R14: 0000000000000088 R15: ffffffff838a8084 [ 50.515222][ T3480] FS: 00007f3536462700(0000) GS:ffff88803eac0000(0000) knlGS:0000000000000000 [ 50.517135][ T3480] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 50.518583][ T3480] CR2: 0000000000442008 CR3: 000000003b222000 CR4: 00000000000006e0 [ 50.520723][ T3480] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 50.522709][ T3480] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 50.524450][ T3480] Call Trace: [ 50.525214][ T3480] skb_put.cold+0x1b/0x1b [ 50.526171][ T3480] psample_sample_packet+0x1d3/0x340 [ 50.527307][ T3480] tcf_sample_act+0x178/0x250 [ 50.528339][ T3480] tcf_action_exec+0xb1/0x190 [ 50.529354][ T3480] mall_classify+0x67/0x90 [ 50.530332][ T3480] tcf_classify+0x72/0x160 [ 50.531286][ T3480] __dev_queue_xmit+0x3db/0xd50 [ 50.532327][ T3480] dev_queue_xmit+0x18/0x20 [ 50.533299][ T3480] packet_sendmsg+0xee7/0x2090 [ 50.534331][ T3480] sock_sendmsg+0x54/0x70 [ 50.535271][ T3480] __sys_sendto+0x148/0x1f0 [ 50.536252][ T3480] ? tomoyo_file_ioctl+0x23/0x30 [ 50.537334][ T3480] ? ksys_ioctl+0x5e/0xb0 [ 50.540068][ T3480] __x64_sys_sendto+0x2a/0x30 [ 50.542810][ T3480] do_syscall_64+0x73/0x1f0 [ 50.545383][ T3480] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 50.548477][ T3480] RIP: 0033:0x7f35357d6fb3 [ 50.551020][ T3480] Code: 48 8b 0d 18 90 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d f9 d3 20 00 00 75 13 49 89 ca b8 2c 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 eb f6 ff ff 48 89 04 24 [ 50.558547][ T3480] RSP: 002b:00007ffe0c7212c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 50.561870][ T3480] RAX: ffffffffffffffda RBX: 0000000001dac010 RCX: 00007f35357d6fb3 [ 50.565142][ T3480] RDX: 0000000000000082 RSI: 0000000001dac2a2 RDI: 0000000000000003 [ 50.568469][ T3480] RBP: 00007ffe0c7212f0 R08: 00007ffe0c7212d0 R09: 0000000000000014 [ 50.571731][ T3480] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000082 [ 50.574961][ T3480] R13: 0000000001dac2a2 R14: 0000000000000001 R15: 0000000000000003 [ 50.578170][ T3480] Modules linked in: sch_ingress virtio_net [ 50.580976][ T3480] ---[ end trace 61a515626a595af6 ]---
--- net/psample/psample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/psample/psample.c +1 -1
@@ -223,7 +223,7 @@ void psample_sample_packet(struct psampl data_len =PSAMPLE_MAX_PACKET_SIZE - meta_len -NLA_HDRLEN -NLA_ALIGNTO ; - nl_skb =genlmsg_new (meta_len + data_len,GFP_ATOMIC ); + nl_skb =genlmsg_new (meta_len +nla_total_size (data_len),GFP_ATOMIC );if (unlikely (!nl_skb))return ;
Greg Kroah-Hartman
maintainerPATCH 285/321 sctp: Fix memory leak in sctp_sf_do_5_2_4_dupcook
In reply to Greg Kroah-HartmanFrom: Navid Emamdoost <[email protected]>
[ Upstream commit b6631c6031c746ed004c4221ec0616d7a520f441 ]
In the implementation of sctp_sf_do_5_2_4_dupcook() the allocated new_asoc is leaked if security_sctp_assoc_request() fails. Release it via sctp_association_free().
--- net/sctp/sm_statefuns.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/sctp/sm_statefuns.c +3 -1
@@ -2175,8 +2175,10 @@ enum sctp_disposition sctp_sf_do_5_2_4_d/* Update socket peer label if first association. */ if (security_sctp_assoc_request ((struct sctp_endpoint *)ep, - chunk->skb)) + chunk->skb)) { +sctp_association_free (new_asoc);return sctp_sf_pdiscard (net, ep, asoc, type, arg, commands); + }/* Set temp so that it won't be added into hashtable */ new_asoc->temp =1 ;
Greg Kroah-Hartman
maintainerPATCH 286/321 slip: Fix use-after-free Read in slip_open
In reply to Greg Kroah-HartmanFrom: Jouni Hogander <[email protected]>
[ Upstream commit e58c1912418980f57ba2060017583067f5f71e52 ]
Slip_open doesn't clean-up device which registration failed from the slip_devs device list. On next open after failure this list is iterated and freed device is accessed. Fix this by calling sl_free_netdev in error path.
Here is the trace from the Syzbot:
__dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 sl_sync drivers/net/slip/slip.c:725 [inline] slip_open+0xecd/0x11b7 drivers/net/slip/slip.c:801 tty_ldisc_open.isra.0+0xa3/0x110 drivers/tty/tty_ldisc.c:469 tty_set_ldisc+0x30e/0x6b0 drivers/tty/tty_ldisc.c:596 tiocsetd drivers/tty/tty_io.c:2334 [inline] tty_ioctl+0xe8d/0x14f0 drivers/tty/tty_io.c:2594 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe
--- drivers/net/slip/slip.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/slip/slip.c +1 -0
@@ -855,6 +855,7 @@ err_free_chan: sl->tty =NULL ; tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags); +sl_free_netdev (sl->dev);free_netdev (sl->dev); err_exit:
Greg Kroah-Hartman
maintainerPATCH 287/321 openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info()
In reply to Greg Kroah-HartmanFrom: Paolo Abeni <[email protected]>
[ Upstream commit 8ffeb03fbba3b599690b361467bfd2373e8c450f ]
All the callers of ovs_flow_cmd_build_info() already deal with error return code correctly, so we can handle the error condition in a more gracefull way. Still dump a warning to preserve debuggability.
v1 -> v2:
- clarify the commit message
- clean the skb and report the error (DaveM)
--- net/openvswitch/datapath.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/openvswitch/datapath.c +4 -1
@@ -879,7 +879,10 @@ static struct sk_buff *ovs_flow_cmd_buil retval =ovs_flow_cmd_fill_info (flow, dp_ifindex, skb, info->snd_portid, info->snd_seq,0 , cmd, ufid_flags); -BUG_ON (retval <0 ); +if (WARN_ON_ONCE (retval <0 )) { +kfree_skb (skb); + skb =ERR_PTR (retval); + }return skb; }
Greg Kroah-Hartman
maintainerPATCH 288/321 openvswitch: remove another BUG_ON()
In reply to Greg Kroah-HartmanFrom: Paolo Abeni <[email protected]>
[ Upstream commit 8a574f86652a4540a2433946ba826ccb87f398cc ]
If we can't build the flow del notification, we can simply delete the flow, no need to crash the kernel. Still keep a WARN_ON to preserve debuggability.
Note: the BUG_ON() predates the Fixes tag, but this change can be applied only after the mentioned commit.
v1 -> v2:
- do not leak an skb on error
--- net/openvswitch/datapath.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/openvswitch/datapath.c +5 -1
@@ -1345,7 +1345,10 @@ static int ovs_flow_cmd_del(struct sk_buOVS_FLOW_CMD_DEL , ufid_flags);rcu_read_unlock (); -BUG_ON (err <0 ); +if (WARN_ON_ONCE (err <0 )) { +kfree_skb (reply); + goto out_free; + }ovs_notify (&dp_flow_genl_family, reply, info); }else {
@@ -1353,6 +1356,7 @@ static int ovs_flow_cmd_del(struct sk_bu } } +out_free:ovs_flow_free (flow, true);return 0 ; unlock:
Greg Kroah-Hartman
maintainerPATCH 289/321 selftests: bpf: test_sockmap: handle file creation failures gracefully
In reply to Greg Kroah-HartmanFrom: Jakub Kicinski <[email protected]>
[ Upstream commit 4b67c515036313f3c3ecba3cb2babb9cbddb3f85 ]
test_sockmap creates a temporary file to use for sendpage. this may fail for various reasons. Handle the error rather than segfault.
--- tools/testing/selftests/bpf/test_sockmap.c | 9 +++++++++ 1 file changed, 9 insertions(+)
tools/testing/selftests/bpf/test_sockmap.c +9 -0
@@ -248,6 +248,10 @@ static int msg_loop_sendpage(int fd, intint i, fp; file =fopen (".sendpage_tst.tmp" ,"w+" ); +if (!file) { +perror ("create file for sendpage" ); +return 1 ; + }for (i =0 ; i < iov_length * cnt; i++, k++)fwrite (&k,sizeof (char ),1 , file);fflush (file);
@@ -255,6 +259,11 @@ static int msg_loop_sendpage(int fd, intfclose (file); fp =open (".sendpage_tst.tmp" ,O_RDONLY ); +if (fp <0 ) { +perror ("reopen file for sendpage" ); +return 1 ; + } +clock_gettime (CLOCK_MONOTONIC , &s->start);for (i =0 ; i < cnt; i++) {int sent =sendfile (fd, fp,NULL , iov_length);
Greg Kroah-Hartman
maintainerPATCH 290/321 tipc: fix link name length check
In reply to Greg Kroah-HartmanFrom: John Rutherford <[email protected]>
[ Upstream commit fd567ac20cb0377ff466d3337e6e9ac5d0cb15e4 ]
In commit 4f07b80c9733 ("tipc: check msg->req data len in tipc_nl_compat_bearer_disable") the same patch code was copied into
routines: tipc_nl_compat_bearer_disable(), tipc_nl_compat_link_stat_dump() and tipc_nl_compat_link_reset_stats(). The two link routine occurrences should have been modified to check the maximum link name length and not bearer name length.
--- net/tipc/netlink_compat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/tipc/netlink_compat.c +2 -2
@@ -548,7 +548,7 @@ static int tipc_nl_compat_link_stat_dumpif (len <=0 )return -EINVAL ; - len =min_t (int, len,TIPC_MAX_BEARER_NAME ); + len =min_t (int, len,TIPC_MAX_LINK_NAME );if (!string_is_valid (name, len))return -EINVAL ;
@@ -830,7 +830,7 @@ static int tipc_nl_compat_link_reset_staif (len <=0 )return -EINVAL ; - len =min_t (int, len,TIPC_MAX_BEARER_NAME ); + len =min_t (int, len,TIPC_MAX_LINK_NAME );if (!string_is_valid (name, len))return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 292/321 net: sched: fix `tc -s class show` no bstats on class with nolock subqueues
In reply to Greg Kroah-HartmanFrom: Dust Li <[email protected]>
[ Upstream commit 14e54ab9143fa60794d13ea0a66c792a2046a8f3 ]
When a classful qdisc's child qdisc has set the flag TCQ_F_CPUSTATS (pfifo_fast for example), the child qdisc's cpu_bstats should be passed to gnet_stats_copy_basic(), but many classful qdisc didn't do that. As a result, tc -s class show dev DEV always return 0 for bytes and packets in this case.
Pass the child qdisc's cpu_bstats to gnet_stats_copy_basic() to fix this issue.
The qstats also has this problem, but it has been fixed in 5dd431b6b9 ("net: sched: introduce and use qstats read...") and bstats still remains buggy.
--- net/sched/sch_mq.c | 3 ++- net/sched/sch_mqprio.c | 4 ++-- net/sched/sch_multiq.c | 2 +- net/sched/sch_prio.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-)
net/sched/sch_mq.c +2 -1
@@ -242,7 +242,8 @@ static int mq_dump_class_stats(struct Qdstruct netdev_queue *dev_queue =mq_queue_get (sch, cl); sch = dev_queue->qdisc_sleeping; -if (gnet_stats_copy_basic (&sch->running, d,NULL , &sch->bstats) <0 || +if (gnet_stats_copy_basic (&sch->running, d, sch->cpu_bstats, + &sch->bstats) <0 ||gnet_stats_copy_queue (d,NULL , &sch->qstats, sch->q.qlen) <0 )return -1 ;return 0 ;
net/sched/sch_mqprio.c +2 -2
@@ -559,8 +559,8 @@ static int mqprio_dump_class_stats(strucstruct netdev_queue *dev_queue =mqprio_queue_get (sch, cl); sch = dev_queue->qdisc_sleeping; -if (gnet_stats_copy_basic (qdisc_root_sleeping_running (sch), - d,NULL , &sch->bstats) <0 || +if (gnet_stats_copy_basic (qdisc_root_sleeping_running (sch), d, + sch->cpu_bstats, &sch->bstats) <0 ||gnet_stats_copy_queue (d,NULL , &sch->qstats, sch->q.qlen) <0 )return -1 ;
net/sched/sch_multiq.c +1 -1
@@ -343,7 +343,7 @@ static int multiq_dump_class_stats(struc cl_q = q->queues[cl -1 ];if (gnet_stats_copy_basic (qdisc_root_sleeping_running (sch), - d,NULL , &cl_q->bstats) <0 || + d, cl_q->cpu_bstats, &cl_q->bstats) <0 ||gnet_stats_copy_queue (d,NULL , &cl_q->qstats, cl_q->q.qlen) <0 )return -1 ;
net/sched/sch_prio.c +1 -1
@@ -396,7 +396,7 @@ static int prio_dump_class_stats(struct cl_q = q->queues[cl -1 ];if (gnet_stats_copy_basic (qdisc_root_sleeping_running (sch), - d,NULL , &cl_q->bstats) <0 || + d, cl_q->cpu_bstats, &cl_q->bstats) <0 ||gnet_stats_copy_queue (d,NULL , &cl_q->qstats, cl_q->q.qlen) <0 )return -1 ;
Greg Kroah-Hartman
maintainerPATCH 257/321 RDMA/hns: Fix the state of rereg mr
In reply to Greg Kroah-HartmanFrom: Yixian Liu <[email protected]>
[ Upstream commit ab22bf05216a6bb4812448f3a8609489047cf311 ]
The state of mr after reregister operation should be set to valid state. Otherwise, it will keep the same as the state before reregistered.
--- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +3 -0
@@ -1776,6 +1776,9 @@ static int hns_roce_v2_rereg_write_mtpt(struct hns_roce_dev *hr_dev,struct hns_roce_v2_mpt_entry *mpt_entry = mb_buf;int ret =0 ; +roce_set_field (mpt_entry->byte_4_pd_hop_st,V2_MPT_BYTE_4_MPT_ST_M , +V2_MPT_BYTE_4_MPT_ST_S ,V2_MPT_ST_VALID ); +if (flags &IB_MR_REREG_PD ) {roce_set_field (mpt_entry->byte_4_pd_hop_st,V2_MPT_BYTE_4_PD_M ,V2_MPT_BYTE_4_PD_S , pdn);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 294/321 ext4: add more paranoia checking in ext4_expand_extra_isize handling
In reply to Greg Kroah-HartmanFrom: Theodore Ts'o <[email protected]>
commit 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a upstream.
It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when we are actually doing the trying to do the inode expansion.
--- fs/ext4/inode.c | 15 +++++++++++++++ fs/ext4/super.c | 21 ++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-)
fs/ext4/inode.c +15 -0
@@ -5904,8 +5904,23 @@ static int __ext4_expand_extra_isize(str {struct ext4_inode *raw_inode;struct ext4_xattr_ibody_header *header; +unsigned int inode_size =EXT4_INODE_SIZE (inode->i_sb); +struct ext4_inode_info *ei =EXT4_I (inode);int error; +/* this was checked at iget time, but double check for good measure */ +if ((EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize > inode_size) || + (ei->i_extra_isize &3 )) { +EXT4_ERROR_INODE (inode,"bad extra_isize %u (inode size %u)" , + ei->i_extra_isize, +EXT4_INODE_SIZE (inode->i_sb)); +return -EFSCORRUPTED ; + } +if ((new_extra_isize < ei->i_extra_isize) || + (new_extra_isize <4 ) || + (new_extra_isize > inode_size -EXT4_GOOD_OLD_INODE_SIZE )) +return -EINVAL ;/* Should never happen */ + raw_inode =ext4_raw_inode (iloc); header =IHDR (inode, raw_inode);
fs/ext4/super.c +12 -9
@@ -3517,12 +3517,15 @@ static void ext4_clamp_want_extra_isize( {struct ext4_sb_info *sbi =EXT4_SB (sb);struct ext4_super_block *es = sbi->s_es; +unsigned def_extra_isize =sizeof (struct ext4_inode ) - +EXT4_GOOD_OLD_INODE_SIZE ; -/* determine the minimum size of new large inodes, if present */ -if (sbi->s_inode_size >EXT4_GOOD_OLD_INODE_SIZE && - sbi->s_want_extra_isize ==0 ) { - sbi->s_want_extra_isize =sizeof (struct ext4_inode ) - -EXT4_GOOD_OLD_INODE_SIZE ; +if (sbi->s_inode_size ==EXT4_GOOD_OLD_INODE_SIZE ) { + sbi->s_want_extra_isize =0 ; +return ; + } +if (sbi->s_want_extra_isize <4 ) { + sbi->s_want_extra_isize = def_extra_isize;if (ext4_has_feature_extra_isize (sb)) {if (sbi->s_want_extra_isize <le16_to_cpu (es->s_want_extra_isize))
@@ -3535,10 +3538,10 @@ static void ext4_clamp_want_extra_isize( } }/* Check if enough inode space is available */ -if (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > - sbi->s_inode_size) { - sbi->s_want_extra_isize =sizeof (struct ext4_inode ) - -EXT4_GOOD_OLD_INODE_SIZE ; +if ((sbi->s_want_extra_isize > sbi->s_inode_size) || + (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > + sbi->s_inode_size)) { + sbi->s_want_extra_isize = def_extra_isize;ext4_msg (sb,KERN_INFO ,"required extra inode space not available" ); }
Greg Kroah-Hartman
maintainerPATCH 295/321 watchdog: sama5d4: fix WDD value to be always set to max
In reply to Greg Kroah-HartmanFrom: Eugen Hristev <[email protected]>
commit 8632944841d41a36d77dd1fa88d4201b5291100f upstream.
WDD value must be always set to max (0xFFF) otherwise the hardware block will reset the board on the first ping of the watchdog.
--- drivers/watchdog/sama5d4_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/watchdog/sama5d4_wdt.c +1 -3
@@ -111,9 +111,7 @@ static int sama5d4_wdt_set_timeout(strucu32 value =WDT_SEC2TICKS (timeout); wdt->mr &= ~AT91_WDT_WDV ; - wdt->mr &= ~AT91_WDT_WDD ; wdt->mr |=AT91_WDT_SET_WDV (value); - wdt->mr |=AT91_WDT_SET_WDD (value);/* * WDDIS has to be 0 when updating WDD/WDV. The datasheet states: When
@@ -251,7 +249,7 @@ static int sama5d4_wdt_probe(struct plat timeout =WDT_SEC2TICKS (wdd->timeout); - wdt->mr |=AT91_WDT_SET_WDD (timeout); + wdt->mr |=AT91_WDT_SET_WDD (WDT_SEC2TICKS (MAX_WDT_TIMEOUT )); wdt->mr |=AT91_WDT_SET_WDV (timeout); ret =sama5d4_wdt_init (wdt);
Greg Kroah-Hartman
maintainerPATCH 258/321 RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 4e69cf1fe2c52d189acdd06c1fd99cc258aba61f ]
The the below commit, hns_roce_v2_modify_qp is called inside spinlock while using GFP_KERNEL. Change it to GFP_ATOMIC.
--- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +1 -1
@@ -3446,7 +3446,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,struct device *dev = hr_dev->dev;int ret = -EINVAL ; - context =kcalloc (2 ,sizeof (*context),GFP_KERNEL ); + context =kcalloc (2 ,sizeof (*context),GFP_ATOMIC );if (!context)return -ENOMEM ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 259/321 ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board
In reply to Greg Kroah-HartmanFrom: Hui Wang <[email protected]>
[ Upstream commit 406dcbc55a0a20fd155be889a4a0c4b812f7c18e ]
The LattePanda board has a sound card chtrt5645, when there is nothing plugged in the headphone jack, the system thinks the headphone is plugged in, while we plug a headphone in the jack, the system thinks the headphone is unplugged.
If adding quirk=0x21 in the module parameter, the headphone jack can work well. So let us fix it via platform_data.
https://bugs.launchpad.net/bugs/182459
--- sound/soc/codecs/rt5645.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
sound/soc/codecs/rt5645.c +14 -0
@@ -3662,6 +3662,11 @@ static const struct rt5645_platform_data jd_mode3_platform_data = { .jd_mode = 3, }; +static const struct rt5645_platform_data lattepanda_board_platform_data = { + .jd_mode =2 , + .inv_jd1_1 = true +}; +static const struct dmi_system_id dmi_platform_data[] = { { .ident ="Chrome Buddy" ,
@@ -3759,6 +3764,15 @@ static const struct dmi_system_id dmi_platform_data[] = { }, .driver_data = (void *)&intel_braswell_platform_data, }, + { + .ident = "LattePanda board", + .matches = { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), + DMI_EXACT_MATCH(DMI_BOARD_VERSION, "Default string"), + }, + .driver_data = (void *)&lattepanda_board_platform_data, + }, { } };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 261/321 xdp: fix cpumap redirect SKB creation bug
In reply to Greg Kroah-HartmanFrom: Jesper Dangaard Brouer <[email protected]>
[ Upstream commit 676e4a6fe703f2dae699ee9d56f14516f9ada4ea ]
We want to avoid leaking pointer info from xdp_frame (that is placed in top of frame) like commit 6dfb970d3dbd ("xdp: avoid leaking info stored in frame data on page reuse"), and followup commit 97e19cce05e5 ("bpf:
reserve xdp_frame size in xdp headroom") that reserve this headroom.
These changes also affected how cpumap constructed SKBs, as xdpf->headroom size changed, the skb data starting point were in-effect shifted with 32 bytes (sizeof xdp_frame). This was still okay, as the cpumap frame_size calculation also included xdpf->headroom which were reduced by same amount.
A bug was introduced in commit 77ea5f4cbe20 ("bpf/cpumap: make sure frame_size for build_skb is aligned if headroom isn't"), where the xdpf->headroom became part of the SKB_DATA_ALIGN rounding up. This round-up to find the frame_size is in principle still correct as it does not exceed the 2048 bytes frame_size (which is max for ixgbe and i40e), but the 32 bytes offset of pkt_data_start puts this over the 2048 bytes limit. This cause skb_shared_info to spill into next frame. It is a little hard to trigger, as the SKB need to use above 15 skb_shinfo->frags[] as far as I calculate. This does happen in practise for TCP streams when skb_try_coalesce() kicks in.
KASAN can be used to detect these wrong memory accesses, I've seen:
BUG: KASAN: use-after-free in skb_try_coalesce+0x3cb/0x760 BUG: KASAN: wild-memory-access in skb_release_data+0xe2/0x250
Driver veth also construct a SKB from xdp_frame in this way, but is not affected, as it doesn't reserve/deduct the room (used by xdp_frame) from the SKB headroom. Instead is clears the pointers via xdp_scrub_frame(), and allows SKB to use this area.
The fix in this patch is to do like veth and instead allow SKB to (re)use the area occupied by xdp_frame, by clearing via xdp_scrub_frame(). (This does kill the idea of the SKB being able to access (mem) info from this area, but I guess it was a bad idea anyhow, and it was already killed by the veth changes.)
--- kernel/bpf/cpumap.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
kernel/bpf/cpumap.c +10 -3
@@ -162,10 +162,14 @@ static void cpu_map_kthread_stop(struct work_struct *work)static struct sk_buff *cpu_map_build_skb (struct bpf_cpu_map_entry *rcpu,struct xdp_frame *xdpf) { +unsigned int hard_start_headroom;unsigned int frame_size;void *pkt_data_start;struct sk_buff *skb; +/* Part of headroom was reserved to xdpf */ + hard_start_headroom =sizeof (struct xdp_frame ) + xdpf->headroom; +/* build_skb need to place skb_shared_info after SKB end, and * also want to know the memory "truesize". Thus, need to * know the memory frame size backing xdp_buff.
@@ -183,15 +187,15 @@ static struct sk_buff *cpu_map_build_skb(struct bpf_cpu_map_entry *rcpu,* is not at a fixed memory location, with mixed length * packets, which is bad for cache-line hotness. */ - frame_size =SKB_DATA_ALIGN (xdpf->len + xdpf->headroom) + + frame_size =SKB_DATA_ALIGN (xdpf->len + hard_start_headroom) +SKB_DATA_ALIGN (sizeof (struct skb_shared_info )); - pkt_data_start = xdpf->data - xdpf->headroom; + pkt_data_start = xdpf->data - hard_start_headroom; skb =build_skb (pkt_data_start, frame_size);if (!skb)return NULL ; -skb_reserve (skb, xdpf->headroom); +skb_reserve (skb, hard_start_headroom);__skb_put (skb, xdpf->len);if (xdpf->metasize)skb_metadata_set (skb, xdpf->metasize);
@@ -205,6 +209,9 @@ static struct sk_buff *cpu_map_build_skb(struct bpf_cpu_map_entry *rcpu,* - RX ring dev queue index (skb_record_rx_queue) */ +/* Allow SKB to reuse area used by xdp_frame */ +xdp_scrub_frame (xdpf); +return skb; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 262/321 mtd: Remove a debug trace in mtdpart.c
In reply to Greg Kroah-HartmanFrom: Boris Brezillon <[email protected]>
[ Upstream commit bda2ab56356b9acdfab150f31c4bac9846253092 ]
Commit 2b6f0090a333 ("mtd: Check add_mtd_device() ret code") contained a leftover of the debug session that led to this bug fix. Remove this pr_info().
--- drivers/mtd/mtdpart.c | 1 - 1 file changed, 1 deletion(-)
drivers/mtd/mtdpart.c +0 -1
@@ -626,7 +626,6 @@ err_remove_part:mutex_unlock (&mtd_partitions_mutex);free_partition (new); -pr_info ("%s:%i\n" , __func__, __LINE__);return ret; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 253/321 scsi: hisi_sas: shutdown axi bus to avoid exception CQ returned
In reply to Greg Kroah-HartmanFrom: Xiang Chen <[email protected]>
[ Upstream commit 5c31b0c677531c2b8b4e29b3cfb923df663f39b7 ]
When injecting 2 bit ECC error, it will cause fatal AXI interrupts. Before the recovery of SAS controller reset, the internal of SAS controller is in error. If CQ interrupts return at the time, actually it is exception CQ interrupt, and it may cause resource release in disorder.
To avoid the exception situation, shutdown AXI bus after fatal AXI interrupt. In SAS controller reset, it will restart AXI bus. For later version of v3 hw, hardware will shutdown AXI bus for this situation, so just fix current ver of v3 hw.
--- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +12 -0
@@ -1520,6 +1520,7 @@ static irqreturn_t fatal_axi_int_v3_hw(int irq_no, void *p)u32 irq_value, irq_msk;struct hisi_hba *hisi_hba = p;struct device *dev = hisi_hba->dev; +struct pci_dev *pdev = hisi_hba->pci_dev;int i; irq_msk =hisi_sas_read32 (hisi_hba,ENT_INT_SRC_MSK3 );
@@ -1551,6 +1552,17 @@ static irqreturn_t fatal_axi_int_v3_hw(int irq_no, void *p) error->msg, irq_value);queue_work (hisi_hba->wq, &hisi_hba->rst_work); } + +if (pdev->revision <0x21 ) { +u32 reg_val; + + reg_val =hisi_sas_read32 (hisi_hba, +AXI_MASTER_CFG_BASE + +AM_CTRL_GLOBAL ); + reg_val |=AM_CTRL_SHUTDOWN_REQ_MSK ; +hisi_sas_write32 (hisi_hba,AXI_MASTER_CFG_BASE + +AM_CTRL_GLOBAL , reg_val); + } }if (irq_value &BIT (ENT_INT_SRC3_ITC_INT_OFF )) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 297/321 net: macb driver, check for SKBTX_HW_TSTAMP
In reply to Greg Kroah-HartmanFrom: Paul Thomas <[email protected]>
commit a62520473f15750cd1432d36b377a06cd7cff8d2 upstream.
Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been enabled for this skb. It does fix the issue where normal socks that aren't expecting a timestamp will not wake up on select, but when a user does want a SOF_TIMESTAMPING_TX_HARDWARE it does work.
--- drivers/net/ethernet/cadence/macb_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb_main.c +3 -1
@@ -860,7 +860,9 @@ static void macb_tx_interrupt(struct mac/* First, update TX stats if needed */ if (skb) { -if (gem_ptp_do_txstamp (queue, skb, desc) ==0 ) { +if (unlikely (skb_shinfo (skb)->tx_flags & +SKBTX_HW_TSTAMP ) && +gem_ptp_do_txstamp (queue, skb, desc) ==0 ) {/* skb now belongs to timestamp buffer * and will be removed later */
Greg Kroah-Hartman
maintainerPATCH 306/321 media: stm32-dcmi: fix DMA corruption when stopping streaming
In reply to Greg Kroah-HartmanFrom: Hugues Fruchet <[email protected]>
commit b3ce6f6ff3c260ee53b0f2236e5fd950d46957da upstream.
Avoid call of dmaengine_terminate_all() between dmaengine_prep_slave_single() and dmaengine_submit() by locking the whole DMA submission sequence.
--- drivers/media/platform/stm32/stm32-dcmi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/media/platform/stm32/stm32-dcmi.c +17 -0
@@ -164,6 +164,9 @@ struct stm32_dcmi {int errors_count;int overrun_count;int buffers_count; + +/* Ensure DMA operations atomicity */ +struct mutex dma_lock; };static inline struct stm32_dcmi *notifier_to_dcmi (struct v4l2_async_notifier *n)
@@ -314,6 +317,13 @@ static int dcmi_start_dma(struct stm32_dreturn ret; } +/* +* Avoid call of dmaengine_terminate_all() between +* dmaengine_prep_slave_single() and dmaengine_submit() +* by locking the whole DMA submission sequence +*/ +mutex_lock (&dcmi->dma_lock); +/* Prepare a DMA transaction */ desc = dmaengine_prep_slave_single(dcmi->dma_chan, buf->paddr, buf->size,
@@ -322,6 +332,7 @@ static int dcmi_start_dma(struct stm32_dif (!desc) {dev_err (dcmi->dev,"%s: DMA dmaengine_prep_slave_single failed for buffer phy=%pad size=%zu\n" , __func__, &buf->paddr, buf->size); +mutex_unlock (&dcmi->dma_lock);return -EINVAL ; }
@@ -333,9 +344,12 @@ static int dcmi_start_dma(struct stm32_d dcmi->dma_cookie =dmaengine_submit (desc);if (dma_submit_error (dcmi->dma_cookie)) {dev_err (dcmi->dev,"%s: DMA submission failed\n" , __func__); +mutex_unlock (&dcmi->dma_lock);return -ENXIO ; } +mutex_unlock (&dcmi->dma_lock); +dma_async_issue_pending (dcmi->dma_chan);return 0 ;
@@ -717,7 +731,9 @@ static void dcmi_stop_streaming(struct vspin_unlock_irq (&dcmi->irqlock);/* Stop all pending DMA operations */ +mutex_lock (&dcmi->dma_lock);dmaengine_terminate_all (dcmi->dma_chan); +mutex_unlock (&dcmi->dma_lock);pm_runtime_put (dcmi->dev);
@@ -1719,6 +1735,7 @@ static int dcmi_probe(struct platform_despin_lock_init (&dcmi->irqlock);mutex_init (&dcmi->lock); +mutex_init (&dcmi->dma_lock);init_completion (&dcmi->complete);INIT_LIST_HEAD (&dcmi->buffers);
Greg Kroah-Hartman
maintainerPATCH 308/321 hwrng: stm32 - fix unbalanced pm_runtime_enable
In reply to Greg Kroah-HartmanFrom: Lionel Debieve <[email protected]>
commit af0d4442dd6813de6e77309063beb064fa8e89ae upstream.
No remove function implemented yet in the driver. Without remove function, the pm_runtime implementation complains when removing and probing again the driver.
--- drivers/char/hw_random/stm32-rng.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/char/hw_random/stm32-rng.c +8 -0
@@ -169,6 +169,13 @@ static int stm32_rng_probe(struct platforeturn devm_hwrng_register (dev, &priv->rng); } +static int stm32_rng_remove (struct platform_device *ofdev) +{ +pm_runtime_disable (&ofdev->dev); + +return 0 ; +} +#ifdef CONFIG_PM static int stm32_rng_runtime_suspend (struct device *dev) {
@@ -210,6 +217,7 @@ static struct platform_driver stm32_rng_ .of_match_table = stm32_rng_match, }, .probe = stm32_rng_probe, + .remove = stm32_rng_remove, };module_platform_driver (stm32_rng_driver);
Greg Kroah-Hartman
maintainerPATCH 310/321 clk: stm32mp1: fix mcu divider table
In reply to Greg Kroah-HartmanFrom: Gabriel Fernandez <[email protected]>
commit 140fc4e406fac420b978a0ef2ee1fe3c641a6ae4 upstream.
index 8: ck_mcu is divided by 256 (not 512)
--- drivers/clk/clk-stm32mp1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-stm32mp1.c +1 -1
@@ -269,7 +269,7 @@ static const struct clk_div_table axi_distatic const struct clk_div_table mcu_div_table[] = { {0 ,1 }, {1 ,2 }, {2 ,4 }, {3 ,8 }, {4 ,16 }, {5 ,32 }, {6 ,64 }, {7 ,128 }, - {8 ,512 }, {9 ,512 }, {10 ,512 }, {11 ,512 }, + {8 ,256 }, {9 ,512 }, {10 ,512 }, {11 ,512 }, {12 ,512 }, {13 ,512 }, {14 ,512 }, {15 ,512 }, {0 }, };
Greg Kroah-Hartman
maintainerPATCH 311/321 clk: stm32mp1: add CLK_SET_RATE_NO_REPARENT to Kernel clocks
In reply to Greg Kroah-HartmanFrom: Gabriel Fernandez <[email protected]>
commit 72cfd1ad1057f16fc614861b3c271597995e57ba upstream.
STM32MP1 clock IP offers lots of Kernel clocks that are shared by multiple IP's at the same time.
Then boot loader applies a clock tree that allows to use all IP's at same time and with the maximum of performance.
Not change parents on a change rate on kernel clocks ensures the integrity of the system.
--- drivers/clk/clk-stm32mp1.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/clk/clk-stm32mp1.c +7 -5
@@ -1286,10 +1286,11 @@ _clk_stm32_register_composite(struct dev MGATE_MP1(_id, _name, _parent, _flags, _mgate)#define KCLK (_id, _name, _parents, _flags, _mgate, _mmux)\ - COMPOSITE(_id, _name, _parents, CLK_OPS_PARENT_ENABLE | _flags,\ - _MGATE_MP1(_mgate),\ - _MMUX(_mmux),\ - _NO_DIV) + COMPOSITE(_id, _name, _parents, CLK_OPS_PARENT_ENABLE |\ + CLK_SET_RATE_NO_REPARENT | _flags,\ + _MGATE_MP1(_mgate),\ + _MMUX(_mmux),\ + _NO_DIV)enum {G_SAI1 ,
@@ -1952,7 +1953,8 @@ static const struct clock_config stm32mpMGATE_MP1 (GPU_K ,"gpu_k" ,"pll2_q" ,0 ,G_GPU ),MGATE_MP1 (DAC12_K ,"dac12_k" ,"ck_lsi" ,0 ,G_DAC12 ), -COMPOSITE (ETHPTP_K ,"ethptp_k" , eth_src,CLK_OPS_PARENT_ENABLE , +COMPOSITE (ETHPTP_K ,"ethptp_k" , eth_src,CLK_OPS_PARENT_ENABLE | +CLK_SET_RATE_NO_REPARENT , _NO_GATE,_MMUX (M_ETHCK ), _DIV(RCC_ETHCKSELR, 4, 4, CLK_DIVIDER_ALLOW_ZERO, NULL)),
Greg Kroah-Hartman
maintainerPATCH 312/321 clk: stm32mp1: parent clocks update
In reply to Greg Kroah-HartmanFrom: Gabriel Fernandez <[email protected]>
commit 749c9e553e1f063eb132a78d80225532cbfedb80 upstream.
Fixes parent clock for axi, fdcan, sai and adc12 clocks.
--- drivers/clk/clk-stm32mp1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/clk/clk-stm32mp1.c +5 -5
@@ -121,7 +121,7 @@ static const char * const cpu_src[] = { };static const char *const axi_src[] = { -"ck_hsi" ,"ck_hse" ,"pll2_p" ,"pll3_p" +"ck_hsi" ,"ck_hse" ,"pll2_p" };static const char *const per_src[] = {
@@ -225,19 +225,19 @@ static const char * const usart6_src[] = };static const char *const fdcan_src[] = { -"ck_hse" ,"pll3_q" ,"pll4_q" +"ck_hse" ,"pll3_q" ,"pll4_q" ,"pll4_r" };static const char *const sai_src[] = { -"pll4_q" ,"pll3_q" ,"i2s_ckin" ,"ck_per" +"pll4_q" ,"pll3_q" ,"i2s_ckin" ,"ck_per" ,"pll3_r" };static const char *const sai2_src[] = { -"pll4_q" ,"pll3_q" ,"i2s_ckin" ,"ck_per" ,"spdif_ck_symb" +"pll4_q" ,"pll3_q" ,"i2s_ckin" ,"ck_per" ,"spdif_ck_symb" ,"pll3_r" };static const char *const adc12_src[] = { -"pll4_q" ,"ck_per" +"pll4_r" ,"ck_per" ,"pll3_q" };static const char *const dsi_src[] = {
Greg Kroah-Hartman
maintainerPATCH 313/321 mailbox: mailbox-test: fix null pointer if no mmio
In reply to Greg Kroah-HartmanFrom: Fabien Dessenne <[email protected]>
commit 6899b4f7c99c72968e58e502f96084f74f6e5e86 upstream.
Fix null pointer issue if resource_size is called with no ioresource.
--- drivers/mailbox/mailbox-test.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/mailbox/mailbox-test.c +8 -6
@@ -363,22 +363,24 @@ static int mbox_test_probe(struct platfo/* It's okay for MMIO to be NULL */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - size =resource_size (res); tdev->tx_mmio =devm_ioremap_resource (&pdev->dev, res); -if (PTR_ERR (tdev->tx_mmio) == -EBUSY ) +if (PTR_ERR (tdev->tx_mmio) == -EBUSY ) {/* if reserved area in SRAM, try just ioremap */ + size =resource_size (res); tdev->tx_mmio =devm_ioremap (&pdev->dev, res->start, size); -else if (IS_ERR (tdev->tx_mmio)) + }else if (IS_ERR (tdev->tx_mmio)) { tdev->tx_mmio =NULL ; + }/* If specified, second reg entry is Rx MMIO */ res =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); - size =resource_size (res); tdev->rx_mmio =devm_ioremap_resource (&pdev->dev, res); -if (PTR_ERR (tdev->rx_mmio) == -EBUSY ) +if (PTR_ERR (tdev->rx_mmio) == -EBUSY ) { + size =resource_size (res); tdev->rx_mmio =devm_ioremap (&pdev->dev, res->start, size); -else if (IS_ERR (tdev->rx_mmio)) + }else if (IS_ERR (tdev->rx_mmio)) { tdev->rx_mmio = tdev->tx_mmio; + } tdev->tx_channel =mbox_test_request_channel (pdev,"tx" ); tdev->rx_channel =mbox_test_request_channel (pdev,"rx" );
Greg Kroah-Hartman
maintainerPATCH 314/321 pinctrl: stm32: fix memory leak issue
In reply to Greg Kroah-HartmanFrom: Alexandre Torgue <[email protected]>
commit cd8c9b5a49576bf28990237715bc2cb2210ac80a upstream.
configs is allocated by pinconf_generic_parse_dt_config(), pinctrl_utils_add_map_configs() duplicates configs so it can and has to be freed to prevent memory leaks.
--- drivers/pinctrl/stm32/pinctrl-stm32.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/pinctrl/stm32/pinctrl-stm32.c +16 -10
@@ -410,7 +410,7 @@ static int stm32_pctrl_dt_subnode_to_mapunsigned int num_configs;bool has_config =0 ;unsigned reserve =0 ; -int num_pins, num_funcs, maps_per_pin, i, err; +int num_pins, num_funcs, maps_per_pin, i, err =0 ; pctl =pinctrl_dev_get_drvdata (pctldev);
@@ -437,41 +437,45 @@ static int stm32_pctrl_dt_subnode_to_mapif (has_config && num_pins >=1 ) maps_per_pin++; -if (!num_pins || !maps_per_pin) -return -EINVAL ; +if (!num_pins || !maps_per_pin) { + err = -EINVAL ; + goto exit; + } reserve = num_pins * maps_per_pin; err =pinctrl_utils_reserve_map (pctldev, map, reserved_maps, num_maps, reserve);if (err) -return err; + goto exit;for (i =0 ; i < num_pins; i++) { err =of_property_read_u32_index (node,"pinmux" , i, &pinfunc);if (err) -return err; + goto exit; pin =STM32_GET_PIN_NO (pinfunc); func =STM32_GET_PIN_FUNC (pinfunc);if (!stm32_pctrl_is_function_valid (pctl, pin, func)) {dev_err (pctl->dev,"invalid function.\n" ); -return -EINVAL ; + err = -EINVAL ; + goto exit; } grp =stm32_pctrl_find_group_by_pin (pctl, pin);if (!grp) {dev_err (pctl->dev,"unable to match pin %d to group\n" , pin); -return -EINVAL ; + err = -EINVAL ; + goto exit; } err =stm32_pctrl_dt_node_to_map_func (pctl, pin, func, grp, map, reserved_maps, num_maps);if (err) -return err; + goto exit;if (has_config) { err = pinctrl_utils_add_map_configs(pctldev, map,
@@ -479,11 +483,13 @@ static int stm32_pctrl_dt_subnode_to_map configs, num_configs, PIN_MAP_TYPE_CONFIGS_GROUP);if (err) -return err; + goto exit; } } -return 0 ; +exit: +kfree (configs); +return err; } static int stm32_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
Greg Kroah-Hartman
maintainerPATCH 315/321 ASoC: stm32: i2s: fix dma configuration
In reply to Greg Kroah-HartmanFrom: Olivier Moysan <[email protected]>
commit 1ac2bd16448997d9ec01922423486e1e85535eda upstream.
DMA configuration is not balanced on start/stop. Move DMA configuration to trigger callback.
--- sound/soc/stm/stm32_i2s.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
sound/soc/stm/stm32_i2s.c +7 -7
@@ -488,7 +488,7 @@ static int stm32_i2s_configure(struct sn {struct stm32_i2s_data *i2s =snd_soc_dai_get_drvdata (cpu_dai);int format =params_width (params); -u32 cfgr, cfgr_mask, cfg1, cfg1_mask; +u32 cfgr, cfgr_mask, cfg1;unsigned int fthlv;int ret;
@@ -529,15 +529,11 @@ static int stm32_i2s_configure(struct snif (ret <0 )return ret; - cfg1 =I2S_CFG1_RXDMAEN |I2S_CFG1_TXDMAEN ; - cfg1_mask = cfg1; - fthlv =STM32_I2S_FIFO_SIZE *I2S_FIFO_TH_ONE_QUARTER /4 ; - cfg1 |=I2S_CFG1_FTHVL_SET (fthlv -1 ); - cfg1_mask |=I2S_CFG1_FTHVL_MASK ; + cfg1 =I2S_CFG1_FTHVL_SET (fthlv -1 );return regmap_update_bits (i2s->regmap,STM32_I2S_CFG1_REG , - cfg1_mask, cfg1); +I2S_CFG1_FTHVL_MASK , cfg1); } static int stm32_i2s_startup(struct snd_pcm_substream *substream,
@@ -589,6 +585,10 @@ static int stm32_i2s_trigger(struct snd_/* Enable i2s */ dev_dbg (cpu_dai->dev,"start I2S\n" ); + cfg1_mask =I2S_CFG1_RXDMAEN |I2S_CFG1_TXDMAEN ; +regmap_update_bits (i2s->regmap,STM32_I2S_CFG1_REG , + cfg1_mask, cfg1_mask); + ret =regmap_update_bits (i2s->regmap,STM32_I2S_CR1_REG ,I2S_CR1_SPE ,I2S_CR1_SPE );if (ret <0 ) {
Greg Kroah-Hartman
maintainerPATCH 298/321 mtd: rawnand: atmel: Fix spelling mistake in error message
In reply to Greg Kroah-HartmanFrom: Miquel Raynal <[email protected]>
commit e39bb786816453788836c367caefd72eceea380c upstream.
Wrong copy/paste from the previous block, the error message should refer to #size-cells instead of #address-cells.
--- drivers/mtd/nand/raw/atmel/nand-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/atmel/nand-controller.c +1 -1
@@ -1826,7 +1826,7 @@ static int atmel_nand_controller_add_nan ret =of_property_read_u32 (np,"#size-cells" , &val);if (ret) { -dev_err (dev,"missing #address-cells property\n" ); +dev_err (dev,"missing #size-cells property\n" );return ret; }
Greg Kroah-Hartman
maintainerPATCH 316/321 ASoC: stm32: i2s: fix 16 bit format support
In reply to Greg Kroah-HartmanFrom: Olivier Moysan <[email protected]>
commit 0c4c68d6fa1bae74d450e50823c24fcc3cd0b171 upstream.
I2S supports 16 bits data in 32 channel length. However the expected driver behavior, is to
set channel length to 16 bits when data format is 16 bits.
--- sound/soc/stm/stm32_i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/stm/stm32_i2s.c +1 -1
@@ -501,7 +501,7 @@ static int stm32_i2s_configure(struct snswitch (format) {case 16 : cfgr =I2S_CGFR_DATLEN_SET (I2S_I2SMOD_DATLEN_16 ); - cfgr_mask =I2S_CGFR_DATLEN_MASK ; + cfgr_mask =I2S_CGFR_DATLEN_MASK |I2S_CGFR_CHLEN ;break ;case 32 : cfgr = I2S_CGFR_DATLEN_SET(I2S_I2SMOD_DATLEN_32) |
Greg Kroah-Hartman
maintainerPATCH 317/321 ASoC: stm32: i2s: fix IRQ clearing
In reply to Greg Kroah-HartmanFrom: Olivier Moysan <[email protected]>
commit 8ba3c5215d69c09f5c39783ff3b78347769822ad upstream.
Because of regmap cache, interrupts may not be cleared as expected.
Declare IFCR register as write only and make writings to IFCR register unconditional.
--- sound/soc/stm/stm32_i2s.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
sound/soc/stm/stm32_i2s.c +6 -7
@@ -246,8 +246,8 @@ static irqreturn_t stm32_i2s_isr(int irqreturn IRQ_NONE ; } -regmap_update_bits (i2s->regmap,STM32_I2S_IFCR_REG , -I2S_IFCR_MASK , flags); +regmap_write_bits (i2s->regmap,STM32_I2S_IFCR_REG , +I2S_IFCR_MASK , flags);if (flags &I2S_SR_OVR ) {dev_dbg (&pdev->dev,"Overrun\n" );
@@ -276,7 +276,6 @@ static bool stm32_i2s_readable_reg(struccase STM32_I2S_CFG2_REG :case STM32_I2S_IER_REG :case STM32_I2S_SR_REG : -case STM32_I2S_IFCR_REG :case STM32_I2S_TXDR_REG :case STM32_I2S_RXDR_REG :case STM32_I2S_CGFR_REG :
@@ -547,8 +546,8 @@ static int stm32_i2s_startup(struct snd_ i2s->refcount++;spin_unlock (&i2s->lock_fd); -return regmap_update_bits (i2s->regmap,STM32_I2S_IFCR_REG , -I2S_IFCR_MASK ,I2S_IFCR_MASK ); +return regmap_write_bits (i2s->regmap,STM32_I2S_IFCR_REG , +I2S_IFCR_MASK ,I2S_IFCR_MASK ); } static int stm32_i2s_hw_params(struct snd_pcm_substream *substream,
@@ -603,8 +602,8 @@ static int stm32_i2s_trigger(struct snd_return ret; } -regmap_update_bits (i2s->regmap,STM32_I2S_IFCR_REG , -I2S_IFCR_MASK ,I2S_IFCR_MASK ); +regmap_write_bits (i2s->regmap,STM32_I2S_IFCR_REG , +I2S_IFCR_MASK ,I2S_IFCR_MASK );if (playback_flg) { ier =I2S_IER_UDRIE ;
Greg Kroah-Hartman
maintainerPATCH 318/321 ASoC: stm32: sai: add missing put_device()
In reply to Greg Kroah-HartmanFrom: Wen Yang <[email protected]>
commit 1c3816a194870e7a6622345dab7fb56c7d708613 upstream.
The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference.
--- sound/soc/stm/stm32_sai.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
sound/soc/stm/stm32_sai.c +8 -3
@@ -112,16 +112,21 @@ static int stm32_sai_set_sync(struct stmif (!sai_provider) {dev_err (&sai_client->pdev->dev,"SAI sync provider data not found\n" ); -return -EINVAL ; + ret = -EINVAL ; + goto out_put_dev; }/* Configure sync client */ ret =stm32_sai_sync_conf_client (sai_client, synci);if (ret <0 ) -return ret; + goto out_put_dev;/* Configure sync provider */ -return stm32_sai_sync_conf_provider (sai_provider, synco); + ret =stm32_sai_sync_conf_provider (sai_provider, synco); + +out_put_dev: +put_device (&pdev->dev); +return ret; }static int stm32_sai_probe (struct platform_device *pdev)
Greg Kroah-Hartman
maintainerPATCH 321/321 platform/x86: hp-wmi: Fix ACPI errors caused by passing 0 as input size
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit f3e4f3fc8ee9729c4b1b27a478c68b713df53c0c upstream.
The AML code implementing the WMI methods creates a variable length field to hold the input data we pass like this:
CreateDWordField (Arg1, 0x0C, DSZI)
Local5 = DSZI /* \HWMC.DSZI */
CreateField (Arg1, 0x80, (Local5 * 0x08), DAIN)If we pass 0 as bios_args.datasize argument then (Local5 * 0x08) is 0 which results in these errors:
[ 71.973305] ACPI BIOS Error (bug): Attempt to CreateField of length zero (20190816/dsopcode-133) [ 71.973332] ACPI Error: Aborting method \HWMC due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529) [ 71.973413] ACPI Error: Aborting method \_SB.WMID.WMAA due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529)
And in our HPWMI_WIRELESS2_QUERY calls always failing. for read commands like HPWMI_WIRELESS2_QUERY the DSZI value is not used / checked, except for read commands where extra input is needed to specify exactly what to read.
So for HPWMI_WIRELESS2_QUERY we can safely pass the size of the expected output as insize to hp_wmi_perform_query(), as we are already doing for all other HPWMI_READ commands we send. Doing so fixes these errors.
--- drivers/platform/x86/hp-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/hp-wmi.c +2 -2
@@ -393,7 +393,7 @@ static int hp_wmi_rfkill2_refresh(void)int err, i; err =hp_wmi_perform_query (HPWMI_WIRELESS2_QUERY ,HPWMI_READ , &state, -0 ,sizeof (state)); +sizeof (state),sizeof (state));if (err)return err;
@@ -790,7 +790,7 @@ static int __init hp_wmi_rfkill2_setup(sint err, i; err =hp_wmi_perform_query (HPWMI_WIRELESS2_QUERY ,HPWMI_READ , &state, -0 ,sizeof (state)); +sizeof (state),sizeof (state));if (err)return err <0 ? err : -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 299/321 mtd: rawnand: atmel: fix possible object reference leak
In reply to Greg Kroah-HartmanFrom: Wen Yang <[email protected]>
commit a12085d13997ed15f745f33a0e01002541160179 upstream.
of_find_device_by_node() takes a reference to the struct device when it finds a match via get_device, there is no need to call get_device() twice.
We also should make sure to drop the reference to the device taken by of_find_device_by_node() on driver unbind.
--- drivers/mtd/nand/raw/atmel/pmecc.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
drivers/mtd/nand/raw/atmel/pmecc.c +15 -6
@@ -876,23 +876,32 @@ static struct atmel_pmecc *atmel_pmecc_g {struct platform_device *pdev;struct atmel_pmecc *pmecc, **ptr; +int ret; pdev =of_find_device_by_node (np); -if (!pdev || !platform_get_drvdata (pdev)) +if (!pdev)return ERR_PTR (-EPROBE_DEFER ); + pmecc =platform_get_drvdata (pdev); +if (!pmecc) { + ret = -EPROBE_DEFER ; + goto err_put_device; + } ptr =devres_alloc (devm_atmel_pmecc_put,sizeof (*ptr),GFP_KERNEL ); -if (!ptr) -return ERR_PTR (-ENOMEM ); - -get_device (&pdev->dev); - pmecc =platform_get_drvdata (pdev); +if (!ptr) { + ret = -ENOMEM ; + goto err_put_device; + } *ptr = pmecc;devres_add (userdev, ptr);return pmecc; + +err_put_device: +put_device (&pdev->dev); +return ERR_PTR (ret); }static const int atmel_pmecc_strengths[] = {2 ,4 ,8 ,12 ,24 ,32 };
Greg Kroah-Hartman
maintainerPATCH 300/321 mtd: spi-nor: cast to u64 to avoid uint overflows
In reply to Greg Kroah-HartmanFrom: huijin.park <[email protected]>
commit 84a1c2109d23df3543d96231c4fee1757299bb1a upstream.
The "params->size" is defined as "u64".
And "info->sector_size" and "info->n_sectors" are defined as unsigned int and u16.
Thus, u64 data might have strange data(loss data) if the result overflows an unsigned int.
This patch casts "info->sector_size" to an u64.
--- drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/spi-nor.c +1 -1
@@ -2459,7 +2459,7 @@ static int spi_nor_init_params(struct spmemset (params,0 ,sizeof (*params));/* Set SPI NOR sizes. */ - params->size = info->sector_size * info->n_sectors; + params->size = (u64 )info->sector_size * info->n_sectors; params->page_size = info->page_size;/* (Fast) Read settings. */
Greg Kroah-Hartman
maintainerPATCH 302/321 mailbox: stm32_ipcc: add spinlock to fix channels concurrent access
In reply to Greg Kroah-HartmanFrom: Arnaud Pouliquen <[email protected]>
commit dba9a3dfe912dc47c9dbc9ba1f5f65adbf9aea0f upstream.
Add spinlock protection on IPCC register update to avoid race condition. Without this fix, stm32_ipcc_set_bits and stm32_ipcc_clr_bits can be called in parallel for different channels. This results in register corruptions.
--- drivers/mailbox/stm32-ipcc.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)
drivers/mailbox/stm32-ipcc.c +27 -10
@@ -50,6 +50,7 @@ struct stm32_ipcc {void __iomem *reg_base;void __iomem *reg_proc;struct clk *clk; +spinlock_t lock;/* protect access to IPCC registers */ int irqs[IPCC_IRQ_NUM ];int wkp;u32 proc_id;
@@ -58,14 +59,24 @@ struct stm32_ipcc {u32 xmr; }; -static inline void stm32_ipcc_set_bits (void __iomem *reg,u32 mask) +static inline void stm32_ipcc_set_bits (spinlock_t *lock,void __iomem *reg, +u32 mask) { +unsigned long flags; + +spin_lock_irqsave (lock, flags);writel_relaxed (readl_relaxed (reg) | mask, reg); +spin_unlock_irqrestore (lock, flags); } -static inline void stm32_ipcc_clr_bits (void __iomem *reg,u32 mask) +static inline void stm32_ipcc_clr_bits (spinlock_t *lock,void __iomem *reg, +u32 mask) { +unsigned long flags; + +spin_lock_irqsave (lock, flags);writel_relaxed (readl_relaxed (reg) & ~mask, reg); +spin_unlock_irqrestore (lock, flags); }static irqreturn_t stm32_ipcc_rx_irq (int irq,void *data)
@@ -92,7 +103,7 @@ static irqreturn_t stm32_ipcc_rx_irq(intmbox_chan_received_data (&ipcc->controller.chans[chan],NULL ); -stm32_ipcc_set_bits (ipcc->reg_proc +IPCC_XSCR , +stm32_ipcc_set_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XSCR ,RX_BIT_CHAN (chan)); ret =IRQ_HANDLED ;
@@ -121,7 +132,7 @@ static irqreturn_t stm32_ipcc_tx_irq(intdev_dbg (dev,"%s: chan:%d tx\n" , __func__, chan);/* mask 'tx channel free' interrupt */ -stm32_ipcc_set_bits (ipcc->reg_proc +IPCC_XMR , +stm32_ipcc_set_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XMR ,TX_BIT_CHAN (chan));mbox_chan_txdone (&ipcc->controller.chans[chan],0 );
@@ -141,10 +152,12 @@ static int stm32_ipcc_send_data(struct mdev_dbg (ipcc->controller.dev,"%s: chan:%d\n" , __func__, chan);/* set channel n occupied */ -stm32_ipcc_set_bits (ipcc->reg_proc +IPCC_XSCR ,TX_BIT_CHAN (chan)); +stm32_ipcc_set_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XSCR , +TX_BIT_CHAN (chan));/* unmask 'tx channel free' interrupt */ -stm32_ipcc_clr_bits (ipcc->reg_proc +IPCC_XMR ,TX_BIT_CHAN (chan)); +stm32_ipcc_clr_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XMR , +TX_BIT_CHAN (chan));return 0 ; }
@@ -163,7 +176,8 @@ static int stm32_ipcc_startup(struct mbo }/* unmask 'rx channel occupied' interrupt */ -stm32_ipcc_clr_bits (ipcc->reg_proc +IPCC_XMR ,RX_BIT_CHAN (chan)); +stm32_ipcc_clr_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XMR , +RX_BIT_CHAN (chan));return 0 ; }
@@ -175,7 +189,7 @@ static void stm32_ipcc_shutdown(struct m controller);/* mask rx/tx interrupt */ -stm32_ipcc_set_bits (ipcc->reg_proc +IPCC_XMR , +stm32_ipcc_set_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XMR ,RX_BIT_CHAN (chan) |TX_BIT_CHAN (chan));clk_disable_unprepare (ipcc->clk);
@@ -208,6 +222,8 @@ static int stm32_ipcc_probe(struct platfif (!ipcc)return -ENOMEM ; +spin_lock_init (&ipcc->lock); +/* proc_id */ if (of_property_read_u32 (np,"st,proc-id" , &ipcc->proc_id)) {dev_err (dev,"Missing st,proc-id\n" );
@@ -259,9 +275,10 @@ static int stm32_ipcc_probe(struct platf }/* mask and enable rx/tx irq */ -stm32_ipcc_set_bits (ipcc->reg_proc +IPCC_XMR , +stm32_ipcc_set_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XMR ,RX_BIT_MASK |TX_BIT_MASK ); -stm32_ipcc_set_bits (ipcc->reg_proc +IPCC_XCR ,XCR_RXOIE |XCR_TXOIE ); +stm32_ipcc_set_bits (&ipcc->lock, ipcc->reg_proc +IPCC_XCR , +XCR_RXOIE |XCR_TXOIE );/* wakeup */ if (of_property_read_bool (np,"wakeup-source" )) {
Greg Kroah-Hartman
maintainerPATCH 303/321 tcp: exit if nothing to retransmit on RTO timeout
In reply to Greg Kroah-HartmanFrom: Yuchung Cheng <[email protected]>
commit 88f8598d0a302a08380eadefd09b9f5cb1c4c428 upstream.
Previously TCP only warns if its RTO timer fires and the retransmission queue is empty, but it'll cause null pointer reference later on. It's better to avoid such catastrophic failure and simply exit with a warning.
--- net/ipv4/tcp_timer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
net/ipv4/tcp_timer.c +2 -4
@@ -443,10 +443,8 @@ void tcp_retransmit_timer(struct sock *s*/ return ; } -if (!tp->packets_out) - goto out; - -WARN_ON (tcp_rtx_queue_empty (sk)); +if (!tp->packets_out ||WARN_ON_ONCE (tcp_rtx_queue_empty (sk))) +return ; tp->tlp_high_seq =0 ;
Greg Kroah-Hartman
maintainerPATCH 304/321 HID: core: check whether Usage Page item is after Usage ID items
In reply to Greg Kroah-HartmanFrom: Candle Sun <[email protected]>
commit 1cb0d2aee26335d0bccf29100c7bed00ebece851 upstream.
Upstream commit 58e75155009c ("HID: core: move Usage Page concatenation to Main item") adds support for Usage Page item after Usage ID items (such as keyboards manufactured by Primax).
Usage Page concatenation in Main item works well for following report descriptor patterns:
USAGE_PAGE (Keyboard) 05 07
USAGE_MINIMUM (Keyboard LeftControl) 19 E0
USAGE_MAXIMUM (Keyboard Right GUI) 29 E7
LOGICAL_MINIMUM (0) 15 00
LOGICAL_MAXIMUM (1) 25 01
REPORT_SIZE (1) 75 01
REPORT_COUNT (8) 95 08
INPUT (Data,Var,Abs) 81 02-------------
USAGE_MINIMUM (Keyboard LeftControl) 19 E0
USAGE_MAXIMUM (Keyboard Right GUI) 29 E7
LOGICAL_MINIMUM (0) 15 00
LOGICAL_MAXIMUM (1) 25 01
REPORT_SIZE (1) 75 01
REPORT_COUNT (8) 95 08
USAGE_PAGE (Keyboard) 05 07
INPUT (Data,Var,Abs) 81 02But it makes the parser act wrong for the following report descriptor pattern(such as some Gamepads):
USAGE_PAGE (Button) 05 09
USAGE (Button 1) 09 01
USAGE (Button 2) 09 02
USAGE (Button 4) 09 04
USAGE (Button 5) 09 05
USAGE (Button 7) 09 07
USAGE (Button 8) 09 08
USAGE (Button 14) 09 0E
USAGE (Button 15) 09 0F
USAGE (Button 13) 09 0D
USAGE_PAGE (Consumer Devices) 05 0C
USAGE (Back) 0a 24 02
USAGE (HomePage) 0a 23 02
LOGICAL_MINIMUM (0) 15 00
LOGICAL_MAXIMUM (1) 25 01
REPORT_SIZE (1) 75 01
REPORT_COUNT (11) 95 0B
INPUT (Data,Var,Abs) 81 02With Usage Page concatenation in Main item, parser recognizes all the 11 Usages as consumer keys, it is not the HID device's real intention.
This patch checks whether Usage Page is really defined after Usage ID items by comparing usage page using status.
Usage Page concatenation on currently defined Usage Page will always do in local parsing when Usage ID items encountered.
When Main item is parsing, concatenation will do again with last defined Usage Page if this page has not been used in the previous usages concatenation.
--- drivers/hid/hid-core.c | 51 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-)
drivers/hid/hid-core.c +45 -6
@@ -212,6 +212,18 @@ static unsigned hid_lookup_collection(st }/* +* Concatenate usage which defines 16 bits or less with the +* currently defined usage page to form a 32 bit usage +*/ + +static void complete_usage (struct hid_parser *parser,unsigned int index) +{ + parser->local.usage[index] &=0xFFFF ; + parser->local.usage[index] |= + (parser->global.usage_page &0xFFFF ) <<16 ; +} + +/* * Add a usage to the temporary parser table. */
@@ -222,6 +234,14 @@ static int hid_add_usage(struct hid_parsreturn -1 ; } parser->local.usage[parser->local.usage_index] = usage; + +/* +* If Usage item only includes usage id, concatenate it with +* currently defined usage page +*/ +if (size <=2 ) +complete_usage (parser, parser->local.usage_index); + parser->local.usage_size[parser->local.usage_index] = size; parser->local.collection_index[parser->local.usage_index] = parser->collection_stack_ptr ?
@@ -542,13 +562,32 @@ static int hid_parser_local(struct hid_p* usage value." */ -static void hid_concatenate_usage_page (struct hid_parser *parser) +static void hid_concatenate_last_usage_page (struct hid_parser *parser) {int i; +unsigned int usage_page; +unsigned int current_page; + +if (!parser->local.usage_index) +return ; -for (i =0 ; i < parser->local.usage_index; i++) -if (parser->local.usage_size[i] <=2 ) - parser->local.usage[i] += parser->global.usage_page <<16 ; + usage_page = parser->global.usage_page; + +/* +* Concatenate usage page again only if last declared Usage Page +* has not been already used in previous usages concatenation +*/ +for (i = parser->local.usage_index -1 ; i >=0 ; i--) { +if (parser->local.usage_size[i] >2 ) +/* Ignore extended usages */ +continue ; + + current_page = parser->local.usage[i] >>16 ; +if (current_page == usage_page) +break ; + +complete_usage (parser, i); + } }/*
@@ -560,7 +599,7 @@ static int hid_parser_main(struct hid_pa__u32 data;int ret; -hid_concatenate_usage_page (parser); +hid_concatenate_last_usage_page (parser); data =item_udata (item);
@@ -771,7 +810,7 @@ static int hid_scan_main(struct hid_pars__u32 data;int i; -hid_concatenate_usage_page (parser); +hid_concatenate_last_usage_page (parser); data =item_udata (item);
Greg Kroah-Hartman
maintainerPATCH 296/321 net: macb: Fix SUBNS increment and increase resolution
In reply to Greg Kroah-HartmanFrom: Harini Katakam <[email protected]>
commit 7ad342bc58cc5197cd2f12a3c30b3949528c6d83 upstream.
The subns increment register has 24 bits as follows:
RegBit[15:0] = Subns[23:8]; RegBit[31:24] = Subns[7:0]
Fix the same in the driver and increase sub ns resolution to the best capable, 24 bits. This should be the case on all GEM versions that this PTP driver supports.
--- drivers/net/ethernet/cadence/macb.h | 6 +++++- drivers/net/ethernet/cadence/macb_ptp.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/net/ethernet/cadence/macb.h +5 -1
@@ -499,7 +499,11 @@/* Bitfields in TISUBN */ #define GEM_SUBNSINCR_OFFSET 0 -#define GEM_SUBNSINCR_SIZE 16 +#define GEM_SUBNSINCRL_OFFSET 24 +#define GEM_SUBNSINCRL_SIZE 8 +#define GEM_SUBNSINCRH_OFFSET 0 +#define GEM_SUBNSINCRH_SIZE 16 +#define GEM_SUBNSINCR_SIZE 24/* Bitfields in TI */ #define GEM_NSINCR_OFFSET 0
drivers/net/ethernet/cadence/macb_ptp.c +4 -1
@@ -115,7 +115,10 @@ static int gem_tsu_incr_set(struct macb* to take effect. */ spin_lock_irqsave (&bp->tsu_clk_lock, flags); -gem_writel (bp,TISUBN ,GEM_BF (SUBNSINCR , incr_spec->sub_ns)); +/* RegBit[15:0] = Subns[23:8]; RegBit[31:24] = Subns[7:0] */ +gem_writel (bp,TISUBN ,GEM_BF (SUBNSINCRL , incr_spec->sub_ns) | +GEM_BF (SUBNSINCRH , (incr_spec->sub_ns >> +GEM_SUBNSINCRL_SIZE )));gem_writel (bp,TI ,GEM_BF (NSINCR , incr_spec->ns));spin_unlock_irqrestore (&bp->tsu_clk_lock, flags);
Greg Kroah-Hartman
maintainerPATCH 305/321 crypto: stm32/hash - Fix hmac issue more than 256 bytes
In reply to Greg Kroah-HartmanFrom: Lionel Debieve <[email protected]>
commit 0acabecebc912b3ba06289e4ef40476acc499a37 upstream.
Correct condition for the second hmac loop. Key must be only set in the first loop. Initial condition was wrong, HMAC_KEY flag was not properly checked.
--- drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/stm32/stm32-hash.c +1 -1
@@ -365,7 +365,7 @@ static int stm32_hash_xmit_cpu(struct streturn -ETIMEDOUT ;if ((hdev->flags &HASH_FLAGS_HMAC ) && - (hdev->flags & ~HASH_FLAGS_HMAC_KEY )) { + (!(hdev->flags &HASH_FLAGS_HMAC_KEY ))) { hdev->flags |=HASH_FLAGS_HMAC_KEY ;stm32_hash_write_key (hdev);if (stm32_hash_wait_busy (hdev))
Greg Kroah-Hartman
maintainerPATCH 301/321 drm/atmel-hlcdc: revert shift by 8
In reply to Greg Kroah-HartmanFrom: Claudiu Beznea <[email protected]>
commit cbb32079149dbf557fa3f7bab8fa3c5fec857da7 upstream.
Revert shift by 8 of state->base.alpha. This introduced a regression on planes.
--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +1 -1
@@ -382,7 +382,7 @@ atmel_hlcdc_plane_update_general_setting cfg |=ATMEL_HLCDC_LAYER_LAEN ; else cfg |= ATMEL_HLCDC_LAYER_GAEN | - ATMEL_HLCDC_LAYER_GA(state->base.alpha >> 8); + ATMEL_HLCDC_LAYER_GA(state->base.alpha); }if (state->disc_h && state->disc_w)
Greg Kroah-Hartman
maintainerPATCH 319/321 dmaengine: stm32-dma: check whether length is aligned on FIFO threshold
In reply to Greg Kroah-HartmanFrom: Pierre-Yves MORDRET <[email protected]>
commit cc832dc8e32785a730ba07c3a357e17c201a5df8 upstream.
When a period length is not multiple of FIFO some data may be stuck within FIFO.
Burst/FIFO Threshold/Period or buffer length check has to be hardened
In any case DMA will grant any request from client but will degraded any parameters whether awkward.
--- drivers/dma/stm32-dma.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)
drivers/dma/stm32-dma.c +6 -14
@@ -308,20 +308,12 @@ static bool stm32_dma_fifo_threshold_is_static bool stm32_dma_is_burst_possible (u32 buf_len,u32 threshold) { -switch (threshold) { -case STM32_DMA_FIFO_THRESHOLD_FULL : -if (buf_len >=STM32_DMA_MAX_BURST ) -return true; -else -return false; -case STM32_DMA_FIFO_THRESHOLD_HALFFULL : -if (buf_len >=STM32_DMA_MAX_BURST /2 ) -return true; -else -return false; -default : -return false; - } +/* +* Buffer or period length has to be aligned on FIFO depth. +* Otherwise bytes may be stuck within FIFO at buffer or period +* length. +*/ +return ((buf_len % ((threshold +1 ) *4 )) ==0 ); } static u32 stm32_dma_get_best_burst(u32 buf_len, u32 max_burst, u32 threshold,
Greg Kroah-Hartman
maintainerPATCH 320/321 platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit 16245db1489cd9aa579506f64afeeeb13d825a93 upstream.
The HP WMI calls may take up to 128 bytes of data as input, and the AML methods implementing the WMI calls, declare a couple of fields for accessing input in different sizes, specifycally the HWMC method contains:
CreateField (Arg1, 0x80, 0x0400, D128)
Even though we do not use any of the WMI command-types which need a buffer of this size, the APCI interpreter still tries to create it as it is declared in generoc code at the top of the HWMC method which runs before the code looks at which command-type is requested.
This results in many of these errors on many different HP laptop models:
[ 14.459261] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20170303/dsopcode-236) [ 14.459268] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8edcc61507f8), AE_AML_BUFFER_LIMIT (20170303/psparse-543) [ 14.459279] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8edcc61523c0), AE_AML_BUFFER_LIMIT (20170303/psparse-543)
This commit increases the size of the data element of the bios_args struct to 128 bytes fixing these errors.
--- drivers/platform/x86/hp-wmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/hp-wmi.c +3 -3
@@ -78,7 +78,7 @@ struct bios_args {u32 command;u32 commandtype;u32 datasize; -u32 data; +u8 data[128 ]; };enum hp_wmi_commandtype {
@@ -229,7 +229,7 @@ static int hp_wmi_perform_query(int quer .command = command, .commandtype = query, .datasize = insize, - .data = 0, + .data = { 0 }, };struct acpi_buffer input = {sizeof (struct bios_args ), &args };struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER ,NULL };
@@ -241,7 +241,7 @@ static int hp_wmi_perform_query(int querif (WARN_ON (insize >sizeof (args.data)))return -EINVAL ; -memcpy (&args.data, buffer, insize); +memcpy (&args.data[0 ], buffer, insize);wmi_evaluate_method (HPWMI_BIOS_GUID ,0 , mid, &input, &output);
Greg Kroah-Hartman
maintainerPATCH 309/321 clk: stm32mp1: fix HSI divider flag
In reply to Greg Kroah-HartmanFrom: Gabriel Fernandez <[email protected]>
commit d3f2e33c875de5052e032a9eefa64c897a930ed1 upstream.
The divider of HSI (clk-hsi-div) is power of two divider.
--- drivers/clk/clk-stm32mp1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/clk-stm32mp1.c +2 -2
@@ -1655,8 +1655,8 @@ static const struct stm32_mux_cfg ker_mustatic const struct clock_config stm32mp1_clock_cfg[] = {/* Oscillator divider */ -DIV (NO_ID ,"clk-hsi-div" ,"clk-hsi" ,0 ,RCC_HSICFGR ,0 ,2 , -CLK_DIVIDER_READ_ONLY ), +DIV (NO_ID ,"clk-hsi-div" ,"clk-hsi" ,CLK_DIVIDER_POWER_OF_TWO , +RCC_HSICFGR ,0 ,2 ,CLK_DIVIDER_READ_ONLY ),/* External / Internal Oscillators */ GATE_MP1 (CK_HSE ,"ck_hse" ,"clk-hse" ,0 ,RCC_OCENSETR ,8 ,0 ),
Greg Kroah-Hartman
maintainerPATCH 307/321 media: stm32-dcmi: fix check of pm_runtime_get_sync return value
In reply to Greg Kroah-HartmanFrom: Hugues Fruchet <[email protected]>
commit ab41b99e7e55c85f29ff7b54718ccbbe051905e7 upstream.
Start streaming was sometimes failing because of pm_runtime_get_sync() non-0 return value. In fact return value was not an error but a positive value (1), indicating that PM was already enabled. Fix this by going to error path only with negative return value.
--- drivers/media/platform/stm32/stm32-dcmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/platform/stm32/stm32-dcmi.c +3 -3
@@ -584,9 +584,9 @@ static int dcmi_start_streaming(struct vint ret; ret =pm_runtime_get_sync (dcmi->dev); -if (ret) { -dev_err (dcmi->dev,"%s: Failed to start streaming, cannot get sync\n" , - __func__); +if (ret <0 ) { +dev_err (dcmi->dev,"%s: Failed to start streaming, cannot get sync (%d)\n" , + __func__, ret); goto err_release_buffers; }
Greg Kroah-Hartman
maintainerPATCH 260/321 powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
In reply to Greg Kroah-HartmanFrom: Gen Zhang <[email protected]>
[ Upstream commit efa9ace68e487ddd29c2b4d6dd23242158f1f607 ]
In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL.
--- arch/powerpc/platforms/pseries/dlpar.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/powerpc/platforms/pseries/dlpar.c +4 -0
@@ -63,6 +63,10 @@ static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa) name = (char *)ccwa +be32_to_cpu (ccwa->name_offset); prop->name =kstrdup (name,GFP_KERNEL ); +if (!prop->name) { +dlpar_free_cc_property (prop); +return NULL ; + } prop->length =be32_to_cpu (ccwa->prop_length); value = (char *)ccwa +be32_to_cpu (ccwa->prop_offset);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 293/321 net: macb: add missed tasklet_kill
In reply to Greg Kroah-HartmanFrom: Chuhong Yuan <[email protected]>
[ Upstream commit 61183b056b49e2937ff92a1424291ba36a6f6d05 ]
This driver forgets to kill tasklet in remove. Add the call to fix it.
--- drivers/net/ethernet/cadence/macb_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/cadence/macb_main.c +1 -0
@@ -4192,6 +4192,7 @@ static int macb_remove(struct platform_dmdiobus_free (bp->mii_bus);unregister_netdev (dev); +tasklet_kill (&bp->hresp_err_tasklet);clk_disable_unprepare (bp->tx_clk);clk_disable_unprepare (bp->hclk);clk_disable_unprepare (bp->pclk);
Greg Kroah-Hartman
maintainerPATCH 291/321 sctp: cache netns in sctp_ep_common
In reply to Greg Kroah-HartmanFrom: Xin Long <[email protected]>
[ Upstream commit 312434617cb16be5166316cf9d08ba760b1042a1 ]
This patch is to fix a data-race reported by syzbot:
BUG: KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj
write to 0xffff8880b67c0020 of 8 bytes by task 18908 on cpu 1:
sctp_assoc_migrate+0x1a6/0x290 net/sctp/associola.c:1091
sctp_sock_migrate+0x8aa/0x9b0 net/sctp/socket.c:9465
sctp_accept+0x3c8/0x470 net/sctp/socket.c:4916
inet_accept+0x7f/0x360 net/ipv4/af_inet.c:734
__sys_accept4+0x224/0x430 net/socket.c:1754
__do_sys_accept net/socket.c:1795 [inline]
__se_sys_accept net/socket.c:1792 [inline]
__x64_sys_accept+0x4e/0x60 net/socket.c:1792
do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffff8880b67c0020 of 8 bytes by task 12003 on cpu 0:
sctp_hash_obj+0x4f/0x2d0 net/sctp/input.c:894
rht_key_get_hash include/linux/rhashtable.h:133 [inline]
rht_key_hashfn include/linux/rhashtable.h:159 [inline]
rht_head_hashfn include/linux/rhashtable.h:174 [inline]
head_hashfn lib/rhashtable.c:41 [inline]
rhashtable_rehash_one lib/rhashtable.c:245 [inline]
rhashtable_rehash_chain lib/rhashtable.c:276 [inline]
rhashtable_rehash_table lib/rhashtable.c:316 [inline]
rht_deferred_worker+0x468/0xab0 lib/rhashtable.c:420
process_one_work+0x3d4/0x890 kernel/workqueue.c:2269
worker_thread+0xa0/0x800 kernel/workqueue.c:2415
kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352It was caused by rhashtable access asoc->base.sk when sctp_assoc_migrate is changing its value. However, what rhashtable wants is netns from asoc base.sk, and for an asoc, its netns won't change once set. So we can simply fix it by caching netns since created.
--- include/net/sctp/structs.h | 3 +++ net/sctp/associola.c | 1 + net/sctp/endpointola.c | 1 + net/sctp/input.c | 4 ++-- 4 files changed, 7 insertions(+), 2 deletions(-)
include/net/sctp/structs.h +3 -0
@@ -1247,6 +1247,9 @@ struct sctp_ep_common {/* What socket does this endpoint belong to? */ struct sock *sk; +/* Cache netns and it won't change once set */ +struct net *net; +/* This is where we receive inbound chunks. */ struct sctp_inq inqueue;
net/sctp/associola.c +1 -0
@@ -80,6 +80,7 @@ static struct sctp_association *sctp_ass/* Discarding const is appropriate here. */ asoc->ep = (struct sctp_endpoint *)ep; asoc->base.sk = (struct sock *)sk; + asoc->base.net =sock_net (sk);sctp_endpoint_hold (asoc->ep);sock_hold (asoc->base.sk);
net/sctp/endpointola.c +1 -0
@@ -165,6 +165,7 @@ static struct sctp_endpoint *sctp_endpoi/* Remember who we are attached to. */ ep->base.sk = sk; + ep->base.net =sock_net (sk);sock_hold (ep->base.sk);return ep;
net/sctp/input.c +2 -2
@@ -815,7 +815,7 @@ static inline int sctp_hash_cmp(struct rif (!sctp_transport_hold (t))return err; -if (!net_eq (sock_net (t->asoc->base.sk), x->net)) +if (!net_eq (t->asoc->base.net, x->net)) goto out;if (x->lport !=htons (t->asoc->base.bind_addr.port)) goto out;
@@ -830,7 +830,7 @@ static inline __u32 sctp_hash_obj(const {const struct sctp_transport *t = data;const union sctp_addr *paddr = &t->ipaddr; -const struct net *net =sock_net (t->asoc->base.sk); +const struct net *net = t->asoc->base.net;__be16 lport =htons (t->asoc->base.bind_addr.port);__u32 addr;
Greg Kroah-Hartman
maintainerPATCH 284/321 openvswitch: fix flow command message size
In reply to Greg Kroah-HartmanFrom: Paolo Abeni <[email protected]>
[ Upstream commit 4e81c0b3fa93d07653e2415fa71656b080a112fd ]
When user-space sets the OVS_UFID_F_OMIT_* flags, and the relevant flow has no UFID, we can exceed the computed size, as ovs_nla_put_identifier() will always dump an OVS_FLOW_ATTR_KEY attribute.
Take the above in account when computing the flow command message size.
--- net/openvswitch/datapath.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/openvswitch/datapath.c +5 -1
@@ -697,9 +697,13 @@ static size_t ovs_flow_cmd_msg_size(cons {size_t len =NLMSG_ALIGN (sizeof (struct ovs_header )); -/* OVS_FLOW_ATTR_UFID */ +/* OVS_FLOW_ATTR_UFID, or unmasked flow key as fallback +* see ovs_nla_put_identifier() +*/ if (sfid &&ovs_identifier_is_ufid (sfid)) len +=nla_total_size (sfid->ufid_len); +else + len +=nla_total_size (ovs_key_attr_size ());/* OVS_FLOW_ATTR_KEY */ if (!sfid ||should_fill_key (sfid, ufid_flags))
Greg Kroah-Hartman
maintainerPATCH 280/321 media: atmel: atmel-isc: fix asd memory allocation
In reply to Greg Kroah-HartmanFrom: Eugen Hristev <[email protected]>
commit 1e4e25c4959c10728fbfcc6a286f9503d32dfe02 upstream.
The subsystem will free the asd memory on notifier cleanup, if the asd is added to the notifier.
However the memory is freed using kfree.
Thus, we cannot allocate the asd using devm_*
This can lead to crashes and problems.
To test this issue, just return an error at probe, but cleanup the notifier beforehand.
--- drivers/media/platform/atmel/atmel-isc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/media/platform/atmel/atmel-isc.c +6 -2
@@ -2062,8 +2062,11 @@ static int isc_parse_dt(struct device *dbreak ; } - subdev_entity->asd =devm_kzalloc (dev, -sizeof (*subdev_entity->asd),GFP_KERNEL ); +/* asd will be freed by the subsystem once it's added to the +* notifier list +*/ + subdev_entity->asd =kzalloc (sizeof (*subdev_entity->asd), +GFP_KERNEL );if (!subdev_entity->asd) {of_node_put (rem); ret = -ENOMEM ;
@@ -2209,6 +2212,7 @@ static int atmel_isc_probe(struct platfo &subdev_entity->notifier);if (ret) {dev_err (dev,"fail to register async notifier\n" ); +kfree (subdev_entity->asd); goto cleanup_subdev; }
Greg Kroah-Hartman
maintainerPATCH 281/321 media: atmel: atmel-isc: fix INIT_WORK misplacement
In reply to Greg Kroah-HartmanFrom: Eugen Hristev <[email protected]>
commit 79199002db5c571e335131856b3ff057ffd9f3c0 upstream.
In case the completion function failes, unbind will be called which will call cancel_work for awb_work.
This will trigger a WARN message from the workqueue.
To avoid this, move the INIT_WORK call at the start of the completion function. This way the work is always initialized, which corresponds to the 'always canceled' unbind code.
--- drivers/media/platform/atmel/atmel-isc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/atmel/atmel-isc.c +2 -2
@@ -1895,6 +1895,8 @@ static int isc_async_complete(struct v4lstruct vb2_queue *q = &isc->vb2_vidq;int ret; +INIT_WORK (&isc->awb_work, isc_awb_work); + ret =v4l2_device_register_subdev_nodes (&isc->v4l2_dev);if (ret <0 ) {v4l2_err (&isc->v4l2_dev,"Failed to register subdev nodes\n" );
@@ -1948,8 +1950,6 @@ static int isc_async_complete(struct v4lreturn ret; } -INIT_WORK (&isc->awb_work, isc_awb_work); -/* Register video device */ strlcpy (vdev->name,ATMEL_ISC_NAME ,sizeof (vdev->name)); vdev->release = video_device_release_empty;
Greg Kroah-Hartman
maintainerPATCH 279/321 pwm: Clear chip_data in pwm_put()
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
commit e926b12c611c2095c7976e2ed31753ad6eb5ff1a upstream.
After a PWM is disposed by its user the per chip data becomes invalid. Clear the data in common code instead of the device drivers to get consistent behaviour. Before this patch only three of nine drivers cleaned up here.
--- drivers/pwm/core.c | 1 + drivers/pwm/pwm-berlin.c | 1 - drivers/pwm/pwm-pca9685.c | 1 - drivers/pwm/pwm-samsung.c | 1 - 4 files changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/core.c +1 -0
@@ -874,6 +874,7 @@ void pwm_put(struct pwm_device *pwm)if (pwm->chip->ops->free) pwm->chip->ops->free (pwm->chip, pwm); +pwm_set_chip_data (pwm,NULL ); pwm->label =NULL ;module_put (pwm->chip->ops->owner);
drivers/pwm/pwm-berlin.c +0 -1
@@ -84,7 +84,6 @@ static void berlin_pwm_free(struct pwm_c {struct berlin_pwm_channel *channel =pwm_get_chip_data (pwm); -pwm_set_chip_data (pwm,NULL );kfree (channel); }
drivers/pwm/pwm-pca9685.c +0 -1
@@ -176,7 +176,6 @@ static void pca9685_pwm_gpio_free(structpm_runtime_put (pca->chip.dev);mutex_lock (&pca->lock); pwm = &pca->chip.pwms[offset]; -pwm_set_chip_data (pwm,NULL );mutex_unlock (&pca->lock); }
drivers/pwm/pwm-samsung.c +0 -1
@@ -238,7 +238,6 @@ static int pwm_samsung_request(struct pwstatic void pwm_samsung_free (struct pwm_chip *chip,struct pwm_device *pwm) {devm_kfree (chip->dev,pwm_get_chip_data (pwm)); -pwm_set_chip_data (pwm,NULL ); }static int pwm_samsung_enable (struct pwm_chip *chip,struct pwm_device *pwm)
Greg Kroah-Hartman
maintainerPATCH 275/321 thunderbolt: Power cycle the router if NVM authentication fails
In reply to Greg Kroah-HartmanFrom: Mika Westerberg <[email protected]>
commit 7a7ebfa85f4fac349f3ab219538c44efe18b0cf6 upstream.
On zang's Dell XPS 13 9370 after Thunderbolt NVM firmware upgrade the Thunderbolt controller did not come back as expected. Only after the system was rebooted it became available again. It is not entirely clear what happened but I suspect the new NVM firmware image authentication failed for some reason. Regardless of this the router needs to be power cycled if NVM authentication fails in order to get it fully functional again.
This modifies the driver to issue a power cycle in case the NVM authentication fails immediately when dma_port_flash_update_auth() returns. We also need to call tb_switch_set_uuid() earlier to be able to fetch possible NVM authentication failure when DMA port is added.
--- drivers/thunderbolt/switch.c | 54 +++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 12 deletions(-)
drivers/thunderbolt/switch.c +42 -12
@@ -167,7 +167,7 @@ static int nvm_validate_and_write(structstatic int nvm_authenticate_host (struct tb_switch *sw) { -int ret; +int ret =0 ;/* * Root switch NVM upgrade requires that we disconnect the
@@ -175,6 +175,8 @@ static int nvm_authenticate_host(struct* already). */ if (!sw->safe_mode) { +u32 status; + ret =tb_domain_disconnect_all_paths (sw->tb);if (ret)return ret;
@@ -183,7 +185,16 @@ static int nvm_authenticate_host(struct* everything goes well so getting timeout is expected. */ ret =dma_port_flash_update_auth (sw->dma_port); -return ret == -ETIMEDOUT ?0 : ret; +if (!ret || ret == -ETIMEDOUT ) +return 0 ; + +/* +* Any error from update auth operation requires power +* cycling of the host router. +*/ +tb_sw_warn (sw,"failed to authenticate NVM, power cycling\n" ); +if (dma_port_flash_update_auth_status (sw->dma_port, &status) >0 ) +nvm_set_auth_status (sw, status); }/*
@@ -191,7 +202,7 @@ static int nvm_authenticate_host(struct* switch. */ dma_port_power_cycle (sw->dma_port); -return 0 ; +return ret; }static int nvm_authenticate_device (struct tb_switch *sw)
@@ -199,8 +210,16 @@ static int nvm_authenticate_device(strucint ret, retries =10 ; ret =dma_port_flash_update_auth (sw->dma_port); -if (ret && ret != -ETIMEDOUT ) +switch (ret) { +case 0 : +case -ETIMEDOUT : +case -EACCES : +case -EINVAL : +/* Power cycle is required */ +break ; +default :return ret; + }/* * Poll here for the authentication status. It takes some time
@@ -937,8 +956,6 @@ static ssize_t nvm_authenticate_store(st*/ nvm_authenticate_start (sw); ret =nvm_authenticate_host (sw); -if (ret) -nvm_authenticate_complete (sw); }else { ret =nvm_authenticate_device (sw); }
@@ -1332,13 +1349,16 @@ static int tb_switch_add_dma_port(structint ret;switch (sw->generation) { -case 3 : -break ; -case 2 :/* Only root switch can be upgraded */ if (tb_route (sw))return 0 ; + +/* fallthrough */ +case 3 : + ret =tb_switch_set_uuid (sw); +if (ret) +return ret;break ;default :
@@ -1359,6 +1379,19 @@ static int tb_switch_add_dma_port(structreturn 0 ;/* +* If there is status already set then authentication failed +* when the dma_port_flash_update_auth() returned. Power cycling +* is not needed (it was done already) so only thing we do here +* is to unblock runtime PM of the root port. +*/ +nvm_get_auth_status (sw, &status); +if (status) { +if (!tb_route (sw)) +nvm_authenticate_complete (sw); +return 0 ; + } + +/* * Check status of the previous flash authentication. If there * is one we need to power cycle the switch in any case to make * it functional again.
@@ -1373,9 +1406,6 @@ static int tb_switch_add_dma_port(structif (status) {tb_sw_info (sw,"switch flash authentication failed\n" ); - ret =tb_switch_set_uuid (sw); -if (ret) -return ret;nvm_set_auth_status (sw, status); }
Greg Kroah-Hartman
maintainerPATCH 273/321 mei: bus: prefix device names on bus with the bus name
In reply to Greg Kroah-HartmanFrom: Alexander Usyskin <[email protected]>
commit 7a2b9e6ec84588b0be65cc0ae45a65bac431496b upstream.
Add parent device name to the name of devices on bus to avoid device names collisions for same client UUID available from different MEI heads. Namely this prevents sysfs collision under /sys/bus/mei/device/
In the device part leave just UUID other parameters that are required for device matching are not required here and are just bloating the name.
--- drivers/misc/mei/bus.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/misc/mei/bus.c +5 -4
@@ -883,15 +883,16 @@ static const struct device_type mei_cl_d/** * mei_cl_bus_set_name - set device name for me client device +* <controller>-<client device> +* Example: 0000:00:16.0-55213584-9a29-4916-badf-0fb7ed682aeb * * @cldev: me client device */ static inline void mei_cl_bus_set_name (struct mei_cl_device *cldev) { -dev_set_name (&cldev->dev,"mei:%s:%pUl:%02X" , - cldev->name, -mei_me_cl_uuid (cldev->me_cl), -mei_me_cl_ver (cldev->me_cl)); +dev_set_name (&cldev->dev,"%s-%pUl" , +dev_name (cldev->bus->dev), +mei_me_cl_uuid (cldev->me_cl)); }/**
Greg Kroah-Hartman
maintainerPATCH 271/321 staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-ids
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit 3d5f1eedbfd22ceea94b39989d6021b1958181f4 upstream.
Add 024c:0525 to the list of SDIO device-ids, based on a patch found in the Android X86 kernels. According to that patch this device id is used on the Alcatel Plus 10 device.
--- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -0
@@ -17,6 +17,7 @@static const struct sdio_device_id sdio_ids[] = { {SDIO_DEVICE (0x024c ,0x0523 ), }, + {SDIO_DEVICE (0x024c ,0x0525 ), }, {SDIO_DEVICE (0x024c ,0x0623 ), }, {SDIO_DEVICE (0x024c ,0x0626 ), }, {SDIO_DEVICE (0x024c ,0xb723 ), },
Greg Kroah-Hartman
maintainerPATCH 268/321 usb: dwc2: use a longer core rest timeout in dwc2_core_reset()
In reply to Greg Kroah-HartmanFrom: Mathias Kresin <[email protected]>
commit 6689f0f4bb14e50917ba42eb9b41c25e0184970c upstream.
Testing on different generations of Lantiq MIPS SoC based boards, showed that it takes up to 1500 us until the core reset bit is cleared.
The driver from the vendor SDK (ifxhcd) uses a 1 second timeout. Use the same timeout to fix wrong hang detections and make the driver work for Lantiq MIPS SoCs.
At least till kernel 4.14 the hanging reset only caused a warning but the driver was probed successful. With kernel 4.19 errors out with EBUSY.
--- drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc2/core.c +1 -1
@@ -524,7 +524,7 @@ int dwc2_core_reset(struct dwc2_hsotg *h greset |=GRSTCTL_CSFTRST ;dwc2_writel (hsotg, greset,GRSTCTL ); -if (dwc2_hsotg_wait_bit_clear (hsotg,GRSTCTL ,GRSTCTL_CSFTRST ,50 )) { +if (dwc2_hsotg_wait_bit_clear (hsotg,GRSTCTL ,GRSTCTL_CSFTRST ,10000 )) {dev_warn (hsotg->dev,"%s: HANG! Soft Reset timeout GRSTCTL GRSTCTL_CSFTRST\n" , __func__);return -EBUSY ;
Greg Kroah-Hartman
maintainerPATCH 265/321 KVM: nVMX: assimilate nested_vmx_entry_failure() into nested_vmx_enter_non_root_mode()
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit a633e41e736279c6d3174f52deeb9b8b5fa85e13 upstream.
Handling all VMExits due to failed consistency checks on VMEnter in nested_vmx_enter_non_root_mode() consolidates all relevant code into a single location, and removing nested_vmx_entry_failure() eliminates a confusing function name and label. For a VMEntry, "fail" and its derivatives has a very specific meaning due to the different behavior of a VMEnter VMFail versus VMExit, i.e. it wasn't obvious that nested_vmx_entry_failure() handled VMExit scenarios.
--- arch/x86/kvm/vmx.c | 78 ++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 42 deletions(-)
arch/x86/kvm/vmx.c +36 -42
@@ -2065,9 +2065,6 @@ static inline bool is_nmi(u32 intr_info)static void nested_vmx_vmexit (struct kvm_vcpu *vcpu,u32 exit_reason,u32 exit_intr_info,unsigned long exit_qualification); -static void nested_vmx_entry_failure (struct kvm_vcpu *vcpu, -struct vmcs12 *vmcs12, -u32 reason,unsigned long qualification);static int __find_msr_index (struct vcpu_vmx *vmx,u32 msr) {
@@ -12676,26 +12673,29 @@ static int check_vmentry_postreqs(structreturn 0 ; } +static void load_vmcs12_host_state (struct kvm_vcpu *vcpu, +struct vmcs12 *vmcs12); +/* -* If exit_qual is NULL, this is being called from state restore (either RSM +* If from_vmentry is false, this is being called from state restore (either RSM * or KVM_SET_NESTED_STATE). Otherwise it's called from vmlaunch/vmresume. */ -static int nested_vmx_enter_non_root_mode (struct kvm_vcpu *vcpu,u32 *exit_qual) +static int nested_vmx_enter_non_root_mode (struct kvm_vcpu *vcpu, +bool from_vmentry) {struct vcpu_vmx *vmx =to_vmx (vcpu);struct vmcs12 *vmcs12 =get_vmcs12 (vcpu); -bool from_vmentry = !!exit_qual; -u32 dummy_exit_qual;bool evaluate_pending_interrupts; -int r =0 ; +u32 exit_reason =EXIT_REASON_INVALID_STATE ; +u32 exit_qual; evaluate_pending_interrupts =vmcs_read32 (CPU_BASED_VM_EXEC_CONTROL ) & (CPU_BASED_VIRTUAL_INTR_PENDING |CPU_BASED_VIRTUAL_NMI_PENDING );if (likely (!evaluate_pending_interrupts) &&kvm_vcpu_apicv_active (vcpu)) evaluate_pending_interrupts |=vmx_has_apicv_interrupt (vcpu); -if (from_vmentry &&check_vmentry_postreqs (vcpu, vmcs12, exit_qual)) -return EXIT_REASON_INVALID_STATE ; +if (from_vmentry &&check_vmentry_postreqs (vcpu, vmcs12, &exit_qual)) + goto vmentry_fail_vmexit;enter_guest_mode (vcpu);
@@ -12710,18 +12710,17 @@ static int nested_vmx_enter_non_root_modif (vmcs12->cpu_based_vm_exec_control &CPU_BASED_USE_TSC_OFFSETING ) vcpu->arch.tsc_offset += vmcs12->tsc_offset; - r =EXIT_REASON_INVALID_STATE ; -if (prepare_vmcs02 (vcpu, vmcs12, from_vmentry ? exit_qual : &dummy_exit_qual)) +if (prepare_vmcs02 (vcpu, vmcs12, &exit_qual)) goto fail;if (from_vmentry) {nested_get_vmcs12_pages (vcpu); - r =EXIT_REASON_MSR_LOAD_FAIL ; - *exit_qual =nested_vmx_load_msr (vcpu, - vmcs12->vm_entry_msr_load_addr, - vmcs12->vm_entry_msr_load_count); -if (*exit_qual) + exit_reason =EXIT_REASON_MSR_LOAD_FAIL ; + exit_qual =nested_vmx_load_msr (vcpu, + vmcs12->vm_entry_msr_load_addr, + vmcs12->vm_entry_msr_load_count); +if (exit_qual) goto fail; }else {/*
@@ -12759,12 +12758,28 @@ static int nested_vmx_enter_non_root_mod*/ return 0 ; +/* +* A failed consistency check that leads to a VMExit during L1's +* VMEnter to L2 is a variation of a normal VMexit, as explained in +* 26.7 "VM-entry failures during or after loading guest state". +*/ fail:if (vmcs12->cpu_based_vm_exec_control &CPU_BASED_USE_TSC_OFFSETING ) vcpu->arch.tsc_offset -= vmcs12->tsc_offset;leave_guest_mode (vcpu);vmx_switch_vmcs (vcpu, &vmx->vmcs01); -return r; + +if (!from_vmentry) +return 1 ; + +vmentry_fail_vmexit: +load_vmcs12_host_state (vcpu, vmcs12); + vmcs12->vm_exit_reason = exit_reason |VMX_EXIT_REASONS_FAILED_VMENTRY ; + vmcs12->exit_qualification = exit_qual; +nested_vmx_succeed (vcpu); +if (enable_shadow_vmcs) + vmx->nested.sync_shadow_vmcs = true; +return 1 ; }/*
@@ -12776,7 +12791,6 @@ static int nested_vmx_run(struct kvm_vcpstruct vmcs12 *vmcs12;struct vcpu_vmx *vmx =to_vmx (vcpu);u32 interrupt_shadow =vmx_get_interrupt_shadow (vcpu); -u32 exit_qual;int ret;if (!nested_vmx_check_permission (vcpu))
@@ -12845,9 +12859,8 @@ static int nested_vmx_run(struct kvm_vcp*/ vmx->nested.nested_run_pending =1 ; - ret =nested_vmx_enter_non_root_mode (vcpu, &exit_qual); + ret =nested_vmx_enter_non_root_mode (vcpu, true);if (ret) { -nested_vmx_entry_failure (vcpu, vmcs12, ret, exit_qual); vmx->nested.nested_run_pending =0 ;return 1 ; }
@@ -13647,25 +13660,6 @@ static void vmx_leave_nested(struct kvm_free_nested (to_vmx (vcpu)); } -/* -* L1's failure to enter L2 is a subset of a normal exit, as explained in -* 23.7 "VM-entry failures during or after loading guest state" (this also -* lists the acceptable exit-reason and exit-qualification parameters). -* It should only be called before L2 actually succeeded to run, and when -* vmcs01 is current (it doesn't leave_guest_mode() or switch vmcss). -*/ -static void nested_vmx_entry_failure (struct kvm_vcpu *vcpu, -struct vmcs12 *vmcs12, -u32 reason,unsigned long qualification) -{ -load_vmcs12_host_state (vcpu, vmcs12); - vmcs12->vm_exit_reason = reason |VMX_EXIT_REASONS_FAILED_VMENTRY ; - vmcs12->exit_qualification = qualification; -nested_vmx_succeed (vcpu); -if (enable_shadow_vmcs) -to_vmx (vcpu)->nested.sync_shadow_vmcs = true; -} -static int vmx_check_intercept (struct kvm_vcpu *vcpu,struct x86_instruction_info *info,enum x86_intercept_stage stage)
@@ -14089,7 +14083,7 @@ static int vmx_pre_leave_smm(struct kvm_if (vmx->nested.smm.guest_mode) { vcpu->arch.hflags &= ~HF_SMM_MASK ; - ret =nested_vmx_enter_non_root_mode (vcpu,NULL ); + ret =nested_vmx_enter_non_root_mode (vcpu, false); vcpu->arch.hflags |=HF_SMM_MASK ;if (ret)return ret;
@@ -14300,7 +14294,7 @@ static int vmx_set_nested_state(struct kreturn -EINVAL ; vmx->nested.dirty_vmcs12 = true; - ret =nested_vmx_enter_non_root_mode (vcpu,NULL ); + ret =nested_vmx_enter_non_root_mode (vcpu, false);if (ret)return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 211/321 drivers/base/platform.c: kmemleak ignore a known leak
In reply to Greg Kroah-HartmanFrom: Qian Cai <[email protected]>
[ Upstream commit 967d3010df8b6f6f9aa95c198edc5fe3646ebf36 ]
unreferenced object 0xffff808ec6dc5a80 (size 128):
comm "swapper/0", pid 1, jiffies 4294938063 (age 2560.530s) hex dump (first 32 bytes):
ff ff ff ff 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b ........kkkkkkkk 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
backtrace:
[<00000000476dcf8c>] kmem_cache_alloc_trace+0x430/0x500
[<000000004f708d37>] platform_device_register_full+0xbc/0x1e8
[<000000006c2a7ec7>] acpi_create_platform_device+0x370/0x450
[<00000000ef135642>] acpi_default_enumeration+0x34/0x78
[<000000003bd9a052>] acpi_bus_attach+0x2dc/0x3e0
[<000000003cf4f7f2>] acpi_bus_attach+0x108/0x3e0
[<000000003cf4f7f2>] acpi_bus_attach+0x108/0x3e0
[<000000002968643e>] acpi_bus_scan+0xb0/0x110
[<0000000010dd0bd7>] acpi_scan_init+0x1a8/0x410
[<00000000965b3c5a>] acpi_init+0x408/0x49c
[<00000000ed4b9fe2>] do_one_initcall+0x178/0x7f4
[<00000000a5ac5a74>] kernel_init_freeable+0x9d4/0xa9c
[<0000000070ea6c15>] kernel_init+0x18/0x138
[<00000000fb8fff06>] ret_from_fork+0x10/0x1c
[<0000000041273a0d>] 0xffffffffffffffffThen, faddr2line pointed out this line,
/*
* This memory isn't freed when the device is put,
* I don't have a nice idea for that though. Conceptually
* dma_mask in struct device should not be a pointer.
* See http://thread.gmane.org/gmane.linux.kernel.pci/9081
*/pdev->dev.dma_mask =
kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL);
Since this leak has existed for more than 8 years and it does not reference other parts of the memory, let kmemleak ignore it, so users don't need to waste time reporting this in the future.
--- drivers/base/platform.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/base/platform.c +3 -0
@@ -26,6 +26,7 @@#include <linux/clk/clk-conf.h> #include <linux/limits.h> #include <linux/property.h> +#include <linux/kmemleak.h> #include "base.h" #include "power/power.h"
@@ -525,6 +526,8 @@ struct platform_device *platform_device_register_full(if (!pdev->dev.dma_mask) goto err; +kmemleak_ignore (pdev->dev.dma_mask); + *pdev->dev.dma_mask = pdevinfo->dma_mask; pdev->dev.coherent_dma_mask = pdevinfo->dma_mask; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 251/321 ACPI / APEI: Dont wait to serialise with oops messages when panic()ing
In reply to Greg Kroah-HartmanFrom: James Morse <[email protected]>
[ Upstream commit 78b0b690f6558ed788dccafa45965325dd11ba89 ]
oops_begin() exists to group printk() messages with the oops message printed by die(). To reach this caller we know that platform firmware took this error first, then notified the OS via NMI with a 'panic' severity.
Don't wait for another CPU to release the die-lock before panic()ing, our only goal is to print this fatal error and panic().
This code is always called in_nmi(), and since commit 42a0bb3f7138 ("printk/nmi: generic solution for safe printk in NMI"), it has been safe to call printk() from this context. Messages are batched in a per-cpu buffer and printed via irq-work, or a call back from panic().
--- drivers/acpi/apei/ghes.c | 2 -- 1 file changed, 2 deletions(-)
drivers/acpi/apei/ghes.c +0 -2
@@ -33,7 +33,6 @@#include <linux/interrupt.h> #include <linux/timer.h> #include <linux/cper.h> -#include <linux/kdebug.h> #include <linux/platform_device.h> #include <linux/mutex.h> #include <linux/ratelimit.h>
@@ -949,7 +948,6 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) sev =ghes_severity (ghes->estatus->error_severity);if (sev >=GHES_SEV_PANIC ) { -oops_begin ();ghes_print_queued_estatus ();__ghes_panic (ghes); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 248/321 iommu/amd: Fix NULL dereference bug in match_hid_uid
In reply to Greg Kroah-HartmanFrom: Aaron Ma <[email protected]>
[ Upstream commit bb6bccba390c7d743c1e4427de4ef284c8cc6869 ]
Add a non-NULL check to fix potential NULL pointer dereference Cleanup code to call function once.
--- drivers/iommu/amd_iommu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/iommu/amd_iommu.c +6 -2
@@ -139,10 +139,14 @@ static struct lock_class_key reserved_rbtree_key;static inline int match_hid_uid (struct device *dev,struct acpihid_map_entry *entry) { +struct acpi_device *adev =ACPI_COMPANION (dev);const char *hid, *uid; - hid =acpi_device_hid (ACPI_COMPANION (dev)); - uid =acpi_device_uid (ACPI_COMPANION (dev)); +if (!adev) +return -ENODEV ; + + hid =acpi_device_hid (adev); + uid =acpi_device_uid (adev);if (!hid || !(*hid))return -ENODEV ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 247/321 net: hns3: fix an issue for hns3_update_new_int_gl
In reply to Greg Kroah-HartmanFrom: Peng Li <[email protected]>
[ Upstream commit 6241e71e7207102ffc733991f7a00f74098d7da0 ]
HNS3 supports setting rx-usecs|tx-usecs as 0, but it will not update dynamically when adaptive-tx or adaptive-rx is enable. This patch removes the Redundant check.
--- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +1 -1
@@ -2366,7 +2366,7 @@ static bool hns3_get_new_int_gl(struct hns3_enet_ring_group *ring_group)u32 time_passed_ms;u16 new_int_gl; -if (!ring_group->coal.int_gl || !tqp_vector->last_jiffies) +if (!tqp_vector->last_jiffies)return false;if (ring_group->total_packets ==0 ) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 243/321 bpf: drop refcount if bpf_map_new_fd() fails in map_create()
In reply to Greg Kroah-HartmanFrom: Peng Sun <[email protected]>
[ Upstream commit 352d20d611414715353ee65fc206ee57ab1a6984 ]
In bpf/syscall.c, map_create() first set map->usercnt to 1, a file descriptor is supposed to return to userspace. When bpf_map_new_fd() fails, drop the refcount.
--- kernel/bpf/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/bpf/syscall.c +2 -2
@@ -559,12 +559,12 @@ static int map_create(union bpf_attr *attr) err =bpf_map_new_fd (map, f_flags);if (err <0 ) {/* failed to allocate fd. -* bpf_map_put() is needed because the above +* bpf_map_put_with_uref() is needed because the above * bpf_map_alloc_id() has published the map * to the userspace and the userspace may * have refcnt-ed it through BPF_MAP_GET_FD_BY_ID. */ -bpf_map_put (map); +bpf_map_put_with_uref (map);return err; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 240/321 mmc: core: align max segment size with logical block size
In reply to Greg Kroah-HartmanFrom: Ming Lei <[email protected]>
[ Upstream commit c53336c8f5f29043fded57912cc06c24e12613d7 ]
Logical block size is the lowest possible block size that the storage device can address. Max segment size is often related with controller's DMA capability. And it is reasonable to align max segment size with logical block size.
SDHCI sets un-aligned max segment size, and causes ADMA error, so fix it by aligning max segment size with logical block size.
--- drivers/mmc/core/block.c | 6 ------ drivers/mmc/core/queue.c | 9 ++++++++- 2 files changed, 8 insertions(+), 7 deletions(-)
drivers/mmc/core/block.c +0 -6
@@ -2384,12 +2384,6 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,snprintf (md->disk->disk_name,sizeof (md->disk->disk_name),"mmcblk%u%s" , card->host->index, subname ? subname :"" ); -if (mmc_card_mmc (card)) -blk_queue_logical_block_size (md->queue.queue, - card->ext_csd.data_sector_size); -else -blk_queue_logical_block_size (md->queue.queue,512 ); -set_capacity (md->disk, size);if (mmc_host_cmd23 (card->host)) {
drivers/mmc/core/queue.c +8 -1
@@ -355,6 +355,7 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card) {struct mmc_host *host = card->host;u64 limit =BLK_BOUNCE_HIGH ; +unsigned block_size =512 ;if (mmc_dev (host)->dma_mask && *mmc_dev (host)->dma_mask) limit = (u64 )dma_max_pfn (mmc_dev (host)) <<PAGE_SHIFT ;
@@ -368,7 +369,13 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)blk_queue_max_hw_sectors (mq->queue,min (host->max_blk_count, host->max_req_size /512 ));blk_queue_max_segments (mq->queue, host->max_segs); -blk_queue_max_segment_size (mq->queue, host->max_seg_size); + +if (mmc_card_mmc (card)) + block_size = card->ext_csd.data_sector_size; + +blk_queue_logical_block_size (mq->queue, block_size); +blk_queue_max_segment_size (mq->queue, +round_down (host->max_seg_size, block_size));INIT_WORK (&mq->recovery_work, mmc_mq_recovery_handler);INIT_WORK (&mq->complete_work, mmc_blk_mq_complete_work);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 233/321 sfc: initialise found bitmap in efx_ef10_mtd_probe
In reply to Greg Kroah-HartmanFrom: Bert Kenward <[email protected]>
[ Upstream commit c65285428b6e7797f1bb063f33b0ae7e93397b7b ]
The bitmap of found partitions in efx_ef10_mtd_probe was not initialised, causing partitions to be suppressed based off whatever value was in the bitmap at the start.
--- drivers/net/ethernet/sfc/ef10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sfc/ef10.c +1 -1
@@ -6108,7 +6108,7 @@ static int efx_ef10_mtd_probe_partition(struct efx_nic *efx,static int efx_ef10_mtd_probe (struct efx_nic *efx) {MCDI_DECLARE_BUF (outbuf,MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX ); -DECLARE_BITMAP (found,EF10_NVRAM_PARTITION_COUNT ); + DECLARE_BITMAP(found, EF10_NVRAM_PARTITION_COUNT) = { 0 };struct efx_mcdi_mtd_partition *parts;size_t outlen, n_parts_total, i, n_parts;unsigned int type;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 230/321 net/smc: fix byte_order for rx_curs_confirmed
In reply to Greg Kroah-HartmanFrom: Ursula Braun <[email protected]>
[ Upstream commit ccc8ca9b90acb45a3309f922b2591b07b4e070ec ]
The recent change in the rx_curs_confirmed assignment disregards byte order, which causes problems on little endian architectures. This patch fixes it.
--- net/smc/smc_cdc.c | 4 +--- net/smc/smc_cdc.h | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-)
net/smc/smc_cdc.c +1 -3
@@ -106,9 +106,7 @@ int smc_cdc_msg_send(struct smc_connection *conn, conn->tx_cdc_seq++; conn->local_tx_ctrl.seqno = conn->tx_cdc_seq; -smc_host_msg_to_cdc ((struct smc_cdc_msg *)wr_buf, - &conn->local_tx_ctrl, conn); -smc_curs_copy (&cfed, &((struct smc_host_cdc_msg *)wr_buf)->cons, conn); +smc_host_msg_to_cdc ((struct smc_cdc_msg *)wr_buf, conn, &cfed); rc =smc_wr_tx_send (link, (struct smc_wr_tx_pend_priv *)pend);if (!rc)smc_curs_copy (&conn->rx_curs_confirmed, &cfed, conn);
net/smc/smc_cdc.h +10 -9
@@ -186,26 +186,27 @@ static inline int smc_curs_diff_large(unsigned int size,static inline void smc_host_cursor_to_cdc (union smc_cdc_cursor *peer,union smc_host_cursor *local, +union smc_host_cursor *save,struct smc_connection *conn) { -union smc_host_cursor temp; - -smc_curs_copy (&temp, local, conn); - peer->count =htonl (temp.count); - peer->wrap =htons (temp.wrap); +smc_curs_copy (save, local, conn); + peer->count =htonl (save->count); + peer->wrap =htons (save->wrap);/* peer->reserved = htons(0); must be ensured by caller */ }static inline void smc_host_msg_to_cdc (struct smc_cdc_msg *peer, -struct smc_host_cdc_msg *local, -struct smc_connection *conn) +struct smc_connection *conn, +union smc_host_cursor *save) { +struct smc_host_cdc_msg *local = &conn->local_tx_ctrl; + peer->common.type = local->common.type; peer->len = local->len; peer->seqno =htons (local->seqno); peer->token =htonl (local->token); -smc_host_cursor_to_cdc (&peer->prod, &local->prod, conn); -smc_host_cursor_to_cdc (&peer->cons, &local->cons, conn); +smc_host_cursor_to_cdc (&peer->prod, &local->prod, save, conn); +smc_host_cursor_to_cdc (&peer->cons, &local->cons, save, conn); peer->prod_flags = local->prod_flags; peer->conn_state_flags = local->conn_state_flags; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 226/321 mm/hotplug: invalid PFNs from pfn_to_online_page()
In reply to Greg Kroah-HartmanFrom: Qian Cai <[email protected]>
[ Upstream commit b13bc35193d9e7a8c050a24928ca5c9e7c9a009b ]
On an arm64 ThunderX2 server, the first kmemleak scan would crash [1] with CONFIG_DEBUG_VM_PGFLAGS=y due to page_to_nid() found a pfn that is not directly mapped (MEMBLOCK_NOMAP). Hence, the page->flags is uninitialized.
This is due to the commit 9f1eb38e0e11 ("mm, kmemleak: little optimization while scanning") starts to use pfn_to_online_page() instead of pfn_valid(). However, in the CONFIG_MEMORY_HOTPLUG=y case, pfn_to_online_page() does not call memblock_is_map_memory() while pfn_valid() does.
Historically, the commit 68709f45385a ("arm64: only consider memblocks with NOMAP cleared for linear mapping") causes pages marked as nomap being no long reassigned to the new zone in memmap_init_zone() by calling __init_single_page().
Since the commit 2d070eab2e82 ("mm: consider zone which is not fully populated to have holes") introduced pfn_to_online_page() and was designed to return a valid pfn only, but it is clearly broken on arm64.
Therefore, let pfn_to_online_page() call pfn_valid_within(), so it can handle nomap thanks to the commit f52bb98f5ade ("arm64: mm: always enable CONFIG_HOLES_IN_ZONE"), while it will be optimized away on architectures where have no HOLES_IN_ZONE.
[1]
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000006
Mem abort info:
ESR = 0x96000005
Exception class = DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000005
CM = 0, WnR = 0
Internal error: Oops: 96000005 [#1] SMP
CPU: 60 PID: 1408 Comm: kmemleak Not tainted 5.0.0-rc2+ #8
pstate: 60400009 (nZCv daif +PAN -UAO)
pc : page_mapping+0x24/0x144
lr : __dump_page+0x34/0x3dc
sp : ffff00003a5cfd10
x29: ffff00003a5cfd10 x28: 000000000000802f
x27: 0000000000000000 x26: 0000000000277d00
x25: ffff000010791f56 x24: ffff7fe000000000
x23: ffff000010772f8b x22: ffff00001125f670
x21: ffff000011311000 x20: ffff000010772f8b
x19: fffffffffffffffe x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: ffff802698b19600
x13: ffff802698b1a200 x12: ffff802698b16f00
x11: ffff802698b1a400 x10: 0000000000001400
x9 : 0000000000000001 x8 : ffff00001121a000
x7 : 0000000000000000 x6 : ffff0000102c53b8
x5 : 0000000000000000 x4 : 0000000000000003
x3 : 0000000000000100 x2 : 0000000000000000
x1 : ffff000010772f8b x0 : ffffffffffffffff
Process kmemleak (pid: 1408, stack limit = 0x(____ptrval____))
Call trace:
page_mapping+0x24/0x144
__dump_page+0x34/0x3dc
dump_page+0x28/0x4c
kmemleak_scan+0x4ac/0x680
kmemleak_scan_thread+0xb4/0xdc
kthread+0x12c/0x13c
ret_from_fork+0x10/0x18
Code: d503201f f9400660 36000040 d1000413 (f9400661)
---[ end trace 4d4bd7f573490c8e ]---
Kernel panic - not syncing: Fatal exception
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x002,20000c38
Memory Limit: none
---[ end Kernel panic - not syncing: Fatal exception ]------ include/linux/memory_hotplug.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
include/linux/memory_hotplug.h +10 -8
@@ -21,14 +21,16 @@ struct vmem_altmap;* walkers which rely on the fully initialized page->flags and others * should use this rather than pfn_valid && pfn_to_page */ -#define pfn_to_online_page (pfn) \ -({ \ - struct page *___page = NULL; \ - unsigned long ___nr = pfn_to_section_nr(pfn); \ - \ - if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr))\ - ___page = pfn_to_page(pfn); \ - ___page; \ +#define pfn_to_online_page (pfn) \ +({ \ + struct page *___page = NULL; \ + unsigned long ___pfn = pfn; \ + unsigned long ___nr = pfn_to_section_nr(___pfn); \ + \ + if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr) && \ + pfn_valid_within(___pfn)) \ + ___page = pfn_to_page(___pfn); \ + ___page; \ })/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 224/321 net/smc: prevent races between smc_lgr_terminate() and smc_conn_free()
In reply to Greg Kroah-HartmanFrom: Karsten Graul <[email protected]>
[ Upstream commit 77f838ace755d2f466536c44dac6c856f62cd901 ]
To prevent races between smc_lgr_terminate() and smc_conn_free() add an extra check of the lgr field before accessing it, and cancel a delayed free_work when a new smc connection is created.
This fixes the problem that free_work cleared the lgr variable but smc_lgr_terminate() or smc_conn_free() still access it in parallel.
--- net/smc/smc_core.c | 4 ++++ 1 file changed, 4 insertions(+)
net/smc/smc_core.c +4 -0
@@ -128,6 +128,8 @@ static void smc_lgr_unregister_conn(struct smc_connection *conn) {struct smc_link_group *lgr = conn->lgr; +if (!lgr) +return ;write_lock_bh (&lgr->conns_lock);if (conn->alert_token_local) {__smc_lgr_unregister_conn (conn);
@@ -612,6 +614,8 @@ int smc_conn_create(struct smc_sock *smc, bool is_smcd, int srv_first_contact, local_contact =SMC_REUSE_CONTACT ; conn->lgr = lgr;smc_lgr_register_conn (conn);/* add smc conn to lgr */ +if (delayed_work_pending (&lgr->free_work)) +cancel_delayed_work (&lgr->free_work);write_unlock_bh (&lgr->conns_lock);break ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 221/321 sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe
In reply to Greg Kroah-HartmanFrom: Edward Cree <[email protected]>
[ Upstream commit 3366463513f544c12c6b88c13da4462ee9e7a1a1 ]
Use a bitmap to keep track of which partition types we've already seen;
for duplicates, return -EEXIST from efx_ef10_mtd_probe_partition() and thus skip adding that partition.
Duplicate partitions occur because of the A/B backup scheme used by newer
sfc NICs. Prior to this patch they cause sysfs_warn_dup errors because they have the same name, causing us not to expose any MTDs at all.
--- drivers/net/ethernet/sfc/ef10.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-)
drivers/net/ethernet/sfc/ef10.c +21 -8
@@ -6042,22 +6042,25 @@ static const struct efx_ef10_nvram_type_info efx_ef10_nvram_types[] = { { NVRAM_PARTITION_TYPE_LICENSE, 0, 0, "sfc_license" }, { NVRAM_PARTITION_TYPE_PHY_MIN, 0xff, 0, "sfc_phy_fw" }, }; +#define EF10_NVRAM_PARTITION_COUNT ARRAY_SIZE(efx_ef10_nvram_types)static int efx_ef10_mtd_probe_partition (struct efx_nic *efx,struct efx_mcdi_mtd_partition *part, -unsigned int type) +unsigned int type, +unsigned long *found) {MCDI_DECLARE_BUF (inbuf,MC_CMD_NVRAM_METADATA_IN_LEN );MCDI_DECLARE_BUF (outbuf,MC_CMD_NVRAM_METADATA_OUT_LENMAX );const struct efx_ef10_nvram_type_info *info;size_t size, erase_size, outlen; +int type_idx =0 ;bool protected;int rc; -for (info = efx_ef10_nvram_types; ; info++) { -if (info == - efx_ef10_nvram_types +ARRAY_SIZE (efx_ef10_nvram_types)) +for (type_idx =0 ; ; type_idx++) { +if (type_idx ==EF10_NVRAM_PARTITION_COUNT )return -ENODEV ; + info = efx_ef10_nvram_types + type_idx;if ((type & ~info->type_mask) == info->type)break ; }
@@ -6070,6 +6073,13 @@ static int efx_ef10_mtd_probe_partition(struct efx_nic *efx,if (protected)return -ENODEV ;/* hide it */ +/* If we've already exposed a partition of this type, hide this +* duplicate. All operations on MTDs are keyed by the type anyway, +* so we can't act on the duplicate. +*/ +if (__test_and_set_bit (type_idx, found)) +return -EEXIST ; + part->nvram_type = type;MCDI_SET_DWORD (inbuf,NVRAM_METADATA_IN_TYPE , type);
@@ -6098,6 +6108,7 @@ static int efx_ef10_mtd_probe_partition(struct efx_nic *efx,static int efx_ef10_mtd_probe (struct efx_nic *efx) {MCDI_DECLARE_BUF (outbuf,MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX ); +DECLARE_BITMAP (found,EF10_NVRAM_PARTITION_COUNT );struct efx_mcdi_mtd_partition *parts;size_t outlen, n_parts_total, i, n_parts;unsigned int type;
@@ -6126,11 +6137,13 @@ static int efx_ef10_mtd_probe(struct efx_nic *efx)for (i =0 ; i < n_parts_total; i++) { type =MCDI_ARRAY_DWORD (outbuf,NVRAM_PARTITIONS_OUT_TYPE_ID , i); - rc =efx_ef10_mtd_probe_partition (efx, &parts[n_parts], type); -if (rc ==0 ) - n_parts++; -else if (rc != -ENODEV ) + rc =efx_ef10_mtd_probe_partition (efx, &parts[n_parts], type, + found); +if (rc == -EEXIST || rc == -ENODEV ) +continue ; +if (rc) goto fail; + n_parts++; } rc =efx_mtd_add (efx, &parts[0 ].common, n_parts,sizeof (*parts));
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 176/321 bpf/cpumap: make sure frame_size for build_skb is aligned if headroom isnt
In reply to Greg Kroah-HartmanFrom: Jesper Dangaard Brouer <[email protected]>
[ Upstream commit 77ea5f4cbe2084db9ab021ba73fb7eadf1610884 ]
The frame_size passed to build_skb must be aligned, else it is possible that the embedded struct skb_shared_info gets unaligned.
For correctness make sure that xdpf->headroom in included in the alignment. No upstream drivers can hit this, as all XDP drivers provide an aligned headroom. This was discovered when playing with implementing XDP support for mvneta, which have a 2 bytes DSA header, and this Marvell ARM64 platform didn't like doing atomic operations on an unaligned skb_shinfo(skb)->dataref addresses.
--- kernel/bpf/cpumap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/cpumap.c +1 -1
@@ -183,7 +183,7 @@ static struct sk_buff *cpu_map_build_skb(struct bpf_cpu_map_entry *rcpu,* is not at a fixed memory location, with mixed length * packets, which is bad for cache-line hotness. */ - frame_size =SKB_DATA_ALIGN (xdpf->len) + xdpf->headroom + + frame_size =SKB_DATA_ALIGN (xdpf->len + xdpf->headroom) +SKB_DATA_ALIGN (sizeof (struct skb_shared_info )); pkt_data_start = xdpf->data - xdpf->headroom;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 203/321 xprtrdma: Prevent leak of rpcrdma_rep objects
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
[ Upstream commit 07e10308ee5da8e6132e0b737ece1c99dd651fb6 ]
If a reply has been processed but the RPC is later retransmitted anyway, the req->rl_reply field still contains the only pointer to the old rpcrdma rep. When the next reply comes in, the reply handler will stomp on the rl_reply field, leaking the old rep.
A trace event is added to capture such leaks.
This problem seems to be worsened by the restructuring of the RPC Call path in v4.20. Fully addressing this issue will require at least a re-architecture of the disconnect logic, which is not appropriate during -rc.
--- include/trace/events/rpcrdma.h | 28 ++++++++++++++++++++++++++++ net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++++ 2 files changed, 32 insertions(+)
include/trace/events/rpcrdma.h +28 -0
@@ -917,6 +917,34 @@ TRACE_EVENT(xprtrdma_cb_setup,DEFINE_CB_EVENT (xprtrdma_cb_call);DEFINE_CB_EVENT (xprtrdma_cb_reply); +TRACE_EVENT (xprtrdma_leaked_rep, +TP_PROTO ( + const struct rpc_rqst *rqst, + const struct rpcrdma_rep *rep + ), + +TP_ARGS (rqst, rep), + +TP_STRUCT__entry ( + __field(unsigned int, task_id) + __field(unsigned int, client_id) + __field(u32, xid) + __field(const void *, rep) + ), + +TP_fast_assign ( + __entry->task_id = rqst->rq_task->tk_pid; + __entry->client_id = rqst->rq_task->tk_client->cl_clid; + __entry->xid = be32_to_cpu(rqst->rq_xid); + __entry->rep = rep; + ), + +TP_printk ("task:%u@%u xid=0x%08x rep=%p" , + __entry->task_id, __entry->client_id, __entry->xid, + __entry->rep + ) +); +/** ** Server-side RPC/RDMA events **/
net/sunrpc/xprtrdma/rpc_rdma.c +4 -0
@@ -1360,6 +1360,10 @@ void rpcrdma_reply_handler(struct rpcrdma_rep *rep)spin_unlock (&xprt->recv_lock); req =rpcr_to_rdmar (rqst); +if (req->rl_reply) { +trace_xprtrdma_leaked_rep (rqst, req->rl_reply); +rpcrdma_recv_buffer_put (req->rl_reply); + } req->rl_reply = rep; rep->rr_rqst = rqst;clear_bit (RPCRDMA_REQ_F_PENDING , &req->rl_flags);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 198/321 mm/page_alloc.c: free order-0 pages through PCP in page_frag_free()
In reply to Greg Kroah-HartmanFrom: Aaron Lu <[email protected]>
[ Upstream commit 65895b67ad27df0f62bfaf82dd5622f95ea29196 ]
page_frag_free() calls __free_pages_ok() to free the page back to Buddy. This is OK for high order page, but for order-0 pages, it misses the optimization opportunity of using Per-Cpu-Pages and can cause zone lock contention when called frequently.
Pawel Staszewski recently shared his result of 'how Linux kernel handles normal traffic'[1] and from perf data, Jesper Dangaard Brouer found the lock contention comes from page allocator:
mlx5e_poll_tx_cq
|
--16.34%--napi_consume_skb
|
|--12.65%--__free_pages_ok
| |
| --11.86%--free_one_page
| |
| |--10.10%--queued_spin_lock_slowpath
| |
| --0.65%--_raw_spin_lock
|
|--1.55%--page_frag_free
|
--1.44%--skb_release_dataJesper explained how it happened: mlx5 driver RX-page recycle mechanism is not effective in this workload and pages have to go through the page allocator. The lock contention happens during mlx5 DMA TX completion cycle. And the page allocator cannot keep up at these speeds.[2]
I thought that __free_pages_ok() are mostly freeing high order pages and thought this is an lock contention for high order pages but Jesper explained in detail that __free_pages_ok() here are actually freeing order-0 pages because mlx5 is using order-0 pages to satisfy its page pool allocation request.[3]
The free path as pointed out by Jesper is:skb_free_head()
-> skb_free_frag()
-> page_frag_free()
And the pages being freed on this path are order-0 pages.
Fix this by doing similar things as in __page_frag_cache_drain() - send the being freed page to PCP if it's an order-0 page, or directly to Buddy if it is a high order page.
With this change, Paweł hasn't noticed lock contention yet in his workload and Jesper has noticed a 7% performance improvement using a micro benchmark and lock contention is gone. Ilias' test on a 'low' speed 1Gbit interface on an cortex-a53 shows ~11% performance boost testing with 64byte packets and __free_pages_ok() disappeared from perf top.
[1]: https://www.spinics.net/lists/netdev/msg531362.html
[2]: https://www.spinics.net/lists/netdev/msg531421.html
[3]: https://www.spinics.net/lists/netdev/msg531556.html
--- mm/page_alloc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
mm/page_alloc.c +8 -2
@@ -4581,8 +4581,14 @@ void page_frag_free(void *addr) {struct page *page =virt_to_head_page (addr); -if (unlikely (put_page_testzero (page))) -__free_pages_ok (page,compound_order (page)); +if (unlikely (put_page_testzero (page))) { +unsigned int order =compound_order (page); + +if (order ==0 )/* Via pcp? */ +free_unref_page (page); +else +__free_pages_ok (page, order); + } }EXPORT_SYMBOL (page_frag_free);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 171/321 drbd: ignore "all zero" peer volume sizes in handshake
In reply to Greg Kroah-HartmanFrom: Lars Ellenberg <[email protected]>
[ Upstream commit 94c43a13b8d6e3e0dd77b3536b5e04a84936b762 ]
During handshake, if we are diskless ourselves, we used to accept any size presented by the peer.
Which could be zero if that peer was just brought up and connected to us without having a disk attached first, in which case both peers would just "flip" their volume sizes.
Now, even a diskless node will ignore "zero" sizes presented by a diskless peer.
Also a currently Diskless Primary will refuse to shrink during handshake:
it may be frozen, and waiting for a "suitable" local disk or peer to re-appear (on-no-data-accessible suspend-io). If the peer is smaller than what we used to be, it is not suitable.
The logic for a diskless node during handshake is now supposed to be:
believe the peer, if
- I don't have a current size myself
- we agree on the size anyways
- I do have a current size, am Secondary, and he has the only disk
- I do have a current size, am Primary, and he has the only disk, which is larger than my current size
--- drivers/block/drbd/drbd_receiver.c | 33 +++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-)
drivers/block/drbd/drbd_receiver.c +30 -3
@@ -3980,6 +3980,7 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_infostruct o_qlim *o = (connection->agreed_features &DRBD_FF_WSAME ) ? p->qlim :NULL ;enum determine_dev_size dd =DS_UNCHANGED ;sector_t p_size, p_usize, p_csize, my_usize; +sector_t new_size, cur_size;int ldsc =0 ;/* local disk size changed */ enum dds_flags ddsf;
@@ -3987,6 +3988,7 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_infoif (!peer_device)return config_unknown_volume (connection, pi); device = peer_device->device; + cur_size =drbd_get_capacity (device->this_bdev); p_size =be64_to_cpu (p->d_size); p_usize =be64_to_cpu (p->u_size);
@@ -3997,7 +3999,6 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_info device->p_size = p_size;if (get_ldev (device)) { -sector_t new_size, cur_size;rcu_read_lock (); my_usize =rcu_dereference (device->ldev->disk_conf)->disk_size;rcu_read_unlock ();
@@ -4015,7 +4016,6 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_info/* Never shrink a device with usable data during connect. But allow online shrinking if we are connected. */ new_size =drbd_new_dev_size (device, device->ldev, p_usize,0 ); - cur_size =drbd_get_capacity (device->this_bdev);if (new_size < cur_size && device->state.disk >=D_OUTDATED && device->state.conn <C_CONNECTED ) {
@@ -4080,9 +4080,36 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_info* * However, if he sends a zero current size, * take his (user-capped or) backing disk size anyways. +* +* Unless of course he does not have a disk himself. +* In which case we ignore this completely. */ +sector_t new_size = p_csize ?: p_usize ?: p_size;drbd_reconsider_queue_parameters (device,NULL , o); -drbd_set_my_capacity (device, p_csize ?: p_usize ?: p_size); +if (new_size ==0 ) { +/* Ignore, peer does not know nothing. */ + }else if (new_size == cur_size) { +/* nothing to do */ + }else if (cur_size !=0 && p_size ==0 ) { +drbd_warn (device,"Ignored diskless peer device size (peer:%llu != me:%llu sectors)!\n" , + (unsigned long long )new_size, (unsigned long long )cur_size); + }else if (new_size < cur_size && device->state.role ==R_PRIMARY ) { +drbd_err (device,"The peer's device size is too small! (%llu < %llu sectors); demote me first!\n" , + (unsigned long long )new_size, (unsigned long long )cur_size); +conn_request_state (peer_device->connection,NS (conn,C_DISCONNECTING ),CS_HARD ); +return -EIO ; + }else { +/* I believe the peer, if +* - I don't have a current size myself +* - we agree on the size anyways +* - I do have a current size, am Secondary, +* and he has the only disk +* - I do have a current size, am Primary, +* and he has the only disk, +* which is larger than my current size +*/ +drbd_set_my_capacity (device, new_size); + } }if (get_ldev (device)) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 181/321 crypto: mxc-scc - fix build warnings on ARM64
In reply to Greg Kroah-HartmanFrom: Fabio Estevam <[email protected]>
[ Upstream commit 2326828ee40357b3d2b1359b8ca7526af201495b ]
The following build warnings are seen when building for ARM64 allmodconfig:
drivers/crypto/mxc-scc.c:181:20: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] drivers/crypto/mxc-scc.c:186:21: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] drivers/crypto/mxc-scc.c:277:21: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] drivers/crypto/mxc-scc.c:339:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] drivers/crypto/mxc-scc.c:340:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Fix them by using the %zu specifier to print a size_t variable and using a plain %x to print the result of a readl().
--- drivers/crypto/mxc-scc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/mxc-scc.c +6 -6
@@ -178,12 +178,12 @@ static int mxc_scc_get_data(struct mxc_scc_ctx *ctx,else from = scc->black_memory; -dev_dbg (scc->dev,"pcopy: from 0x%p %d bytes\n" , from, +dev_dbg (scc->dev,"pcopy: from 0x%p %zu bytes\n" , from, ctx->dst_nents *8 ); len =sg_pcopy_from_buffer (ablkreq->dst, ctx->dst_nents, from, ctx->size, ctx->offset);if (!len) { -dev_err (scc->dev,"pcopy err from 0x%p (len=%d)\n" , from, len); +dev_err (scc->dev,"pcopy err from 0x%p (len=%zu)\n" , from, len);return -EINVAL ; }
@@ -274,7 +274,7 @@ static int mxc_scc_put_data(struct mxc_scc_ctx *ctx, len =sg_pcopy_to_buffer (req->src, ctx->src_nents, to, len, ctx->offset);if (!len) { -dev_err (scc->dev,"pcopy err to 0x%p (len=%d)\n" , to, len); +dev_err (scc->dev,"pcopy err to 0x%p (len=%zu)\n" , to, len);return -EINVAL ; }
@@ -335,9 +335,9 @@ static void mxc_scc_ablkcipher_next(struct mxc_scc_ctx *ctx,return ; } -dev_dbg (scc->dev,"Start encryption (0x%p/0x%p)\n" , - (void *)readl (scc->base +SCC_SCM_RED_START ), - (void *)readl (scc->base +SCC_SCM_BLACK_START )); +dev_dbg (scc->dev,"Start encryption (0x%x/0x%x)\n" , +readl (scc->base +SCC_SCM_RED_START ), +readl (scc->base +SCC_SCM_BLACK_START ));/* clear interrupt control registers */ writel(SCC_SCM_INTR_CTRL_CLR_INTR,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 182/321 pwm: clps711x: Fix period calculation
In reply to Greg Kroah-HartmanFrom: Alexander Shiyan <[email protected]>
[ Upstream commit b0f17570b8203c22f139459c86cfbaa0311313ed ]
Commit e39c0df1be5a ("pwm: Introduce the pwm_args concept") has changed the variable for the period for clps711x-pwm driver, so now pwm_get/set_period() works with pwm->state.period variable instead of pwm->args.period.
This patch changes the period variable in other places where it is used.
--- drivers/pwm/pwm-clps711x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pwm/pwm-clps711x.c +2 -2
@@ -48,7 +48,7 @@ static void clps711x_pwm_update_val(struct clps711x_chip *priv, u32 n, u32 v)static unsigned int clps711x_get_duty (struct pwm_device *pwm,unsigned int v) {/* Duty cycle 0..15 max */ -return DIV_ROUND_CLOSEST (v *0xf ,pwm_get_period (pwm)); +return DIV_ROUND_CLOSEST (v *0xf , pwm->args.period); }static int clps711x_pwm_request (struct pwm_chip *chip,struct pwm_device *pwm)
@@ -71,7 +71,7 @@ static int clps711x_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,struct clps711x_chip *priv =to_clps711x_chip (chip);unsigned int duty; -if (period_ns !=pwm_get_period (pwm)) +if (period_ns != pwm->args.period)return -EINVAL ; duty =clps711x_get_duty (pwm, duty_ns);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 126/321 kprobes/x86/xen: blacklist non-attachable xen interrupt functions
In reply to Greg Kroah-HartmanFrom: Andrea Righi <[email protected]>
[ Upstream commit bf9445a33ae6ac2f0822d2f1ce1365408387d568 ]
Blacklist symbols in Xen probe-prohibited areas, so that user can see these prohibited symbols in debugfs.
See also: a50480cb6d61.
--- arch/x86/xen/xen-asm_64.S | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/xen/xen-asm_64.S +2 -0
@@ -12,6 +12,7 @@ #include <asm/segment.h> #include <asm/asm-offsets.h> #include <asm/thread_info.h> +#include <asm/asm.h> #include <xen/interface/xen.h>
@@ -24,6 +25,7 @@ ENTRY(xen_\name) pop %r11 jmp \name END(xen_\name) +_ASM_NOKPROBE(xen_\name) .endm xen_pv_trap divide_error
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 132/321 pinctrl: xway: fix gpio-hog related boot issues
In reply to Greg Kroah-HartmanFrom: Martin Schiller <[email protected]>
[ Upstream commit 9b4924da4711674e62d97d4f5360446cc78337af ]
This patch is based on commit a86caa9ba5d7 ("pinctrl: msm: fix gpio-hog related boot issues").
It fixes the issue that the gpio ranges needs to be defined before gpiochip_add().
Therefore, we also have to swap the order of registering the pinctrl driver and registering the gpio chip.
You also have to add the "gpio-ranges" property to the pinctrl device node to get it finally working.
--- drivers/pinctrl/pinctrl-xway.c | 39 +++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 12 deletions(-)
drivers/pinctrl/pinctrl-xway.c +27 -12
@@ -1746,14 +1746,6 @@ static int pinmux_xway_probe(struct platform_device *pdev) } xway_pctrl_desc.pins = xway_info.pads; -/* register the gpio chip */ - xway_chip.parent = &pdev->dev; - ret =devm_gpiochip_add_data (&pdev->dev, &xway_chip,NULL ); -if (ret) { -dev_err (&pdev->dev,"Failed to register gpio chip\n" ); -return ret; - } -/* setup the data needed by pinctrl */ xway_pctrl_desc.name =dev_name (&pdev->dev); xway_pctrl_desc.npins = xway_chip.ngpio;
@@ -1775,10 +1767,33 @@ static int pinmux_xway_probe(struct platform_device *pdev)return ret; } -/* finish with registering the gpio range in pinctrl */ - xway_gpio_range.npins = xway_chip.ngpio; - xway_gpio_range.base = xway_chip.base; -pinctrl_add_gpio_range (xway_info.pctrl, &xway_gpio_range); +/* register the gpio chip */ + xway_chip.parent = &pdev->dev; + xway_chip.owner =THIS_MODULE ; + xway_chip.of_node = pdev->dev.of_node; + ret =devm_gpiochip_add_data (&pdev->dev, &xway_chip,NULL ); +if (ret) { +dev_err (&pdev->dev,"Failed to register gpio chip\n" ); +return ret; + } + +/* +* For DeviceTree-supported systems, the gpio core checks the +* pinctrl's device node for the "gpio-ranges" property. +* If it is present, it takes care of adding the pin ranges +* for the driver. In this case the driver can skip ahead. +* +* In order to remain compatible with older, existing DeviceTree +* files which don't set the "gpio-ranges" property or systems that +* utilize ACPI the driver has to call gpiochip_add_pin_range(). +*/ +if (!of_property_read_bool (pdev->dev.of_node,"gpio-ranges" )) { +/* finish with registering the gpio range in pinctrl */ + xway_gpio_range.npins = xway_chip.ngpio; + xway_gpio_range.base = xway_chip.base; +pinctrl_add_gpio_range (xway_info.pctrl, &xway_gpio_range); + } +dev_info (&pdev->dev,"Init done\n" );return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 131/321 memory: omap-gpmc: Get the header of the enum
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit a0752e9c3097b2c4fccd618802938e0951038dfa ]
Commit 21abf103818a
("gpio: Pass a flag to gpiochip_request_own_desc()") started to pass an enum gpiod_flags but this file is not including the header file that defines that enum and the compiler spits:
drivers/memory/omap-gpmc.c: In function
'gpmc_probe_generic_child':drivers/memory/omap-gpmc.c:2174:9: error: type of formal
parameter 4 is incomplete
0);
^--- drivers/memory/omap-gpmc.c | 1 + 1 file changed, 1 insertion(+)
drivers/memory/omap-gpmc.c +1 -0
@@ -21,6 +21,7 @@#include <linux/spinlock.h> #include <linux/io.h> #include <linux/gpio/driver.h> +#include <linux/gpio/consumer.h> /* GPIO descriptor enum */ #include <linux/interrupt.h> #include <linux/irqdomain.h> #include <linux/platform_device.h>
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 166/321 powerpc/prom: fix early DEBUG messages
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
[ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ]
This patch fixes early DEBUG messages in prom.c:
- Use %px instead of %p to see the addresses
- Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits.
--- arch/powerpc/kernel/prom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/kernel/prom.c +3 -3
@@ -129,7 +129,7 @@ static void __init move_device_tree(void) p =__va (memblock_alloc (size,PAGE_SIZE ));memcpy (p, initial_boot_params, size); initial_boot_params = p; -DBG ("Moved device tree to 0x%p\n" , p); +DBG ("Moved device tree to 0x%px\n" , p); }DBG ("<- move_device_tree\n" );
@@ -689,7 +689,7 @@ void __init early_init_devtree(void *params) {phys_addr_t limit; -DBG (" -> early_init_devtree(%p)\n" , params); +DBG (" -> early_init_devtree(%px)\n" , params);/* Too early to BUG_ON(), do it by hand */ if (!early_init_dt_verify (params))
@@ -749,7 +749,7 @@ void __init early_init_devtree(void *params)memblock_allow_resize ();memblock_dump_all (); -DBG ("Phys. mem: %llx\n" ,memblock_phys_mem_size ()); +DBG ("Phys. mem: %llx\n" , (unsigned long long )memblock_phys_mem_size ());/* We may need to relocate the flat tree, do it now. * FIXME .. and the initrd too? */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 160/321 scsi: csiostor: fix incorrect dma device in case of vport
In reply to Greg Kroah-HartmanFrom: Varun Prakash <[email protected]>
[ Upstream commit 9934613edcb40b92a216122876cd3b7e76d08390 ]
In case of ->vport_create() call scsi_add_host_with_dma() instead of scsi_add_host() to pass correct dma device.
--- drivers/scsi/csiostor/csio_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/csiostor/csio_init.c +1 -1
@@ -649,7 +649,7 @@ csio_shost_init(struct csio_hw *hw, struct device *dev,if (csio_lnode_init (ln, hw, pln)) goto err_shost_put; -if (scsi_add_host (shost, dev)) +if (scsi_add_host_with_dma (shost, dev, &hw->pdev->dev)) goto err_lnode_exit;return ln;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 163/321 ath6kl: Fix off by one error in scan completion
In reply to Greg Kroah-HartmanFrom: Kyle Roeschley <[email protected]>
[ Upstream commit 5803c12816c43bd09e5f4247dd9313c2d9a2c41b ]
When ath6kl was reworked to share code between regular and scheduled scans in commit 3b8ffc6a22ba ("ath6kl: Configure probed SSID list consistently"), probed SSID entry changed from 1-index to 0-indexed. However, ath6kl_cfg80211_scan_complete_event() was missed in that change. Fix its indexing so that we correctly clear out the probed SSID list.
--- drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/cfg80211.c +1 -1
@@ -1093,7 +1093,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted)if (vif->scan_req->n_ssids && vif->scan_req->ssids[0 ].ssid_len) {for (i =0 ; i < vif->scan_req->n_ssids; i++) {ath6kl_wmi_probedssid_cmd (ar->wmi, vif->fw_vif_idx, - i +1 ,DISABLE_SSID_FLAG , + i,DISABLE_SSID_FLAG ,0 ,NULL ); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 129/321 kprobes/x86: Show x86-64 specific blacklisted symbols correctly
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
[ Upstream commit fe6e65615415987629a2dda583b4495677d8c388 ]
Show x86-64 specific blacklisted symbols in debugfs.
Since x86-64 prohibits probing on symbols which are in entry text, those should be shown.
--- arch/x86/kernel/kprobes/core.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/x86/kernel/kprobes/core.c +6 -0
@@ -1140,6 +1140,12 @@ bool arch_within_kprobe_blacklist(unsigned long addr) is_in_entry_trampoline_section; } +int __init arch_populate_kprobe_blacklist (void ) +{ +return kprobe_add_area_blacklist ((unsigned long )__entry_text_start, + (unsigned long )__entry_text_end); +} +int __init arch_init_kprobes (void ) {return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 150/321 clocksource/drivers/fttmr010: Fix invalid interrupt register access
In reply to Greg Kroah-HartmanFrom: Tao Ren <[email protected]>
[ Upstream commit 86fe57fc47b17b3528fa5497fc57e158d846c4ea ]
TIMER_INTR_MASK register (Base Address of Timer + 0x38) is not designed for masking interrupts on ast2500 chips, and it's not even listed in ast2400 datasheet, so it's not safe to access TIMER_INTR_MASK on aspeed chips.
Similarly, TIMER_INTR_STATE register (Base Address of Timer + 0x34) is not interrupt status register on ast2400 and ast2500 chips. Although there is no side effect to reset the register in fttmr010_common_init(), it's just misleading to do so.
Besides, "count_down" is renamed to "is_aspeed" in "fttmr010" structure, and more comments are added so the code is more readble.
--- drivers/clocksource/timer-fttmr010.c | 73 ++++++++++++++++------------ 1 file changed, 42 insertions(+), 31 deletions(-)
drivers/clocksource/timer-fttmr010.c +42 -31
@@ -21,7 +21,7 @@#include <linux/delay.h> /* -* Register definitions for the timers +* Register definitions common for all the timer variants. */ #define TIMER1_COUNT (0x00)#define TIMER1_LOAD (0x04)
@@ -36,9 +36,10 @@#define TIMER3_MATCH1 (0x28)#define TIMER3_MATCH2 (0x2c)#define TIMER_CR (0x30) -#define TIMER_INTR_STATE (0x34) -#define TIMER_INTR_MASK (0x38) +/* +* Control register (TMC30) bit fields for fttmr010/gemini/moxart timers. +*/ #define TIMER_1_CR_ENABLE BIT(0)#define TIMER_1_CR_CLOCK BIT(1)#define TIMER_1_CR_INT BIT(2)
@@ -53,8 +54,9 @@#define TIMER_3_CR_UPDOWN BIT(11)/* -* The Aspeed AST2400 moves bits around in the control register -* and lacks bits for setting the timer to count upwards. +* Control register (TMC30) bit fields for aspeed ast2400/ast2500 timers. +* The aspeed timers move bits around in the control register and lacks +* bits for setting the timer to count upwards. */ #define TIMER_1_CR_ASPEED_ENABLE BIT(0)#define TIMER_1_CR_ASPEED_CLOCK BIT(1)
@@ -66,6 +68,18 @@#define TIMER_3_CR_ASPEED_CLOCK BIT(9)#define TIMER_3_CR_ASPEED_INT BIT(10) +/* +* Interrupt status/mask register definitions for fttmr010/gemini/moxart +* timers. +* The registers don't exist and they are not needed on aspeed timers +* because: +* - aspeed timer overflow interrupt is controlled by bits in Control +* Register (TMC30). +* - aspeed timers always generate interrupt when either one of the +* Match registers equals to Status register. +*/ +#define TIMER_INTR_STATE (0x34) +#define TIMER_INTR_MASK (0x38)#define TIMER_1_INT_MATCH1 BIT(0)#define TIMER_1_INT_MATCH2 BIT(1)#define TIMER_1_INT_OVERFLOW BIT(2)
@@ -80,7 +94,7 @@struct fttmr010 {void __iomem *base;unsigned int tick_rate; -bool count_down; +bool is_aspeed;u32 t1_enable_val;struct clock_event_device clkevt;#ifdef CONFIG_ARM
@@ -130,7 +144,7 @@ static int fttmr010_timer_set_next_event(unsigned long cycles, cr &= ~fttmr010->t1_enable_val;writel (cr, fttmr010->base +TIMER_CR ); -if (fttmr010->count_down) { +if (fttmr010->is_aspeed) {/* * ASPEED Timer Controller will load TIMER1_LOAD register * into TIMER1_COUNT register when the timer is re-enabled.
@@ -175,16 +189,17 @@ static int fttmr010_timer_set_oneshot(struct clock_event_device *evt)/* Setup counter start from 0 or ~0 */ writel (0 , fttmr010->base +TIMER1_COUNT ); -if (fttmr010->count_down) +if (fttmr010->is_aspeed) {writel (~0 , fttmr010->base +TIMER1_LOAD ); -else + }else {writel (0 , fttmr010->base +TIMER1_LOAD ); -/* Enable interrupt */ - cr =readl (fttmr010->base +TIMER_INTR_MASK ); - cr &= ~(TIMER_1_INT_OVERFLOW |TIMER_1_INT_MATCH2 ); - cr |=TIMER_1_INT_MATCH1 ; -writel (cr, fttmr010->base +TIMER_INTR_MASK ); +/* Enable interrupt */ + cr =readl (fttmr010->base +TIMER_INTR_MASK ); + cr &= ~(TIMER_1_INT_OVERFLOW |TIMER_1_INT_MATCH2 ); + cr |=TIMER_1_INT_MATCH1 ; +writel (cr, fttmr010->base +TIMER_INTR_MASK ); + }return 0 ; }
@@ -201,9 +216,8 @@ static int fttmr010_timer_set_periodic(struct clock_event_device *evt)writel (cr, fttmr010->base +TIMER_CR );/* Setup timer to fire at 1/HZ intervals. */ -if (fttmr010->count_down) { +if (fttmr010->is_aspeed) {writel (period, fttmr010->base +TIMER1_LOAD ); -writel (0 , fttmr010->base +TIMER1_MATCH1 ); }else { cr =0xffffffff - (period -1 );writel (cr, fttmr010->base +TIMER1_COUNT );
@@ -281,23 +295,21 @@ static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed) }/* -* The Aspeed AST2400 moves bits around in the control register, -* otherwise it works the same. +* The Aspeed timers move bits around in the control register. */ if (is_aspeed) { fttmr010->t1_enable_val =TIMER_1_CR_ASPEED_ENABLE |TIMER_1_CR_ASPEED_INT ; -/* Downward not available */ - fttmr010->count_down = true; + fttmr010->is_aspeed = true; }else { fttmr010->t1_enable_val =TIMER_1_CR_ENABLE |TIMER_1_CR_INT ; - } -/* -* Reset the interrupt mask and status -*/ -writel (TIMER_INT_ALL_MASK , fttmr010->base +TIMER_INTR_MASK ); -writel (0 , fttmr010->base +TIMER_INTR_STATE ); +/* +* Reset the interrupt mask and status +*/ +writel (TIMER_INT_ALL_MASK , fttmr010->base +TIMER_INTR_MASK ); +writel (0 , fttmr010->base +TIMER_INTR_STATE ); + }/* * Enable timer 1 count up, timer 2 count up, except on Aspeed,
@@ -306,9 +318,8 @@ static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed)if (is_aspeed) val =TIMER_2_CR_ASPEED_ENABLE ;else { - val =TIMER_2_CR_ENABLE ; -if (!fttmr010->count_down) - val |=TIMER_1_CR_UPDOWN |TIMER_2_CR_UPDOWN ; + val =TIMER_2_CR_ENABLE |TIMER_1_CR_UPDOWN | +TIMER_2_CR_UPDOWN ; }writel (val, fttmr010->base +TIMER_CR );
@@ -321,7 +332,7 @@ static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed)writel (0 , fttmr010->base +TIMER2_MATCH1 );writel (0 , fttmr010->base +TIMER2_MATCH2 ); -if (fttmr010->count_down) { +if (fttmr010->is_aspeed) {writel (~0 , fttmr010->base +TIMER2_LOAD ); clocksource_mmio_init(fttmr010->base + TIMER2_COUNT, "FTTMR010-TIMER2",
@@ -371,7 +382,7 @@ static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed)#ifdef CONFIG_ARM /* Also use this timer for delays */ -if (fttmr010->count_down) +if (fttmr010->is_aspeed) fttmr010->delay_timer.read_current_timer = fttmr010_read_current_timer_down;else
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 146/321 dm raid: fix false -EBUSY when handling check/repair message
In reply to Greg Kroah-HartmanFrom: Heinz Mauelshagen <[email protected]>
[ Upstream commit 74694bcbdf7e28a5ad548cdda9ac56d30be00d13 ]
Sending a check/repair message infrequently leads to -EBUSY instead of properly identifying an active resync. This occurs because raid_message() is testing recovery bits in a racy way.
Fix by calling decipher_sync_action() from raid_message() to properly identify the idle state of the RAID device.
--- drivers/md/dm-raid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/dm-raid.c +1 -2
@@ -3690,8 +3690,7 @@ static int raid_message(struct dm_target *ti, unsigned int argc, char **argv,set_bit (MD_RECOVERY_INTR , &mddev->recovery);md_reap_sync_thread (mddev); } - }else if (test_bit (MD_RECOVERY_RUNNING , &mddev->recovery) || -test_bit (MD_RECOVERY_NEEDED , &mddev->recovery)) + }else if (decipher_sync_action (mddev, mddev->recovery) != st_idle)return -EBUSY ;else if (!strcasecmp (argv[0 ],"resync" )) ;/* MD_RECOVERY_NEEDED set below */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 92/321 brcmfmac: set F2 watermark to 256 for 4373
In reply to Greg Kroah-HartmanFrom: Wright Feng <[email protected]>
[ Upstream commit e1a08730eeb0bad4d82c3bc40e74854872de618d ]
We got SDIO_CRC_ERROR with 4373 on SDR104 when doing bi-directional throughput test. Enable watermark to 256 to guarantee the operation stability.
--- .../broadcom/brcm80211/brcmfmac/sdio.c | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +24 -2
@@ -49,6 +49,10 @@#define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500)#define CTL_DONE_TIMEOUT msecs_to_jiffies(2500) +/* watermark expressed in number of words */ +#define DEFAULT_F2_WATERMARK 0x8 +#define CY_4373_F2_WATERMARK 0x40 +#ifdef DEBUG #define BRCMF_TRAP_INFO_SIZE 80
@@ -138,6 +142,8 @@ struct rte_console {/* 1: isolate internal sdio signals, put external pads in tri-state; requires * sdio bus power cycle to clear (rev 9) */ #define SBSDIO_DEVCTL_PADS_ISO 0x08 +/* 1: enable F2 Watermark */ +#define SBSDIO_DEVCTL_F2WM_ENAB 0x10/* Force SD->SB reset mapping (rev 11) */ #define SBSDIO_DEVCTL_SB_RST_CTL 0x30/* Determined by CoreControl bit */
@@ -4060,6 +4066,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,void *nvram;u32 nvram_len;u8 saveclk; +u8 devctl;brcmf_dbg (TRACE ,"Enter: dev=%s, err=%d\n" ,dev_name (dev), err);
@@ -4115,8 +4122,23 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,brcmf_sdiod_writel (sdiod, core->base +SD_REG (hostintmask), bus->hostintmask,NULL ); - -brcmf_sdiod_writeb (sdiod,SBSDIO_WATERMARK ,8 , &err); +switch (sdiod->func1->device) { +case SDIO_DEVICE_ID_CYPRESS_4373 : +brcmf_dbg (INFO ,"set F2 watermark to 0x%x*4 bytes\n" , +CY_4373_F2_WATERMARK ); +brcmf_sdiod_writeb (sdiod,SBSDIO_WATERMARK , +CY_4373_F2_WATERMARK , &err); + devctl =brcmf_sdiod_readb (sdiod,SBSDIO_DEVICE_CTL , + &err); + devctl |=SBSDIO_DEVCTL_F2WM_ENAB ; +brcmf_sdiod_writeb (sdiod,SBSDIO_DEVICE_CTL , devctl, + &err); +break ; +default : +brcmf_sdiod_writeb (sdiod,SBSDIO_WATERMARK , +DEFAULT_F2_WATERMARK , &err); +break ; + } }else {/* Disable F2 again */ sdio_disable_func (sdiod->func2);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 83/321 scsi: lpfc: Enable Management features for IF_TYPE=6
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 719162bd5bb968203397b9b1d0dd30a9797bbd09 ]
Addition of support for if_type=6 missed several checks for interface type, resulting in the failure of several key management features such as firmware dump and loopback testing.
Correct the checks on the if_type so that both SLI4 IF_TYPE's 2 and 6 are supported.
--- drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- drivers/scsi/lpfc/lpfc_bsg.c | 6 +++--- drivers/scsi/lpfc/lpfc_els.c | 2 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +2 -2
@@ -1332,7 +1332,7 @@ lpfc_sli4_pdev_reg_request(struct lpfc_hba *phba, uint32_t opcode)return -EACCES ;if ((phba->sli_rev <LPFC_SLI_REV4 ) || - (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != + (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) <LPFC_SLI_INTF_IF_TYPE_2 ))return -EPERM ;
@@ -4264,7 +4264,7 @@ lpfc_link_speed_store(struct device *dev, struct device_attribute *attr,uint32_t prev_val, if_type; if_type =bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf); -if (if_type ==LPFC_SLI_INTF_IF_TYPE_2 && +if (if_type >=LPFC_SLI_INTF_IF_TYPE_2 && phba->hba_flag &HBA_FORCED_LINK_SPEED )return -EPERM ;
drivers/scsi/lpfc/lpfc_bsg.c +3 -3
@@ -2221,7 +2221,7 @@ lpfc_bsg_diag_loopback_mode(struct bsg_job *job)if (phba->sli_rev <LPFC_SLI_REV4 ) rc =lpfc_sli3_bsg_diag_loopback_mode (phba, job); -else if (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) == +else if (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) >=LPFC_SLI_INTF_IF_TYPE_2 ) rc =lpfc_sli4_bsg_diag_loopback_mode (phba, job);else
@@ -2261,7 +2261,7 @@ lpfc_sli4_bsg_diag_mode_end(struct bsg_job *job)if (phba->sli_rev <LPFC_SLI_REV4 )return -ENODEV ; -if (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != +if (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) <LPFC_SLI_INTF_IF_TYPE_2 )return -ENODEV ;
@@ -2353,7 +2353,7 @@ lpfc_sli4_bsg_link_diag_test(struct bsg_job *job) rc = -ENODEV ; goto job_error; } -if (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != +if (bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) <LPFC_SLI_INTF_IF_TYPE_2 ) { rc = -ENODEV ; goto job_error;
drivers/scsi/lpfc/lpfc_els.c +1 -1
@@ -5559,7 +5559,7 @@ lpfc_els_rcv_rdp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,struct ls_rjt stat;if (phba->sli_rev <LPFC_SLI_REV4 || -bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != +bf_get (lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) <LPFC_SLI_INTF_IF_TYPE_2 ) { rjt_err =LSRJT_UNABLE_TPC ; rjt_expl =LSEXP_REQ_UNSUPPORTED ;
drivers/scsi/lpfc/lpfc_hbadisc.c +1 -1
@@ -4780,7 +4780,7 @@ lpfc_unreg_rpi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)if (phba->sli_rev ==LPFC_SLI_REV4 && (!(vport->load_flag &FC_UNLOADING )) && (bf_get (lpfc_sli_intf_if_type, - &phba->sli4_hba.sli_intf) == + &phba->sli4_hba.sli_intf) >=LPFC_SLI_INTF_IF_TYPE_2 ) && (kref_read (&ndlp->kref) >0 )) { mbox->context1 =lpfc_nlp_get (ndlp);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 88/321 crypto: user - support incremental algorithm dumps
In reply to Greg Kroah-HartmanFrom: Eric Biggers <[email protected]>
[ Upstream commit 0ac6b8fb23c724b015d9ca70a89126e8d1563166 ]
CRYPTO_MSG_GETALG in NLM_F_DUMP mode sometimes doesn't return all registered crypto algorithms, because it doesn't support incremental dumps. crypto_dump_report() only permits itself to be called once, yet the netlink subsystem allocates at most ~64 KiB for the skb being dumped to. Thus only the first recvmsg() returns data, and it may only include a subset of the crypto algorithms even if the user buffer passed to recvmsg() is large enough to hold all of them.
Fix this by using one of the arguments in the netlink_callback structure to keep track of the current position in the algorithm list. Then userspace can do multiple recvmsg() on the socket after sending the dump request. This is the way netlink dumps work elsewhere in the kernel; it's unclear why this was different (probably just an oversight).
Also fix an integer overflow when calculating the dump buffer size hint.
--- crypto/crypto_user.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-)
crypto/crypto_user.c +20 -17
@@ -296,30 +296,33 @@ drop_alg:static int crypto_dump_report (struct sk_buff *skb,struct netlink_callback *cb) { -struct crypto_alg *alg; +const size_t start_pos = cb->args[0 ]; +size_t pos =0 ;struct crypto_dump_info info; -int err; - -if (cb->args[0 ]) - goto out; - - cb->args[0 ] =1 ; +struct crypto_alg *alg; +int res; info.in_skb = cb->skb; info.out_skb = skb; info.nlmsg_seq = cb->nlh->nlmsg_seq; info.nlmsg_flags =NLM_F_MULTI ; +down_read (&crypto_alg_sem);list_for_each_entry (alg, &crypto_alg_list, cra_list) { - err =crypto_report_alg (alg, &info); -if (err) - goto out_err; +if (pos >= start_pos) { + res =crypto_report_alg (alg, &info); +if (res == -EMSGSIZE ) +break ; +if (res) + goto out; + } + pos++; } - + cb->args[0 ] = pos; + res = skb->len; out: -return skb->len; -out_err: -return err; +up_read (&crypto_alg_sem); +return res; }static int crypto_dump_report_done (struct netlink_callback *cb)
@@ -503,7 +506,7 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,if ((type == (CRYPTO_MSG_GETALG -CRYPTO_MSG_BASE ) && (nlh->nlmsg_flags &NLM_F_DUMP ))) {struct crypto_alg *alg; -u16 dump_alloc =0 ; +unsigned long dump_alloc =0 ;if (link->dump ==NULL )return -EINVAL ;
@@ -511,16 +514,16 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,down_read (&crypto_alg_sem);list_for_each_entry (alg, &crypto_alg_list, cra_list) dump_alloc +=CRYPTO_REPORT_MAXSIZE ; +up_read (&crypto_alg_sem); {struct netlink_dump_control c = { .dump = link->dump, .done = link->done, - .min_dump_alloc = dump_alloc, + .min_dump_alloc =min (dump_alloc,65535UL ), }; err =netlink_dump_start (crypto_nlsk, skb, nlh, &c); } -up_read (&crypto_alg_sem);return err; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 125/321 serial: 8250: Rate limit serial port rx interrupts during input overruns
In reply to Greg Kroah-HartmanFrom: Darwin Dingel <[email protected]>
[ Upstream commit 6d7f677a2afa1c82d7fc7af7f9159cbffd5dc010 ]
When a serial port gets faulty or gets flooded with inputs, its interrupt handler starts to work double time to get the characters to the workqueue for the tty layer to handle them. When this busy time on the serial/tty subsystem happens during boot, where it is also busy on the userspace trying to initialise, some processes can continuously get preempted and will be on hold until the interrupts subside.
The fix is to backoff on processing received characters for a specified amount of time when an input overrun is seen (received a new character before the previous one is processed). This only stops receive and will continue to transmit characters to serial port. After the backoff period is done, it receive will be re-enabled. This is optional and will only be enabled by setting 'overrun-throttle-ms' in the dts.
--- drivers/tty/serial/8250/8250_core.c | 25 +++++++++++++++++++++++++ drivers/tty/serial/8250/8250_fsl.c | 23 ++++++++++++++++++++++- drivers/tty/serial/8250/8250_of.c | 5 +++++ include/linux/serial_8250.h | 4 ++++ 4 files changed, 56 insertions(+), 1 deletion(-)
drivers/tty/serial/8250/8250_core.c +25 -0
@@ -946,6 +946,21 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *return NULL ; } +static void serial_8250_overrun_backoff_work (struct work_struct *work) +{ +struct uart_8250_port *up = + container_of(to_delayed_work(work), struct uart_8250_port, + overrun_backoff); +struct uart_port *port = &up->port; +unsigned long flags; + +spin_lock_irqsave (&port->lock, flags); + up->ier |=UART_IER_RLSI |UART_IER_RDI ; + up->port.read_status_mask |=UART_LSR_DR ; +serial_out (up,UART_IER , up->ier); +spin_unlock_irqrestore (&port->lock, flags); +} +/** * serial8250_register_8250_port - register a serial port * @up: serial port template
@@ -1060,6 +1075,16 @@ int serial8250_register_8250_port(struct uart_8250_port *up) ret =0 ; } } + +/* Initialise interrupt backoff work if required */ +if (up->overrun_backoff_time_ms >0 ) { + uart->overrun_backoff_time_ms = up->overrun_backoff_time_ms; +INIT_DELAYED_WORK (&uart->overrun_backoff, + serial_8250_overrun_backoff_work); + }else { + uart->overrun_backoff_time_ms =0 ; + } +mutex_unlock (&serial_mutex);return ret;
drivers/tty/serial/8250/8250_fsl.c +22 -1
@@ -45,8 +45,29 @@ int fsl8250_handle_irq(struct uart_port *port) lsr = orig_lsr = up->port.serial_in (&up->port,UART_LSR ); -if (lsr & (UART_LSR_DR |UART_LSR_BI )) +/* Process incoming characters first */ +if ((lsr & (UART_LSR_DR |UART_LSR_BI )) && + (up->ier & (UART_IER_RLSI |UART_IER_RDI ))) { lsr =serial8250_rx_chars (up, lsr); + } + +/* Stop processing interrupts on input overrun */ +if ((orig_lsr &UART_LSR_OE ) && (up->overrun_backoff_time_ms >0 )) { +unsigned long delay; + + up->ier = port->serial_in (port,UART_IER ); +if (up->ier & (UART_IER_RLSI |UART_IER_RDI )) { + port->ops->stop_rx (port); + }else { +/* Keep restarting the timer until +* the input overrun subsides. +*/ +cancel_delayed_work (&up->overrun_backoff); + } + + delay =msecs_to_jiffies (up->overrun_backoff_time_ms); +schedule_delayed_work (&up->overrun_backoff, delay); + }serial8250_modem_status (up);
drivers/tty/serial/8250/8250_of.c +5 -0
@@ -244,6 +244,11 @@ static int of_platform_serial_probe(struct platform_device *ofdev)if (of_property_read_bool (ofdev->dev.of_node,"auto-flow-control" )) port8250.capabilities |=UART_CAP_AFE ; +if (of_property_read_u32 (ofdev->dev.of_node, +"overrun-throttle-ms" , + &port8250.overrun_backoff_time_ms) !=0 ) + port8250.overrun_backoff_time_ms =0 ; + ret =serial8250_register_8250_port (&port8250);if (ret <0 ) goto err_dispose;
include/linux/serial_8250.h +4 -0
@@ -134,6 +134,10 @@ struct uart_8250_port {void (*dl_write)(struct uart_8250_port *,int );struct uart_8250_em485 *em485; + +/* Serial port overrun backoff */ +struct delayed_work overrun_backoff; +u32 overrun_backoff_time_ms; };static inline struct uart_8250_port *up_to_u8250p (struct uart_port *up)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 120/321 Btrfs: allow clear_extent_dirty() to receive a cached extent state record
In reply to Greg Kroah-HartmanFrom: Filipe Manana <[email protected]>
[ Upstream commit 0e6ec385b55f6001da8c6b1532494241e52c550d ]
We can have a lot freed extents during the life span of transaction, so the red black tree that keeps track of the ranges of each freed extent (fs_info->freed_extents[]) can get quite big. When finishing a transaction commit we find each range, process it (discard the extents, unpin them) and then remove it from the red black tree.
We can use an extent state record as a cache when searching for a range, so that when we clean the range we can use the cached extent state we passed to the search function instead of iterating the red black tree again. Doing things as fast as possible when finishing a transaction (in state TRANS_STATE_UNBLOCKED) is convenient as it reduces the time we block another task that wants to commit the next transaction.
So change clear_extent_dirty() to allow an optional extent state record to be passed as an argument, which will be passed down to __clear_extent_bit.
--- fs/btrfs/disk-io.c | 7 +++++-- fs/btrfs/extent-tree.c | 7 +++++-- fs/btrfs/extent_io.h | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-)
fs/btrfs/disk-io.c +5 -2
@@ -4350,6 +4350,8 @@ static int btrfs_destroy_pinned_extent(struct btrfs_fs_info *fs_info, unpin = pinned_extents; again:while (1 ) { +struct extent_state *cached_state =NULL ; +/* * The btrfs_finish_extent_commit() may get the same range as * ours between find_first_extent_bit and clear_extent_dirty.
@@ -4358,13 +4360,14 @@ again:*/ mutex_lock (&fs_info->unused_bg_unpin_mutex); ret =find_first_extent_bit (unpin,0 , &start, &end, -EXTENT_DIRTY ,NULL ); +EXTENT_DIRTY , &cached_state);if (ret) {mutex_unlock (&fs_info->unused_bg_unpin_mutex);break ; } -clear_extent_dirty (unpin, start, end); +clear_extent_dirty (unpin, start, end, &cached_state); +free_extent_state (cached_state);btrfs_error_unpin_extent_range (fs_info, start, end);mutex_unlock (&fs_info->unused_bg_unpin_mutex);cond_resched ();
fs/btrfs/extent-tree.c +5 -2
@@ -6618,9 +6618,11 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans) unpin = &fs_info->freed_extents[0 ];while (!trans->aborted) { +struct extent_state *cached_state =NULL ; +mutex_lock (&fs_info->unused_bg_unpin_mutex); ret =find_first_extent_bit (unpin,0 , &start, &end, -EXTENT_DIRTY ,NULL ); +EXTENT_DIRTY , &cached_state);if (ret) {mutex_unlock (&fs_info->unused_bg_unpin_mutex);break ;
@@ -6630,9 +6632,10 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans) ret =btrfs_discard_extent (fs_info, start, end +1 - start,NULL ); -clear_extent_dirty (unpin, start, end); +clear_extent_dirty (unpin, start, end, &cached_state);unpin_extent_range (fs_info, start, end, true);mutex_unlock (&fs_info->unused_bg_unpin_mutex); +free_extent_state (cached_state);cond_resched (); }
fs/btrfs/extent_io.h +2 -2
@@ -348,11 +348,11 @@ static inline int set_extent_dirty(struct extent_io_tree *tree, u64 start, }static inline int clear_extent_dirty (struct extent_io_tree *tree,u64 start, -u64 end) +u64 end,struct extent_state **cached) {return clear_extent_bit (tree, start, end,EXTENT_DIRTY |EXTENT_DELALLOC | -EXTENT_DO_ACCOUNTING ,0 ,0 ,NULL ); +EXTENT_DO_ACCOUNTING ,0 ,0 , cached); } int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 116/321 usb: ehci-omap: Fix deferred probe for phy handling
In reply to Greg Kroah-HartmanFrom: Roger Quadros <[email protected]>
[ Upstream commit 8dc7623bf608495b6e6743e805807c7840673573 ]
PHY model is being used on omap5 platforms even if port mode is not OMAP_EHCI_PORT_MODE_PHY. So don't guess if PHY is required or not based on PHY mode.
If PHY is provided in device tree, it must be required. So, if devm_usb_get_phy_by_phandle() gives us an error code other than -ENODEV (no PHY) then error out.
This fixes USB Ethernet on omap5-uevm if PHY happens to probe after EHCI thus causing a -EPROBE_DEFER.
--- drivers/usb/host/ehci-omap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/usb/host/ehci-omap.c +4 -3
@@ -159,11 +159,12 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)/* get the PHY device */ phy =devm_usb_get_phy_by_phandle (dev,"phys" , i);if (IS_ERR (phy)) { -/* Don't bail out if PHY is not absolutely necessary */ -if (pdata->port_mode[i] !=OMAP_EHCI_PORT_MODE_PHY ) + ret =PTR_ERR (phy); +if (ret == -ENODEV ) {/* no PHY */ + phy =NULL ;continue ; + } - ret =PTR_ERR (phy);if (ret != -EPROBE_DEFER )dev_err (dev,"Can't get PHY for port %d: %d\n" , i, ret);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 118/321 btrfs: fix ncopies raid_attr for RAID56
In reply to Greg Kroah-HartmanFrom: Hans van Kranenburg <[email protected]>
[ Upstream commit da612e31aee51bd13231c78a47c714b543bd3ad8 ]
RAID5 and RAID6 profile store one copy of the data, not 2 or 3. These values are not yet used anywhere so there's no change.
--- fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/volumes.c +2 -2
@@ -96,7 +96,7 @@ const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = { .devs_min = 2, .tolerated_failures = 1, .devs_increment = 1, - .ncopies = 2, + .ncopies = 1, .raid_name = "raid5", .bg_flag = BTRFS_BLOCK_GROUP_RAID5, .mindev_error = BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET,
@@ -108,7 +108,7 @@ const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = { .devs_min = 3, .tolerated_failures = 2, .devs_increment = 1, - .ncopies = 3, + .ncopies = 1, .raid_name = "raid6", .bg_flag = BTRFS_BLOCK_GROUP_RAID6, .mindev_error = BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 115/321 mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET
In reply to Greg Kroah-HartmanFrom: Boris Brezillon <[email protected]>
[ Upstream commit 732774437ae01d9882e60314e303898e63c7f038 ]
The opcodes used by the controller when doing batched page prog should be written in NFC_REG_WCMD_SET not FC_REG_RCMD_SET. Luckily, the default NFC_REG_WCMD_SET value matches the one we set in the driver which explains why we didn't notice the problem.
--- drivers/mtd/nand/raw/sunxi_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/sunxi_nand.c +1 -1
@@ -1397,7 +1397,7 @@ static int sunxi_nfc_hw_ecc_write_page_dma(struct mtd_info *mtd,sunxi_nfc_randomizer_enable (mtd);writel ((NAND_CMD_RNDIN <<8 ) |NAND_CMD_PAGEPROG , - nfc->regs +NFC_REG_RCMD_SET ); + nfc->regs +NFC_REG_WCMD_SET );dma_async_issue_pending (nfc->dmac);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 114/321 mmc: meson-gx: make sure the descriptor is stopped on errors
In reply to Greg Kroah-HartmanFrom: Jerome Brunet <[email protected]>
[ Upstream commit 18f92bc02f1739b5c4d5b70009fbb7eada45bca3 ]
On errors, if we don't stop the descriptor chain, it may continue to run and raise IRQ after we have called mmc_request_done(). This is bad because we won't be able to get cmd anymore and properly deal with the IRQ.
This patch makes sure the descriptor chain is stopped before calling mmc_request_done()
--- drivers/mmc/host/meson-gx-mmc.c | 73 ++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 10 deletions(-)
drivers/mmc/host/meson-gx-mmc.c +63 -10
@@ -21,6 +21,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/delay.h> #include <linux/device.h> #include <linux/of_device.h> #include <linux/platform_device.h>
@@ -90,9 +91,11 @@#define CFG_CLK_ALWAYS_ON BIT(18)#define CFG_CHK_DS BIT(20)#define CFG_AUTO_CLK BIT(23) +#define CFG_ERR_ABORT BIT(27)#define SD_EMMC_STATUS 0x48#define STATUS_BUSY BIT(31) +#define STATUS_DESC_BUSY BIT(30)#define STATUS_DATI GENMASK(23, 16)#define SD_EMMC_IRQ_EN 0x4c
@@ -930,6 +933,7 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd) cmd_cfg |=FIELD_PREP (CMD_CFG_CMD_INDEX_MASK , cmd->opcode); cmd_cfg |=CMD_CFG_OWNER ;/* owned by CPU */ + cmd_cfg |=CMD_CFG_ERROR ;/* stop in case of error */ meson_mmc_set_response_bits (cmd, &cmd_cfg);
@@ -1024,6 +1028,17 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)u32 irq_en, status, raw_status;irqreturn_t ret =IRQ_NONE ; + irq_en =readl (host->regs +SD_EMMC_IRQ_EN ); + raw_status =readl (host->regs +SD_EMMC_STATUS ); + status = raw_status & irq_en; + +if (!status) { +dev_dbg (host->dev, +"Unexpected IRQ! irq_en 0x%08x - status 0x%08x\n" , + irq_en, raw_status); +return IRQ_NONE ; + } +if (WARN_ON (!host) ||WARN_ON (!host->cmd))return IRQ_NONE ;
@@ -1031,22 +1046,18 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) cmd = host->cmd; data = cmd->data; - irq_en =readl (host->regs +SD_EMMC_IRQ_EN ); - raw_status =readl (host->regs +SD_EMMC_STATUS ); - status = raw_status & irq_en; - cmd->error =0 ;if (status &IRQ_CRC_ERR ) {dev_dbg (host->dev,"CRC Error - status 0x%08x\n" , status); cmd->error = -EILSEQ ; - ret =IRQ_HANDLED ; + ret =IRQ_WAKE_THREAD ; goto out; }if (status &IRQ_TIMEOUTS ) {dev_dbg (host->dev,"Timeout - status 0x%08x\n" , status); cmd->error = -ETIMEDOUT ; - ret =IRQ_HANDLED ; + ret =IRQ_WAKE_THREAD ; goto out; }
@@ -1071,17 +1082,49 @@ out:/* ack all enabled interrupts */ writel (irq_en, host->regs +SD_EMMC_STATUS ); +if (cmd->error) { +/* Stop desc in case of errors */ +u32 start =readl (host->regs +SD_EMMC_START ); + + start &= ~START_DESC_BUSY ; +writel (start, host->regs +SD_EMMC_START ); + } +if (ret ==IRQ_HANDLED )meson_mmc_request_done (host->mmc, cmd->mrq); -else if (ret ==IRQ_NONE ) -dev_warn (host->dev, -"Unexpected IRQ! status=0x%08x, irq_en=0x%08x\n" , - raw_status, irq_en);spin_unlock (&host->lock);return ret; } +static int meson_mmc_wait_desc_stop (struct meson_host *host) +{ +int loop; +u32 status; + +/* +* It may sometimes take a while for it to actually halt. Here, we +* are giving it 5ms to comply +* +* If we don't confirm the descriptor is stopped, it might raise new +* IRQs after we have called mmc_request_done() which is bad. +*/ +for (loop =50 ; loop; loop--) { + status =readl (host->regs +SD_EMMC_STATUS ); +if (status & (STATUS_BUSY |STATUS_DESC_BUSY )) +udelay (100 ); +else +break ; + } + +if (status & (STATUS_BUSY |STATUS_DESC_BUSY )) { +dev_err (host->dev,"Timed out waiting for host to stop\n" ); +return -ETIMEDOUT ; + } + +return 0 ; +} +static irqreturn_t meson_mmc_irq_thread (int irq,void *dev_id) {struct meson_host *host = dev_id;
@@ -1092,6 +1135,13 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)if (WARN_ON (!cmd))return IRQ_NONE ; +if (cmd->error) { +meson_mmc_wait_desc_stop (host); +meson_mmc_request_done (host->mmc, cmd->mrq); + +return IRQ_HANDLED ; + } + data = cmd->data;if (meson_mmc_bounce_buf_read (data)) { xfer_bytes = data->blksz * data->blocks;
@@ -1132,6 +1182,9 @@ static void meson_mmc_cfg_init(struct meson_host *host) cfg |=FIELD_PREP (CFG_RC_CC_MASK ,ilog2 (SD_EMMC_CFG_CMD_GAP )); cfg |=FIELD_PREP (CFG_BLK_LEN_MASK ,ilog2 (SD_EMMC_CFG_BLK_SIZE )); +/* abort chain on R/W errors */ + cfg |=CFG_ERR_ABORT ; +writel (cfg, host->regs +SD_EMMC_CFG ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 105/321 iwlwifi: move iwl_nvm_check_version() into dvm
In reply to Greg Kroah-HartmanFrom: Luca Coelho <[email protected]>
[ Upstream commit 64866e5da1eabd0c52ff45029b245f5465920031 ]
This function is only half-used by mvm (i.e. only the nvm_version part matters, since the calibration version is irrelevant), so it's pointless to export it from iwlwifi. If mvm uses this function, it has the additional complexity of setting the calib version to a bogus value on all cfg structs.
To avoid this, move the function to dvm and make a simple comparison of the nvm_version in mvm instead.
--- drivers/net/wireless/intel/iwlwifi/dvm/main.c | 17 +++++++++++++++++ .../wireless/intel/iwlwifi/iwl-eeprom-parse.c | 19 ------------------- .../wireless/intel/iwlwifi/iwl-eeprom-parse.h | 5 ++--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 +++- 4 files changed, 22 insertions(+), 23 deletions(-)
drivers/net/wireless/intel/iwlwifi/dvm/main.c +17 -0
@@ -1227,6 +1227,23 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)return 0 ; } +static int iwl_nvm_check_version (struct iwl_nvm_data *data, +struct iwl_trans *trans) +{ +if (data->nvm_version >= trans->cfg->nvm_ver || + data->calib_version >= trans->cfg->nvm_calib_ver) { +IWL_DEBUG_INFO (trans,"device EEPROM VER=0x%x, CALIB=0x%x\n" , + data->nvm_version, data->calib_version); +return 0 ; + } + +IWL_ERR (trans, +"Unsupported (too old) EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n" , + data->nvm_version, trans->cfg->nvm_ver, + data->calib_version, trans->cfg->nvm_calib_ver); +return -EINVAL ; +} + static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, const struct iwl_fw *fw,
drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c +0 -19
@@ -928,22 +928,3 @@ iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg,return NULL ; }IWL_EXPORT_SYMBOL (iwl_parse_eeprom_data); - -/* helper functions */ -int iwl_nvm_check_version (struct iwl_nvm_data *data, -struct iwl_trans *trans) -{ -if (data->nvm_version >= trans->cfg->nvm_ver || - data->calib_version >= trans->cfg->nvm_calib_ver) { -IWL_DEBUG_INFO (trans,"device EEPROM VER=0x%x, CALIB=0x%x\n" , - data->nvm_version, data->calib_version); -return 0 ; - } - -IWL_ERR (trans, -"Unsupported (too old) EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n" , - data->nvm_version, trans->cfg->nvm_ver, - data->calib_version, trans->cfg->nvm_calib_ver); -return -EINVAL ; -} -IWL_EXPORT_SYMBOL (iwl_nvm_check_version);
drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h +2 -3
@@ -7,6 +7,7 @@* * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2015 Intel Mobile Communications GmbH +* Copyright (C) 2018 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -33,6 +34,7 @@* * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2015 Intel Mobile Communications GmbH +* Copyright (C) 2018 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -122,9 +124,6 @@ struct iwl_nvm_data * iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, const u8 *eeprom, size_t eeprom_size); -int iwl_nvm_check_version (struct iwl_nvm_data *data, -struct iwl_trans *trans); -int iwl_init_sband_channels (struct iwl_nvm_data *data,struct ieee80211_supported_band *sband,int n_channels,enum nl80211_band band);
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +3 -1
@@ -547,7 +547,9 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm)if (mvm->nvm_file_name)iwl_mvm_load_nvm_to_nic (mvm); -WARN_ON (iwl_nvm_check_version (mvm->nvm_data, mvm->trans)); +WARN_ONCE (mvm->nvm_data->nvm_version < mvm->trans->cfg->nvm_ver, +"Too old NVM version (0x%0x, required = 0x%0x)" , + mvm->nvm_data->nvm_version, mvm->trans->cfg->nvm_ver);/* * abort after reading the nvm in case RF Kill is on, we will complete
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 85/321 scsi: qla2xxx: Fix for FC-NVMe discovery for NPIV port
In reply to Greg Kroah-HartmanFrom: Giridhar Malavali <[email protected]>
[ Upstream commit 835aa4f2691e4ed4ed16de81f3cabf17a87a164f ]
This patch fixes NVMe discovery by setting SKIP_PRLI flag, so that PRLI is driven by driver and is retried when the NPIV port is detected to have NVMe capability.
--- drivers/scsi/qla2xxx/qla_attr.c | 2 ++ drivers/scsi/qla2xxx/qla_init.c | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +2 -0
@@ -2161,6 +2161,8 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags))msleep (1000 ); +qla_nvme_delete (vha); +qla24xx_disable_vp (vha);qla2x00_wait_for_sess_deletion (vha);
drivers/scsi/qla2xxx/qla_init.c +4 -6
@@ -242,15 +242,13 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,qla2x00_init_timer (sp,qla2x00_get_async_timeout (vha) +2 ); sp->done = qla2x00_async_login_sp_done; -if (N2N_TOPO (fcport->vha->hw) &&fcport_is_bigger (fcport)) { +if (N2N_TOPO (fcport->vha->hw) &&fcport_is_bigger (fcport)) lio->u.logio.flags |=SRB_LOGIN_PRLI_ONLY ; - }else { +else lio->u.logio.flags |=SRB_LOGIN_COND_PLOGI ; -if (fcport->fc4f_nvme) - lio->u.logio.flags |=SRB_LOGIN_SKIP_PRLI ; - - } +if (fcport->fc4f_nvme) + lio->u.logio.flags |=SRB_LOGIN_SKIP_PRLI ;ql_dbg (ql_dbg_disc, vha,0x2072 , "Async-login - %8phC hdl=%x, loopid=%x portid=%02x%02x%02x "
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 96/321 bcache: do not mark writeback_running too early
In reply to Greg Kroah-HartmanFrom: Shenghui Wang <[email protected]>
[ Upstream commit 79b791466e525c98f6aeee9acf5726e7b27f4231 ]
A fresh backing device is not attached to any cache_set, and has no writeback kthread created until first attached to some cache_set.
But bch_cached_dev_writeback_init run
"
dc->writeback_running = true; WARN_ON(test_and_clear_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags));
"
for any newly formatted backing devices.
For a fresh standalone backing device, we can get something like following even if no writeback kthread created:
------------------------
/sys/block/bcache0/bcache# cat writeback_running
1
/sys/block/bcache0/bcache# cat writeback_rate_debug
rate: 512.0k/sec
dirty: 0.0k
target: 0.0k
proportional: 0.0k
integral: 0.0k
change: 0.0k/sec
next io: -15427384ms
The none ZERO fields are misleading as no alive writeback kthread yet.
Set dc->writeback_running false as no writeback thread created in bch_cached_dev_writeback_init().
We have writeback thread created and woken up in bch_cached_dev_writeback _start(). Set dc->writeback_running true before bch_writeback_queue() called, as a writeback thread will check if dc->writeback_running is true before writing back dirty data, and hung if false detected.
After the change, we can get the following output for a fresh standalone backing device:
-----------------------/sys/block/bcache0/bcache$ cat writeback_running
0
/sys/block/bcache0/bcache# cat writeback_rate_debug
rate: 0.0k/sec
dirty: 0.0k
target: 0.0k
proportional: 0.0k
integral: 0.0k
change: 0.0k/sec
next io: 0ms
v1 -> v2:
Set dc->writeback_running before bch_writeback_queue() called,
--- drivers/md/bcache/writeback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/bcache/writeback.c +2 -1
@@ -781,7 +781,7 @@ void bch_cached_dev_writeback_init(struct cached_dev *dc)bch_keybuf_init (&dc->writeback_keys); dc->writeback_metadata = true; - dc->writeback_running = true; + dc->writeback_running = false; dc->writeback_percent =10 ; dc->writeback_delay =30 ;atomic_long_set (&dc->writeback_rate.rate,1024 );
@@ -810,6 +810,7 @@ int bch_cached_dev_writeback_start(struct cached_dev *dc)destroy_workqueue (dc->writeback_write_wq);return PTR_ERR (dc->writeback_thread); } + dc->writeback_running = true;WARN_ON (test_and_set_bit (BCACHE_DEV_WB_RUNNING , &dc->disk.flags)); schedule_delayed_work(&dc->writeback_rate_update,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 94/321 rtl818x: fix potential use after free
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
[ Upstream commit afbb1947db94eacc5a13302eee88a9772fb78935 ]
entry is released via usb_put_urb just after calling usb_submit_urb. However, entry is used if the submission fails, resulting in a use after free bug. The patch fixes this.
--- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c +2 -1
@@ -444,12 +444,13 @@ static int rtl8187_init_urbs(struct ieee80211_hw *dev)skb_queue_tail (&priv->rx_queue, skb);usb_anchor_urb (entry, &priv->anchored); ret =usb_submit_urb (entry,GFP_KERNEL ); -usb_put_urb (entry);if (ret) {skb_unlink (skb, &priv->rx_queue);usb_unanchor_urb (entry); +usb_put_urb (entry); goto err; } +usb_put_urb (entry); }return ret;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 48/321 scsi: lpfc: Fix kernel Oops due to null pring pointers
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 5a9eeff57f340238c39c95d8e7e54c96fc722de7 ]
Driver is hitting null pring pointers in lpfc_do_work().
Pointer assignment occurs based on SLI-revision. If recovering after an error, its possible the sli revision for the port was cleared, making the lpfc_phba_elsring() not return a ring pointer, thus the null pointer.
Add SLI revision checking to lpfc_phba_elsring() and status checking to all callers.
--- drivers/scsi/lpfc/lpfc.h | 6 ++++++ drivers/scsi/lpfc/lpfc_els.c | 2 ++ drivers/scsi/lpfc/lpfc_init.c | 7 ++++++- drivers/scsi/lpfc/lpfc_sli.c | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc.h +6 -0
@@ -1236,6 +1236,12 @@ lpfc_sli_read_hs(struct lpfc_hba *phba)static inline struct lpfc_sli_ring *lpfc_phba_elsring (struct lpfc_hba *phba) { +/* Return NULL if sli_rev has become invalid due to bad fw */ +if (phba->sli_rev !=LPFC_SLI_REV4 && + phba->sli_rev !=LPFC_SLI_REV3 && + phba->sli_rev !=LPFC_SLI_REV2 ) +return NULL ; +if (phba->sli_rev ==LPFC_SLI_REV4 ) {if (phba->sli4_hba.els_wq)return phba->sli4_hba.els_wq->pring;
drivers/scsi/lpfc/lpfc_els.c +2 -0
@@ -1343,6 +1343,8 @@ lpfc_els_abort_flogi(struct lpfc_hba *phba) Fabric_DID); pring =lpfc_phba_elsring (phba); +if (unlikely (!pring)) +return -EIO ;/* * Check the txcmplq for an iocb that matches the nport the driver is
drivers/scsi/lpfc/lpfc_init.c +6 -1
@@ -1801,7 +1801,12 @@ lpfc_sli4_port_sta_fn_reset(struct lpfc_hba *phba, int mbx_action,lpfc_offline (phba);/* release interrupt for possible resource change */ lpfc_sli4_disable_intr (phba); -lpfc_sli_brdrestart (phba); + rc =lpfc_sli_brdrestart (phba); +if (rc) { +lpfc_printf_log (phba,KERN_ERR ,LOG_INIT , +"6309 Failed to restart board\n" ); +return rc; + }/* request and enable interrupt */ intr_mode =lpfc_sli4_enable_intr (phba, phba->intr_mode);if (intr_mode ==LPFC_INTR_ERROR ) {
drivers/scsi/lpfc/lpfc_sli.c +2 -0
@@ -4640,6 +4640,8 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba) hba_aer_enabled = phba->hba_flag &HBA_AER_ENABLED ; rc =lpfc_sli4_brdreset (phba); +if (rc) +return rc;spin_lock_irq (&phba->hbalock); phba->pport->stopped =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 49/321 scsi: lpfc: Fix dif and first burst use in write commands
In reply to Greg Kroah-HartmanFrom: James Smart <[email protected]>
[ Upstream commit 7c4042a4d0b7532cfbc90478fd3084b2dab5849e ]
When dif and first burst is used in a write command wqe, the driver was not properly setting fields in the io command request. This resulted in no dif bytes being sent and invalid xfer_rdy's, resulting in the io being aborted by the hardware.
Correct the wqe initializaton when both dif and first burst are used.
--- drivers/scsi/lpfc/lpfc_scsi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/scsi/lpfc/lpfc_scsi.c +18 -0
@@ -2732,6 +2732,7 @@ lpfc_bg_scsi_prep_dma_buf_s3(struct lpfc_hba *phba,int datasegcnt, protsegcnt, datadir = scsi_cmnd->sc_data_direction;int prot_group_type =0 ;int fcpdl; +struct lpfc_vport *vport = phba->pport;/* * Start the lpfc command prep by bumping the bpl beyond fcp_cmnd
@@ -2837,6 +2838,14 @@ lpfc_bg_scsi_prep_dma_buf_s3(struct lpfc_hba *phba,*/ iocb_cmd->un.fcpi.fcpi_parm = fcpdl; +/* +* For First burst, we may need to adjust the initial transfer +* length for DIF +*/ +if (iocb_cmd->un.fcpi.fcpi_XRdy && + (fcpdl < vport->cfg_first_burst_size)) + iocb_cmd->un.fcpi.fcpi_XRdy = fcpdl; +return 0 ; err:if (lpfc_cmd->seg_cnt)
@@ -3401,6 +3410,7 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba,int datasegcnt, protsegcnt, datadir = scsi_cmnd->sc_data_direction;int prot_group_type =0 ;int fcpdl; +struct lpfc_vport *vport = phba->pport;/* * Start the lpfc command prep by bumping the sgl beyond fcp_cmnd
@@ -3516,6 +3526,14 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba,*/ iocb_cmd->un.fcpi.fcpi_parm = fcpdl; +/* +* For First burst, we may need to adjust the initial transfer +* length for DIF +*/ +if (iocb_cmd->un.fcpi.fcpi_XRdy && + (fcpdl < vport->cfg_first_burst_size)) + iocb_cmd->un.fcpi.fcpi_XRdy = fcpdl; +/* * If the OAS driver feature is enabled and the lun is enabled for * OAS, set the oas iocb related flags.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 40/321 net: bcmgenet: reapply manual settings to the PHY
In reply to Greg Kroah-HartmanFrom: Doug Berger <[email protected]>
[ Upstream commit 0686bd9d5e6863f60e4bb1e78e6fe7bb217a0890 ]
The phy_init_hw() function may reset the PHY to a configuration that does not match manual network settings stored in the phydev structure. If the phy state machine is polled rather than event driven this can create a timing hazard where the phy state machine might alter the settings stored in the phydev structure from the value read from the BMCR.
This commit follows invocations of phy_init_hw() by the bcmgenet driver with invocations of the genphy_config_aneg() function to ensure that the BMCR is written to match the settings held in the phydev structure. This prevents the risk of manual settings being accidentally altered.
--- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +4 -1
@@ -2619,8 +2619,10 @@ static void bcmgenet_irq_task(struct work_struct *work)spin_unlock_irq (&priv->lock);if (status &UMAC_IRQ_PHY_DET_R && - priv->dev->phydev->autoneg !=AUTONEG_ENABLE ) + priv->dev->phydev->autoneg !=AUTONEG_ENABLE ) {phy_init_hw (priv->dev->phydev); +genphy_config_aneg (priv->dev->phydev); + }/* Link UP/DOWN event */ if (status &UMAC_IRQ_LINK_EVENT )
@@ -3673,6 +3675,7 @@ static int bcmgenet_resume(struct device *d)phy_init_hw (dev->phydev);/* Speed settings must be restored */ +genphy_config_aneg (dev->phydev);bcmgenet_mii_config (priv->dev, false);bcmgenet_set_hw_addr (priv, dev->dev_addr);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 82/321 ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 1a2fa02f7489dc4d746f2a15fb77b3ce1affade8 ]
Ignore acpi_device_fix_up_power() return value. If we return an error we end up with acpi_default_enumeration() still creating a platform- device for the device and we end up with the device still being used but without the special LPSS related handling which is not useful.
Specicifically ignoring the error fixes the touchscreen no longer working after a suspend/resume on a Prowise PT301 tablet.
This tablet has a broken _PS0 method on the touchscreen's I2C controller, causing acpi_device_fix_up_power() to fail, causing fallback to standard platform-dev handling and specifically causing acpi_lpss_save/restore_ctx to not run.
The I2C controllers _PS0 method does actually turn on the device, but then does some more nonsense which fails when run during early boot trying to use I2C opregion handling on another not-yet registered I2C controller.
--- drivers/acpi/acpi_lpss.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/acpi/acpi_lpss.c +1 -6
@@ -665,12 +665,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,* have _PS0 and _PS3 without _PSC (and no power resources), so * acpi_bus_init_power() will assume that the BIOS has put them into D0. */ - ret =acpi_device_fix_up_power (adev); -if (ret) { -/* Skip the device, but continue the namespace scan. */ - ret =0 ; - goto err_out; - } +acpi_device_fix_up_power (adev); adev->driver_data = pdata; pdev =acpi_create_platform_device (adev, dev_desc->properties);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 77/321 arm64: preempt: Fix big-endian when checking preempt count in assembly
In reply to Greg Kroah-HartmanFrom: Will Deacon <[email protected]>
[ Upstream commit 7faa313f05cad184e8b17750f0cbe5216ac6debb ]
Commit 396244692232 ("arm64: preempt: Provide our own implementation of asm/preempt.h") extended the preempt count field in struct thread_info to 64 bits, so that it consists of a 32-bit count plus a 32-bit flag indicating whether or not the current task needs rescheduling.
Whilst the asm-offsets definition of TSK_TI_PREEMPT was updated to point to this new field, the assembly usage was left untouched meaning that a 32-bit load from TSK_TI_PREEMPT on a big-endian machine actually returns the reschedule flag instead of the count.
Whilst we could fix this by pointing TSK_TI_PREEMPT at the count field, we're actually better off reworking the two assembly users so that they operate on the whole 64-bit value in favour of inspecting the thread flags separately in order to determine whether a reschedule is needed.
--- arch/arm64/include/asm/assembler.h | 8 +++----- arch/arm64/kernel/entry.S | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-)
arch/arm64/include/asm/assembler.h +3 -5
@@ -683,11 +683,9 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU .macro if_will_cond_yield_neon#ifdef CONFIG_PREEMPT get_thread_info x0 - ldr w1, [x0, #TSK_TI_PREEMPT] - ldr x0, [x0, #TSK_TI_FLAGS] - cmp w1, #PREEMPT_DISABLE_OFFSET - csel x0, x0, xzr, eq - tbnz x0, #TIF_NEED_RESCHED, .Lyield_\@ // needs rescheduling? + ldr x0, [x0, #TSK_TI_PREEMPT] + sub x0, x0, #PREEMPT_DISABLE_OFFSET + cbz x0, .Lyield_\@ /* fall through to endif_yield_neon */ .subsection 1 .Lyield_\@ :
arch/arm64/kernel/entry.S +2 -4
@@ -622,10 +622,8 @@ el1_irq: irq_handler #ifdef CONFIG_PREEMPT - ldr w24, [tsk, #TSK_TI_PREEMPT] // get preempt count - cbnz w24, 1f // preempt count != 0 - ldr x0, [tsk, #TSK_TI_FLAGS] // get flags - tbz x0, #TIF_NEED_RESCHED, 1f // needs rescheduling? + ldr x24, [tsk, #TSK_TI_PREEMPT] // get preempt count + cbnz x24, 1f // preempt count != 0 bl el1_preempt 1: #endif
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 75/321 ARM: OMAP1: fix USB configuration for device-only setups
In reply to Greg Kroah-HartmanFrom: Aaro Koskinen <[email protected]>
[ Upstream commit c7b7b5cbd0c859b1546a5a3455d457708bdadf4c ]
Currently we do USB configuration only if the host mode (CONFIG_USB) is enabled. But it should be done also in the case of device-only setups, so change the condition to CONFIG_USB_SUPPORT. This allows to use omap_udc on Palm Tungsten E.
--- arch/arm/mach-omap1/Makefile | 2 +- arch/arm/mach-omap1/include/mach/usb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/Makefile +1 -1
@@ -25,7 +25,7 @@ obj-y += $(i2c-omap-m) $(i2c-omap-y) led-y := leds.o -usb-fs-$(CONFIG_USB) := usb.o +usb-fs-$(CONFIG_USB_SUPPORT) := usb.o obj-y += $(usb-fs-m) $(usb-fs-y) # Specific board support
arch/arm/mach-omap1/include/mach/usb.h +1 -1
@@ -11,7 +11,7 @@#include <linux/platform_data/usb-omap1.h> -#if IS_ENABLED (CONFIG_USB ) +#if IS_ENABLED (CONFIG_USB_SUPPORT )void omap1_usb_init (struct omap_usb_config *pdata);#else static inline void omap1_usb_init (struct omap_usb_config *pdata)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 76/321 RDMA/hns: Fix the bug while use multi-hop of pbl
In reply to Greg Kroah-HartmanFrom: Lijun Ou <[email protected]>
[ Upstream commit 4af07f01f7a787ba5158352b98c9e3cb74995a1c ]
It will prevent multiply overflow when defines the pbl for u64 type.
--- drivers/infiniband/hw/hns/hns_roce_mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/hns/hns_roce_mr.c +2 -2
@@ -1017,14 +1017,14 @@ struct ib_mr *hns_roce_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, goto err_umem; } }else { -int pbl_size =1 ; +u64 pbl_size =1 ; bt_size = (1 << (hr_dev->caps.pbl_ba_pg_sz +PAGE_SHIFT )) /8 ;for (i =0 ; i < hr_dev->caps.pbl_hop_num; i++) pbl_size *= bt_size;if (n > pbl_size) {dev_err (dev, -" MR len %lld err. MR page num is limited to %d!\n" , +" MR len %lld err. MR page num is limited to %lld!\n" , length, pbl_size); ret = -EINVAL ; goto err_umem;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 68/321 parisc: Fix serio address output
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
[ Upstream commit 785145171d17af2554128becd6a7c8f89e101141 ]
We want the hpa addresses printed in the serio modules, not some virtual ioremap()ed address, e.g.:
serio: gsc-ps2-keyboard port at 0xf0108000 irq 22 @ 2:0:11
serio: gsc-ps2-mouse port at 0xf0108100 irq 22 @ 2:0:12
--- drivers/input/serio/gscps2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/serio/gscps2.c +2 -2
@@ -381,9 +381,9 @@ static int __init gscps2_probe(struct parisc_device *dev) goto fail;#endif -printk (KERN_INFO "serio: %s port at 0x%p irq %d @ %s\n" , +pr_info ("serio: %s port at 0x%08lx irq %d @ %s\n" , ps2port->port->name, - ps2port->addr, + hpa, ps2port->padev->irq, ps2port->port->phys);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 63/321 ARM: dts: imx23: Fix memory node duplication
In reply to Greg Kroah-HartmanFrom: Fabio Estevam <[email protected]>
[ Upstream commit b629e83520fafe6f4c2f3e8c88c78a496fc4987c ]
Boards based on imx23 have duplicate memory nodes:
- One coming from the board dts file: memory@
- One coming from the imx23.dtsi file.
Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts.
--- arch/arm/boot/dts/imx23-evk.dts | 1 + arch/arm/boot/dts/imx23-olinuxino.dts | 1 + arch/arm/boot/dts/imx23-sansa.dts | 1 + arch/arm/boot/dts/imx23-stmp378x_devb.dts | 1 + arch/arm/boot/dts/imx23-xfi3.dts | 1 + arch/arm/boot/dts/imx23.dtsi | 2 -- 6 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx23-evk.dts +1 -0
@@ -10,6 +10,7 @@ compatible = "fsl,imx23-evk", "fsl,imx23"; memory@40000000 { + device_type = "memory"; reg = <0x40000000 0x08000000>; };
arch/arm/boot/dts/imx23-olinuxino.dts +1 -0
@@ -20,6 +20,7 @@ compatible = "olimex,imx23-olinuxino", "fsl,imx23"; memory@40000000 { + device_type = "memory"; reg = <0x40000000 0x04000000>; };
arch/arm/boot/dts/imx23-sansa.dts +1 -0
@@ -50,6 +50,7 @@ compatible = "sandisk,sansa_fuze_plus", "fsl,imx23"; memory@40000000 { + device_type = "memory"; reg = <0x40000000 0x04000000>; };
arch/arm/boot/dts/imx23-stmp378x_devb.dts +1 -0
@@ -17,6 +17,7 @@ compatible = "fsl,stmp378x-devb", "fsl,imx23"; memory@40000000 { + device_type = "memory"; reg = <0x40000000 0x04000000>; };
arch/arm/boot/dts/imx23-xfi3.dts +1 -0
@@ -49,6 +49,7 @@ compatible = "creative,x-fi3", "fsl,imx23"; memory@40000000 { + device_type = "memory"; reg = <0x40000000 0x04000000>; };
arch/arm/boot/dts/imx23.dtsi +0 -2
@@ -13,10 +13,8 @@ * The decompressor and also some bootloaders rely on a * pre-existing /chosen node to be available to insert the * command line and merge other ATAGS info. - * Also for U-Boot there must be a pre-existing /memory node. */ chosen {}; - memory { device_type = "memory"; }; aliases { gpio0 = &gpio0;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 42/321 ceph: return -EINVAL if given fsc mount option on kernel w/o support
In reply to Greg Kroah-HartmanFrom: Jeff Layton <[email protected]>
[ Upstream commit ff29fde84d1fc82f233c7da0daa3574a3942bec7 ]
If someone requests fscache on the mount, and the kernel doesn't support it, it should fail the mount.
[ Drop ceph prefix -- it's provided by pr_err. ]
--- fs/ceph/super.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
fs/ceph/super.c +10 -1
@@ -248,6 +248,7 @@ static int parse_fsopt_token(char *c, void *private)return -ENOMEM ;break ;case Opt_fscache_uniq: +#ifdef CONFIG_CEPH_FSCACHE kfree (fsopt->fscache_uniq); fsopt->fscache_uniq = kstrndup(argstr[0].from, argstr[0].to-argstr[0].from,
@@ -256,7 +257,10 @@ static int parse_fsopt_token(char *c, void *private)return -ENOMEM ; fsopt->flags |=CEPH_MOUNT_OPT_FSCACHE ;break ; -/* misc */ +#else +pr_err ("fscache support is disabled\n" ); +return -EINVAL ; +#endif case Opt_wsize:if (intval < (int )PAGE_SIZE || intval >CEPH_MAX_WRITE_SIZE )return -EINVAL ;
@@ -328,10 +332,15 @@ static int parse_fsopt_token(char *c, void *private) fsopt->flags &= ~CEPH_MOUNT_OPT_INO32 ;break ;case Opt_fscache: +#ifdef CONFIG_CEPH_FSCACHE fsopt->flags |=CEPH_MOUNT_OPT_FSCACHE ;kfree (fsopt->fscache_uniq); fsopt->fscache_uniq =NULL ;break ; +#else +pr_err ("fscache support is disabled\n" ); +return -EINVAL ; +#endif case Opt_nofscache: fsopt->flags &= ~CEPH_MOUNT_OPT_FSCACHE ;kfree (fsopt->fscache_uniq);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 57/321 ARM: dts: imx35: Fix memory node duplication
In reply to Greg Kroah-HartmanFrom: Fabio Estevam <[email protected]>
[ Upstream commit 8721610a6c2b8c42fc57819d8c3bfbb9166f95a3 ]
Boards based on imx35 have duplicate memory nodes:
- One coming from the board dts file: memory@
- One coming from the imx35.dtsi file.
Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts.
--- arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi | 1 + arch/arm/boot/dts/imx35-pdk.dts | 1 + arch/arm/boot/dts/imx35.dtsi | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi +1 -0
@@ -18,6 +18,7 @@ compatible = "eukrea,cpuimx35", "fsl,imx35"; memory@80000000 { + device_type = "memory"; reg = <0x80000000 0x8000000>; /* 128M */ }; };
arch/arm/boot/dts/imx35-pdk.dts +1 -0
@@ -11,6 +11,7 @@ compatible = "fsl,imx35-pdk", "fsl,imx35"; memory@80000000 { + device_type = "memory"; reg = <0x80000000 0x8000000>, <0x90000000 0x8000000>; };
arch/arm/boot/dts/imx35.dtsi +0 -2
@@ -13,10 +13,8 @@ * The decompressor and also some bootloaders rely on a * pre-existing /chosen node to be available to insert the * command line and merge other ATAGS info. - * Also for U-Boot there must be a pre-existing /memory node. */ chosen {}; - memory { device_type = "memory"; }; aliases { ethernet0 = &fec;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainercover 4.19.88-stable review
This is the start of the stable review cycle for the 4.19.88 release. There are 321 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 Thu, 05 Dec 2019 22:30:32 +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.19.88-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.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.19.88-rc1
Hans de Goede <[email protected]>
platform/x86: hp-wmi: Fix ACPI errors caused by passing 0 as input size
Hans de Goede <[email protected]>
platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer
Pierre-Yves MORDRET <[email protected]>
dmaengine: stm32-dma: check whether length is aligned on FIFO threshold
Wen Yang <[email protected]>
ASoC: stm32: sai: add missing put_device()
Olivier Moysan <[email protected]>
ASoC: stm32: i2s: fix IRQ clearing
Olivier Moysan <[email protected]>
ASoC: stm32: i2s: fix 16 bit format support
Olivier Moysan <[email protected]>
ASoC: stm32: i2s: fix dma configuration
Alexandre Torgue <[email protected]>
pinctrl: stm32: fix memory leak issue
Fabien Dessenne <[email protected]>
mailbox: mailbox-test: fix null pointer if no mmio
Gabriel Fernandez <[email protected]>
clk: stm32mp1: parent clocks update
Gabriel Fernandez <[email protected]>
clk: stm32mp1: add CLK_SET_RATE_NO_REPARENT to Kernel clocks
Gabriel Fernandez <[email protected]>
clk: stm32mp1: fix mcu divider table
Gabriel Fernandez <[email protected]>
clk: stm32mp1: fix HSI divider flag
Lionel Debieve <[email protected]>
hwrng: stm32 - fix unbalanced pm_runtime_enable
Hugues Fruchet <[email protected]>
media: stm32-dcmi: fix check of pm_runtime_get_sync return value
Hugues Fruchet <[email protected]>
media: stm32-dcmi: fix DMA corruption when stopping streaming
Lionel Debieve <[email protected]>
crypto: stm32/hash - Fix hmac issue more than 256 bytes
Candle Sun <[email protected]>
HID: core: check whether Usage Page item is after Usage ID items
Yuchung Cheng <[email protected]>
tcp: exit if nothing to retransmit on RTO timeout
Arnaud Pouliquen <[email protected]>
mailbox: stm32_ipcc: add spinlock to fix channels concurrent access
Claudiu Beznea <[email protected]>
drm/atmel-hlcdc: revert shift by 8
huijin.park <[email protected]>
mtd: spi-nor: cast to u64 to avoid uint overflows
Wen Yang <[email protected]>
mtd: rawnand: atmel: fix possible object reference leak
Miquel Raynal <[email protected]>
mtd: rawnand: atmel: Fix spelling mistake in error message
Paul Thomas <[email protected]>
net: macb driver, check for SKBTX_HW_TSTAMP
Harini Katakam <[email protected]>
net: macb: Fix SUBNS increment and increase resolution
Eugen Hristev <[email protected]>
watchdog: sama5d4: fix WDD value to be always set to max
Theodore Ts'o <[email protected]>
ext4: add more paranoia checking in ext4_expand_extra_isize handling
Chuhong Yuan <[email protected]>
net: macb: add missed tasklet_kill
Dust Li <[email protected]>
net: sched: fix tc -s class show no bstats on class with nolock subqueues
Xin Long <[email protected]>
sctp: cache netns in sctp_ep_common
John Rutherford <[email protected]>
tipc: fix link name length check
Jakub Kicinski <[email protected]>
selftests: bpf: test_sockmap: handle file creation failures gracefully
Paolo Abeni <[email protected]>
openvswitch: remove another BUG_ON()
Paolo Abeni <[email protected]>
openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info()
Jouni Hogander <[email protected]>
slip: Fix use-after-free Read in slip_open
Navid Emamdoost <[email protected]>
sctp: Fix memory leak in sctp_sf_do_5_2_4_dupcook
Paolo Abeni <[email protected]>
openvswitch: fix flow command message size
Nikolay Aleksandrov <[email protected]>
net: psample: fix skb_over_panic
Menglong Dong <[email protected]>
macvlan: schedule bc_work even if error
Eugen Hristev <[email protected]>
media: atmel: atmel-isc: fix INIT_WORK misplacement
Eugen Hristev <[email protected]>
media: atmel: atmel-isc: fix asd memory allocation
Uwe Kleine-König <[email protected]>
pwm: Clear chip_data in pwm_put()
Luca Ceresoli <[email protected]>
net: macb: fix error format in dev_err()
Eugen Hristev <[email protected]>
media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
Steffen Klassert <[email protected]>
xfrm: Fix memleak on xfrm state destroy
Mika Westerberg <[email protected]>
thunderbolt: Power cycle the router if NVM authentication fails
Alexander Usyskin <[email protected]>
mei: me: add comet point V device id
Alexander Usyskin <[email protected]>
mei: bus: prefix device names on bus with the bus name
Fabio D'Urso <[email protected]>
USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P
Hans de Goede <[email protected]>
staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-ids
Hans de Goede <[email protected]>
staging: rtl8723bs: Drop ACPI device ids
Pan Bian <[email protected]>
staging: rtl8192e: fix potential use after free
Mathias Kresin <[email protected]>
usb: dwc2: use a longer core rest timeout in dwc2_core_reset()
Alexandre Belloni <[email protected]>
clk: at91: generated: set audio_pll_allowed in at91_clk_register_generated()
Eugen Hristev <[email protected]>
clk: at91: fix update bit maps on CFG_MOR write
Sean Christopherson <[email protected]>
KVM: nVMX: assimilate nested_vmx_entry_failure() into nested_vmx_enter_non_root_mode()
Sean Christopherson <[email protected]>
KVM: nVMX: rename enter_vmx_non_root_mode to nested_vmx_enter_non_root_mode
Vlastimil Babka <[email protected]>
mm, gup: add missing refcount overflow checks on s390
Boris Brezillon <[email protected]>
mtd: Remove a debug trace in mtdpart.c
Jesper Dangaard Brouer <[email protected]>
xdp: fix cpumap redirect SKB creation bug
Gen Zhang <[email protected]>
powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
Hui Wang <[email protected]>
ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board
YueHaibing <[email protected]>
RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp
Yixian Liu <[email protected]>
RDMA/hns: Fix the state of rereg mr
Lijun Ou <[email protected]>
RDMA/hns: Bugfix for the scene without receiver queue
Lijun Ou <[email protected]>
RDMA/hns: Fix the bug with updating rq head pointer when flush cqe
John Garry <[email protected]>
scsi: libsas: Check SMP PHY control function result
Xiang Chen <[email protected]>
scsi: hisi_sas: shutdown axi bus to avoid exception CQ returned
James Morse <[email protected]>
ACPI / APEI: Switch estatus pool to use vmalloc memory
James Morse <[email protected]>
ACPI / APEI: Don't wait to serialise with oops messages when panic()ing
John Garry <[email protected]>
scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery
Chris Coulson <[email protected]>
apparmor: delete the dentry in aafs_remove() to avoid a leak
Aaron Ma <[email protected]>
iommu/amd: Fix NULL dereference bug in match_hid_uid
Peng Li <[email protected]>
net: hns3: fix an issue for hns3_update_new_int_gl
Peng Li <[email protected]>
net: hns3: fix an issue for hclgevf_ae_get_hdev
Yunsheng Lin <[email protected]>
net: hns3: fix PFC not setting problem for DCB module
Yunsheng Lin <[email protected]>
net: hns3: Change fw error code NOT_EXEC to NOT_SUPPORTED
Peng Sun <[email protected]>
bpf: drop refcount if bpf_map_new_fd() fails in map_create()
Greg Kroah-Hartman <[email protected]>
kvm: properly check debugfs dentry before using it
Andy Shevchenko <[email protected]>
net: dev: Use unsigned integer as an argument to left-shift
Ming Lei <[email protected]>
mmc: core: align max segment size with logical block size
Peng Sun <[email protected]>
bpf: decrease usercnt if bpf_map_new_fd() fails in bpf_map_get_fd_by_id()
Maciej Kwiecien <[email protected]>
sctp: don't compare hb_timer expire date before starting it
Lorenzo Bianconi <[email protected]>
net: ip6_gre: do not report erspan_ver for ip6gre or ip6gretap
Lorenzo Bianconi <[email protected]>
net: ip_gre: do not report erspan_ver for gre or gretap
Eric Dumazet <[email protected]>
net: fix possible overflow in __sk_mem_raise_allocated()
Matteo Croce <[email protected]>
geneve: change NET_UDP_TUNNEL dependency to select
Bert Kenward <[email protected]>
sfc: initialise found bitmap in efx_ef10_mtd_probe
Sylwester Nawrocki <[email protected]>
ASoC: samsung: i2s: Fix prescaler setting for the secondary DAI
Hoang Le <[email protected]>
tipc: fix skb may be leaky in tipc_link_input
Ursula Braun <[email protected]>
net/smc: fix byte_order for rx_curs_confirmed
Jan Kara <[email protected]>
blktrace: Show requests without sector
Ursula Braun <[email protected]>
net/smc: fix sender_free computation
Brian Foster <[email protected]>
xfs: end sync buffer I/O properly on shutdown error
Qian Cai <[email protected]>
mm/hotplug: invalid PFNs from pfn_to_online_page()
Karsten Graul <[email protected]>
net/smc: don't wait for send buffer space when data was already sent
Karsten Graul <[email protected]>
net/smc: prevent races between smc_lgr_terminate() and smc_conn_free()
Johannes Berg <[email protected]>
decnet: fix DN_IFREQ_SIZE
wenxu <[email protected]>
ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel
Edward Cree <[email protected]>
sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe
Lucas Stach <[email protected]>
gpu: ipu-v3: pre: don't trigger update if buffer address doesn't change
He Zhe <[email protected]>
serial: 8250: Fix serial8250 initialization crash
Konstantin Khlebnikov <[email protected]>
net/core/neighbour: fix kmemleak minimal reference count for hash tables
Ming Lei <[email protected]>
PCI/MSI: Return -ENOSPC from pci_alloc_irq_vectors_affinity()
Miquel Raynal <[email protected]>
ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs
Konstantin Khlebnikov <[email protected]>
net/core/neighbour: tell kmemleak about hash tables
Gustavo A. R. Silva <[email protected]>
tipc: fix memory leak in tipc_nl_compat_publ_dump
Boris Brezillon <[email protected]>
mtd: Check add_mtd_device() ret code
Olof Johansson <[email protected]>
lib/genalloc.c: include vmalloc.h
Qian Cai <[email protected]>
drivers/base/platform.c: kmemleak ignore a known leak
Yi Wang <[email protected]>
fork: fix some -Wmissing-prototypes warnings
Huang Shijie <[email protected]>
lib/genalloc.c: use vzalloc_node() to allocate the bitmap
Alexey Skidanov <[email protected]>
lib/genalloc.c: fix allocation of aligned buffer from non-aligned chunk
James Morse <[email protected]>
firmware: arm_sdei: Fix DT platform device creation
Nicolas Saenz Julienne <[email protected]>
firmware: arm_sdei: fix wrong of_node_put() in init function
Aditya Pakki <[email protected]>
infiniband/qedr: Potential null ptr dereference of qp
Aditya Pakki <[email protected]>
infiniband: bnxt_re: qplib: Check the return value of send_message
Chuck Lever <[email protected]>
xprtrdma: Prevent leak of rpcrdma_rep objects
Kangjie Lu <[email protected]>
netfilter: nf_tables: fix a missing check of nla_put_failure
Anthony Yznaga <[email protected]>
tools/vm/page-types.c: fix "kpagecount returned fewer pages than expected" failures
Wentao Wang <[email protected]>
mm/page_alloc.c: deduplicate __memblock_free_early() and memblock_free()
Aaron Lu <[email protected]>
mm/page_alloc.c: use a single function to free page
Aaron Lu <[email protected]>
mm/page_alloc.c: free order-0 pages through PCP in page_frag_free()
Wei Yang <[email protected]>
vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n
Junxiao Bi <[email protected]>
ocfs2: clear journal dirty flag after shutdown journal
Wen Yang <[email protected]>
net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()
Kangjie Lu <[email protected]>
net: marvell: fix a missing check of acpi_match_device
Kangjie Lu <[email protected]>
tipc: fix a missing check of genlmsg_put
Kangjie Lu <[email protected]>
atl1e: checking the status of atl1e_write_phy_reg
Kangjie Lu <[email protected]>
net: dsa: bcm_sf2: Propagate error value from mdio_write
Kangjie Lu <[email protected]>
net: stmicro: fix a missing check of clk_prepare
Kangjie Lu <[email protected]>
net: (cpts) fix a missing check of clk_prepare
Richard Weinberger <[email protected]>
um: Make GCOV depend on !KCOV
Richard Weinberger <[email protected]>
um: Include sys/uio.h to have writev()
Chao Yu <[email protected]>
f2fs: fix to dirty inode synchronously
Qiuyang Sun <[email protected]>
f2fs: fix block address for __check_sit_bitmap
Aditya Pakki <[email protected]>
net/net_namespace: Check the return value of register_pernet_subsys()
Aditya Pakki <[email protected]>
net/netlink_compat: Fix a missing check of nla_parse_nested
Alexander Shiyan <[email protected]>
pwm: clps711x: Fix period calculation
Fabio Estevam <[email protected]>
crypto: mxc-scc - fix build warnings on ARM64
Benjamin Herrenschmidt <[email protected]>
powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y
Michael Ellerman <[email protected]>
powerpc/pseries: Fix node leak in update_lmb_associativity_index()
Christophe Leroy <[email protected]>
powerpc/83xx: handle machine check caused by watchdog timer
Kangjie Lu <[email protected]>
regulator: tps65910: fix a missing check of return value
Jesper Dangaard Brouer <[email protected]>
bpf/cpumap: make sure frame_size for build_skb is aligned if headroom isn't
Parav Pandit <[email protected]>
IB/rxe: Make counters thread safe
Luc Van Oostenryck <[email protected]>
drbd: fix print_st_err()'s prototype to match the definition
Lars Ellenberg <[email protected]>
drbd: do not block when adjusting "disk-options" while IO is frozen
Lars Ellenberg <[email protected]>
drbd: reject attach of unsuitable uuids even if connected
Lars Ellenberg <[email protected]>
drbd: ignore "all zero" peer volume sizes in handshake
Alexey Kardashevskiy <[email protected]>
powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status
Alexey Kardashevskiy <[email protected]>
vfio/spapr_tce: Get rid of possible infinite loop
Benjamin Herrenschmidt <[email protected]>
powerpc/44x/bamboo: Fix PCI range
Christophe Leroy <[email protected]>
powerpc/mm: Make NULL pointer deferences explicit on bad page faults.
Christophe Leroy <[email protected]>
powerpc/prom: fix early DEBUG messages
Joel Stanley <[email protected]>
powerpc/32: Avoid unsupported flags with clang
Madhavan Srinivasan <[email protected]>
powerpc/perf: Fix unit_sel/cache_sel checks
Kyle Roeschley <[email protected]>
ath6kl: Fix off by one error in scan completion
Kyle Roeschley <[email protected]>
ath6kl: Only use match sets when firmware supports it
Stefan Wahren <[email protected]>
brcmfmac: Fix access point mode
Varun Prakash <[email protected]>
scsi: csiostor: fix incorrect dma device in case of vport
Anatoliy Glagolev <[email protected]>
scsi: qla2xxx: deadlock by configfs_depend_item
Bart Van Assche <[email protected]>
RDMA/srp: Propagate ib_post_send() failures to the SCSI mid-layer
Geert Uytterhoeven <[email protected]>
openrisc: Fix broken paths to arch/or32
Alexander Shiyan <[email protected]>
serial: max310x: Fix tx_empty() callback
Jonathan Bakker <[email protected]>
Bluetooth: hci_bcm: Handle specific unknown packets after firmware loading
Kangjie Lu <[email protected]>
drivers/regulator: fix a missing check of return value
Christophe Leroy <[email protected]>
powerpc/xmon: fix dump_segments()
Christophe Leroy <[email protected]>
powerpc/book3s/32: fix number of bats in p/v_block_mapped()
Petr Machata <[email protected]>
vxlan: Fix error path in __vxlan_dev_create()
Tao Ren <[email protected]>
clocksource/drivers/fttmr010: Fix invalid interrupt register access
Dan Carpenter <[email protected]>
IB/qib: Fix an error code in qib_sdma_verbs_send()
Nick Bowler <[email protected]>
xfs: Fix bulkstat compat ioctls on x32 userspace.
Nick Bowler <[email protected]>
xfs: Align compat attrlist_by_handle with native implementation.
Heinz Mauelshagen <[email protected]>
dm raid: fix false -EBUSY when handling check/repair message
Bob Peterson <[email protected]>
gfs2: take jdata unstuff into account in do_grow
Sweet Tea <[email protected]>
dm flakey: Properly corrupt multi-page bios.
Peter Hutterer <[email protected]>
HID: doc: fix wrong data structure reference for UHID_OUTPUT
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 SEL_I2C1 field width
Michael Mueller <[email protected]>
KVM: s390: unregister debug feature on failing arch init
Vasundhara Volam <[email protected]>
bnxt_en: query force speeds before disabling autoneg mode.
Michael Chan <[email protected]>
bnxt_en: Save ring statistics before reset.
Vasundhara Volam <[email protected]>
bnxt_en: Return linux standard errors in bnxt_ethtool.c
Al Viro <[email protected]>
exofs_mount(): fix leaks on failure exits
Alin Nastac <[email protected]>
netfilter: nf_nat_sip: fix RTP/RTCP source port translations
Leon Romanovsky <[email protected]>
net/mlx5: Continue driver initialization despite debugfs failure
Martin Schiller <[email protected]>
pinctrl: xway: fix gpio-hog related boot issues
Linus Walleij <[email protected]>
memory: omap-gpmc: Get the header of the enum
Nathan Chancellor <[email protected]>
vfio-mdev/samples: Use u8 instead of char for handle functions
Masami Hiramatsu <[email protected]>
kprobes/x86: Show x86-64 specific blacklisted symbols correctly
Masami Hiramatsu <[email protected]>
kprobes: Blacklist symbols in arch-defined prohibited area
Ross Lagerwall <[email protected]>
xen/pciback: Check dev_data before using it
Andrea Righi <[email protected]>
kprobes/x86/xen: blacklist non-attachable xen interrupt functions
Darwin Dingel <[email protected]>
serial: 8250: Rate limit serial port rx interrupts during input overruns
Nicolas Saenz Julienne <[email protected]>
gpio: raspberrypi-exp: decrease refcount on firmware dt node
Pan Bian <[email protected]>
HID: intel-ish-hid: fixes incorrect error handling
Geert Uytterhoeven <[email protected]>
serial: sh-sci: Fix crash in rx_timer_fn() on PIO fallback
Josef Bacik <[email protected]>
btrfs: only track ref_heads in delayed_ref_updates
Filipe Manana <[email protected]>
Btrfs: allow clear_extent_dirty() to receive a cached extent state record
Anand Jain <[email protected]>
btrfs: dev-replace: set result code of cancel by status of scrub
Hans van Kranenburg <[email protected]>
btrfs: fix ncopies raid_attr for RAID56
Nikolay Borisov <[email protected]>
btrfs: Check for missing device before bio submission in btrfs_map_bio
Roger Quadros <[email protected]>
usb: ehci-omap: Fix deferred probe for phy handling
Boris Brezillon <[email protected]>
mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET
Jerome Brunet <[email protected]>
mmc: meson-gx: make sure the descriptor is stopped on errors
Lepton Wu <[email protected]>
VSOCK: bind to random port for VMADDR_PORT_ANY
Atul Gupta <[email protected]>
crypto/chelsio/chtls: listen fails with multiadapt
Jim Mattson <[email protected]>
kvm: vmx: Set IA32_TSC_AUX for legacy mode guests
Krzysztof Kozlowski <[email protected]>
gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB
Marek Vasut <[email protected]>
gpio: pca953x: Fix AI overflow on PCAL6524
Sara Sharon <[email protected]>
iwlwifi: pcie: set cmd_len in the correct place
Sara Sharon <[email protected]>
iwlwifi: pcie: fix erroneous print
Avraham Stern <[email protected]>
iwlwifi: mvm: force TCM re-evaluation on TCM resume
Luca Coelho <[email protected]>
iwlwifi: move iwl_nvm_check_version() into dvm
Masahiro Yamada <[email protected]>
microblaze: fix multiple bugs in arch/microblaze/boot/Makefile
Masahiro Yamada <[email protected]>
microblaze: move "... is ready" messages to arch/microblaze/Makefile
Masahiro Yamada <[email protected]>
microblaze: adjust the help to the real behavior
Pan Bian <[email protected]>
ubi: Do not drop UBI device reference before using
Pan Bian <[email protected]>
ubi: Put MTD device after it is not used
Gabor Juhos <[email protected]>
ubifs: Fix default compression selection in ubifs
Sagi Grimberg <[email protected]>
nvme: fix kernel paging oops
Darrick J. Wong <[email protected]>
xfs: require both realtime inodes to mount
Shenghui Wang <[email protected]>
bcache: do not mark writeback_running too early
Shenghui Wang <[email protected]>
bcache: do not check if debug dentry is ERR or NULL explicitly on remove
Pan Bian <[email protected]>
rtl818x: fix potential use after free
Madhan Mohan R <[email protected]>
brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373
Wright Feng <[email protected]>
brcmfmac: set F2 watermark to 256 for 4373
Brian Norris <[email protected]>
mwifiex: debugfs: correct histogram spacing, formatting
Pan Bian <[email protected]>
mwifiex: fix potential NULL dereference and use after free
Laurent Pinchart <[email protected]>
arm64: dts: renesas: draak: Fix CVBS input
Eric Biggers <[email protected]>
crypto: user - support incremental algorithm dumps
Harald Freudenberger <[email protected]>
s390/zcrypt: make sysfs reset attribute trigger queue reset
Jens Axboe <[email protected]>
nvme: provide fallback for discard alloc failure
Giridhar Malavali <[email protected]>
scsi: qla2xxx: Fix for FC-NVMe discovery for NPIV port
Himanshu Madhani <[email protected]>
scsi: qla2xxx: Fix NPIV handling for FC-NVMe
James Smart <[email protected]>
scsi: lpfc: Enable Management features for IF_TYPE=6
Hans de Goede <[email protected]>
ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
Arnd Bergmann <[email protected]>
ARM: ks8695: fix section mismatch warning
Dave Chinner <[email protected]>
xfs: zero length symlinks are not valid
Thomas Meyer <[email protected]>
PM / AVS: SmartReflex: NULL check before some freeing functions is not needed
Gal Pressman <[email protected]>
RDMA/vmw_pvrdma: Use atomic memory allocation in create AH
Will Deacon <[email protected]>
arm64: preempt: Fix big-endian when checking preempt count in assembly
Lijun Ou <[email protected]>
RDMA/hns: Fix the bug while use multi-hop of pbl
Aaro Koskinen <[email protected]>
ARM: OMAP1: fix USB configuration for device-only setups
Vadim Pasternak <[email protected]>
platform/x86: mlx-platform: Fix LED configuration
Tony Lindgren <[email protected]>
bus: ti-sysc: Check for no-reset and no-idle flags at the child level
Suzuki K Poulose <[email protected]>
arm64: smp: Handle errors reported by the firmware
Steve Capper <[email protected]>
arm64: mm: Prevent mismatched 52-bit VA support
Tony Lindgren <[email protected]>
ARM: dts: Fix hsi gdd range for omap4
Helge Deller <[email protected]>
parisc: Fix HP SDC hpa address output
Helge Deller <[email protected]>
parisc: Fix serio address output
Fabio Estevam <[email protected]>
ARM: dts: imx53-voipac-dmm-668: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx25: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx27: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx1: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx23: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx50: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx6sl: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx6sx: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx6ul: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx7: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx35: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx31: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx53: Fix memory node duplication
Fabio Estevam <[email protected]>
ARM: dts: imx51: Fix memory node duplication
Uwe Kleine-König <[email protected]>
ARM: debug-imx: only define DEBUG_IMX_UART_PORT if needed
Masami Hiramatsu <[email protected]>
tracing: Lock event_mutex before synth_event_mutex
Linus Walleij <[email protected]>
ARM: dts: Fix up SQ201 flash access
Ding Tao <[email protected]>
arm64: dts: marvell: armada-37xx: Enable emmc on espressobin
James Smart <[email protected]>
scsi: lpfc: Fix dif and first burst use in write commands
James Smart <[email protected]>
scsi: lpfc: Fix kernel Oops due to null pring pointers
Bart Van Assche <[email protected]>
scsi: target/tcmu: Fix queue_cmd_ring() declaration
Uwe Kleine-König <[email protected]>
pwm: bcm-iproc: Prevent unloading the driver module while in use
Dan Carpenter <[email protected]>
block: drbd: remove a stray unlock in __drbd_send_protocol()
Ahmed Zaki <[email protected]>
mac80211: fix station inactive_time shortly after boot
Toke Høiland-Jørgensen <[email protected]>
net/fq_impl: Switch to kvmalloc() for memory allocation
Jeff Layton <[email protected]>
ceph: return -EINVAL if given fsc mount option on kernel w/o support
Vladimir Oltean <[email protected]>
net: mscc: ocelot: fix __ocelot_rmw_ix prototype
Doug Berger <[email protected]>
net: bcmgenet: reapply manual settings to the PHY
Doug Berger <[email protected]>
net: bcmgenet: use RGMII loopback for MAC reset
Ilya Leoshkevich <[email protected]>
scripts/gdb: fix debugging modules compiled with hot/cold partitioning
Olivier Moysan <[email protected]>
ASoC: stm32: sai: add restriction on mmap support
Xingyu Chen <[email protected]>
watchdog: meson: Fix the wrong value of left time
Timo Schlüßler <[email protected]>
can: mcp251x: mcp251x_restart_work_handler(): Fix potential force_quit race condition
Marc Kleine-Budde <[email protected]>
can: flexcan: increase error counters if skb enqueueing via can_rx_offload_queue_sorted() fails
Marc Kleine-Budde <[email protected]>
can: rx-offload: can_rx_offload_irq_offload_fifo(): continue on error
Jeroen Hofstee <[email protected]>
can: rx-offload: can_rx_offload_irq_offload_timestamp(): continue on error
Marc Kleine-Budde <[email protected]>
can: rx-offload: can_rx_offload_offload_one(): use ERR_PTR() to propagate error value in case of errors
Marc Kleine-Budde <[email protected]>
can: rx-offload: can_rx_offload_offload_one(): increment rx_fifo_errors on queue overflow or OOM
Marc Kleine-Budde <[email protected]>
can: rx-offload: can_rx_offload_offload_one(): do not increase the skb_queue beyond skb_queue_len_max
Marc Kleine-Budde <[email protected]>
can: rx-offload: can_rx_offload_queue_tail(): fix error handling, avoid skb mem leak
Jeroen Hofstee <[email protected]>
can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
Jeroen Hofstee <[email protected]>
can: peak_usb: report bus recovery as well
Florian Westphal <[email protected]>
bridge: ebtables: don't crash when using dnat target in output chains
Chuhong Yuan <[email protected]>
net: fec: add missed clk_disable_unprepare in remove
Tony Lindgren <[email protected]>
clk: ti: clkctrl: Fix failed to enable error with double udelay timeout
Peter Ujfalusi <[email protected]>
clk: ti: dra7-atl-clock: Remove ti_clk_add_alias call
Xiaochen Shen <[email protected]>
x86/resctrl: Prevent NULL pointer dereference when reading mondata
Matthew Wilcox (Oracle) <[email protected]>
idr: Fix idr_alloc_u32 on 32-bit systems
Matthew Wilcox (Oracle) <[email protected]>
idr: Fix integer overflow in idr_for_each_entry
Eric Dumazet <[email protected]>
powerpc/bpf: Fix tail call implementation
Björn Töpel <[email protected]>
samples/bpf: fix build by setting HAVE_ATTR_TEST to zero
Ondrej Jirman <[email protected]>
ARM: dts: sun8i-a83t-tbs-a711: Fix WiFi resume from suspend
Colin Ian King <[email protected]>
clk: sunxi-ng: a80: fix the zero'ing of bits 16 and 18
Nathan Chancellor <[email protected]>
clk: sunxi: Fix operator precedence in sunxi_divs_clk_setup
Alexandre Belloni <[email protected]>
clk: at91: avoid sleeping early
Randy Dunlap <[email protected]>
reset: fix reset_control_ops kerneldoc comment
Fabio Estevam <[email protected]>
ARM: dts: imx6qdl-sabreauto: Fix storm of accelerometer interrupts
Andy Shevchenko <[email protected]>
pinctrl: cherryview: Allocate IRQ chip dynamic
Marek Szyprowski <[email protected]>
clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume
Russell King <[email protected]>
ASoC: kirkwood: fix device remove ordering
Russell King <[email protected]>
ASoC: kirkwood: fix external clock probe defer
Marek Szyprowski <[email protected]>
clk: samsung: exynos5433: Fix error paths
Kishon Vijay Abraham I <[email protected]>
reset: Fix memory leak in reset_control_array_put()
Xiaojun Sang <[email protected]>
ASoC: compress: fix unsigned integer overflow check
Stephan Gerhold <[email protected]>
ASoC: msm8916-wcd-analog: Fix RX1 selection in RDAC2 MUX
Fabien Parent <[email protected]>
clocksource/drivers/mediatek: Fix error handling
Martin Blumenstingl <[email protected]>
clk: meson: gxbb: let sar_adc_clk_div set the parent clock rate
-------------
Diffstat:
Documentation/hid/uhid.txt | 2 +- Makefile | 4 +- arch/arm/Kconfig.debug | 28 +++---- arch/arm/boot/dts/gemini-sq201.dts | 37 ++------- arch/arm/boot/dts/imx1-ads.dts | 1 + arch/arm/boot/dts/imx1-apf9328.dts | 1 + arch/arm/boot/dts/imx1.dtsi | 2 - arch/arm/boot/dts/imx23-evk.dts | 1 + arch/arm/boot/dts/imx23-olinuxino.dts | 1 + arch/arm/boot/dts/imx23-sansa.dts | 1 + arch/arm/boot/dts/imx23-stmp378x_devb.dts | 1 + arch/arm/boot/dts/imx23-xfi3.dts | 1 + arch/arm/boot/dts/imx23.dtsi | 2 - arch/arm/boot/dts/imx25-eukrea-cpuimx25.dtsi | 1 + arch/arm/boot/dts/imx25-karo-tx25.dts | 1 + arch/arm/boot/dts/imx25-pdk.dts | 1 + arch/arm/boot/dts/imx25.dtsi | 2 - arch/arm/boot/dts/imx27-apf27.dts | 1 + arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi | 1 + arch/arm/boot/dts/imx27-pdk.dts | 1 + arch/arm/boot/dts/imx27-phytec-phycard-s-som.dtsi | 1 + arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 1 + arch/arm/boot/dts/imx27.dtsi | 2 - arch/arm/boot/dts/imx31-bug.dts | 1 + arch/arm/boot/dts/imx31-lite.dts | 1 + arch/arm/boot/dts/imx31.dtsi | 2 - arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi | 1 + arch/arm/boot/dts/imx35-pdk.dts | 1 + arch/arm/boot/dts/imx35.dtsi | 2 - arch/arm/boot/dts/imx50-evk.dts | 1 + arch/arm/boot/dts/imx50.dtsi | 2 - arch/arm/boot/dts/imx51-apf51.dts | 1 + arch/arm/boot/dts/imx51-babbage.dts | 1 + arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi | 1 + arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi | 1 + arch/arm/boot/dts/imx51-ts4800.dts | 1 + arch/arm/boot/dts/imx51-zii-rdu1.dts | 1 + arch/arm/boot/dts/imx51-zii-scu2-mezz.dts | 1 + arch/arm/boot/dts/imx51-zii-scu3-esb.dts | 1 + arch/arm/boot/dts/imx51.dtsi | 2 - arch/arm/boot/dts/imx53-ard.dts | 1 + arch/arm/boot/dts/imx53-cx9020.dts | 1 + arch/arm/boot/dts/imx53-m53.dtsi | 1 + arch/arm/boot/dts/imx53-qsb-common.dtsi | 1 + arch/arm/boot/dts/imx53-smd.dts | 1 + arch/arm/boot/dts/imx53-tqma53.dtsi | 1 + arch/arm/boot/dts/imx53-tx53.dtsi | 1 + arch/arm/boot/dts/imx53-usbarmory.dts | 1 + arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi | 8 +- arch/arm/boot/dts/imx53.dtsi | 2 - arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 8 ++ arch/arm/boot/dts/imx6sl-evk.dts | 1 + arch/arm/boot/dts/imx6sl-warp.dts | 1 + arch/arm/boot/dts/imx6sl.dtsi | 2 - arch/arm/boot/dts/imx6sll-evk.dts | 1 + arch/arm/boot/dts/imx6sx-nitrogen6sx.dts | 1 + arch/arm/boot/dts/imx6sx-sabreauto.dts | 1 + arch/arm/boot/dts/imx6sx-sdb.dtsi | 1 + arch/arm/boot/dts/imx6sx-softing-vining-2000.dts | 1 + arch/arm/boot/dts/imx6sx-udoo-neo-basic.dts | 1 + arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts | 1 + arch/arm/boot/dts/imx6sx-udoo-neo-full.dts | 1 + arch/arm/boot/dts/imx6sx.dtsi | 2 - arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 1 + arch/arm/boot/dts/imx6ul-geam.dts | 1 + arch/arm/boot/dts/imx6ul-isiot.dtsi | 1 + arch/arm/boot/dts/imx6ul-litesom.dtsi | 1 + arch/arm/boot/dts/imx6ul-opos6ul.dtsi | 1 + arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 1 + arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 1 + arch/arm/boot/dts/imx6ul.dtsi | 2 - arch/arm/boot/dts/imx6ull-colibri-nonwifi.dtsi | 1 + arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi | 1 + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 3 +- arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 1 + arch/arm/boot/dts/imx7d-colibri.dtsi | 1 + arch/arm/boot/dts/imx7d-nitrogen7.dts | 1 + arch/arm/boot/dts/imx7d-pico.dtsi | 1 + arch/arm/boot/dts/imx7d-sdb.dts | 1 + arch/arm/boot/dts/imx7s-colibri.dtsi | 1 + arch/arm/boot/dts/imx7s-warp.dts | 1 + arch/arm/boot/dts/imx7s.dtsi | 2 - arch/arm/boot/dts/omap4-l4.dtsi | 4 +- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 1 + arch/arm/mach-ks8695/board-acs5k.c | 2 +- arch/arm/mach-omap1/Makefile | 2 +- arch/arm/mach-omap1/include/mach/usb.h | 2 +- .../boot/dts/marvell/armada-3720-espressobin.dts | 22 +++++ arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 2 +- arch/arm64/include/asm/assembler.h | 8 +- arch/arm64/kernel/entry.S | 6 +- arch/arm64/kernel/head.S | 26 ++++++ arch/arm64/kernel/smp.c | 6 ++ arch/microblaze/Makefile | 14 ++-- arch/microblaze/boot/Makefile | 23 ++---- arch/openrisc/kernel/entry.S | 2 +- arch/openrisc/kernel/head.S | 2 +- arch/powerpc/Makefile | 9 +- arch/powerpc/boot/dts/bamboo.dts | 4 +- arch/powerpc/include/asm/cputable.h | 1 + arch/powerpc/include/asm/reg.h | 2 + arch/powerpc/kernel/cputable.c | 10 ++- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/prom.c | 6 +- arch/powerpc/mm/fault.c | 17 ++-- arch/powerpc/mm/ppc_mmu_32.c | 4 +- arch/powerpc/net/bpf_jit_comp64.c | 13 +++ arch/powerpc/perf/isa207-common.c | 25 ++++-- arch/powerpc/perf/isa207-common.h | 4 +- arch/powerpc/platforms/83xx/misc.c | 17 ++++ arch/powerpc/platforms/powernv/eeh-powernv.c | 8 +- arch/powerpc/platforms/powernv/pci-ioda.c | 4 +- arch/powerpc/platforms/powernv/pci.c | 4 +- arch/powerpc/platforms/pseries/dlpar.c | 4 + arch/powerpc/platforms/pseries/hotplug-memory.c | 1 + arch/powerpc/xmon/xmon.c | 2 +- arch/s390/kvm/kvm-s390.c | 17 +++- arch/s390/mm/gup.c | 9 +- arch/um/Kconfig.debug | 1 + arch/um/drivers/vector_user.c | 1 + arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 4 + arch/x86/kernel/kprobes/core.c | 6 ++ arch/x86/kvm/vmx.c | 86 +++++++++---------- arch/x86/xen/xen-asm_64.S | 2 + crypto/crypto_user.c | 37 +++++---- drivers/acpi/acpi_lpss.c | 7 +- drivers/acpi/apei/ghes.c | 32 ++++---- drivers/ata/ahci_mvebu.c | 68 +++++++++++---- drivers/base/platform.c | 3 + drivers/block/drbd/drbd_main.c | 1 - drivers/block/drbd/drbd_nl.c | 43 +++++++--- drivers/block/drbd/drbd_receiver.c | 52 +++++++++++- drivers/block/drbd/drbd_state.h | 2 +- drivers/bluetooth/hci_bcm.c | 22 +++++ drivers/bus/ti-sysc.c | 32 ++++++-- drivers/char/hw_random/stm32-rng.c | 8 ++ drivers/clk/at91/clk-generated.c | 28 +++---- drivers/clk/at91/clk-main.c | 7 +- drivers/clk/at91/sckc.c | 20 ++++- drivers/clk/clk-stm32mp1.c | 28 ++++--- drivers/clk/meson/gxbb.c | 1 + drivers/clk/samsung/clk-exynos5420.c | 6 ++ drivers/clk/samsung/clk-exynos5433.c | 14 +++- drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 2 +- drivers/clk/sunxi/clk-sunxi.c | 4 +- drivers/clk/ti/clk-dra7-atl.c | 6 -- drivers/clk/ti/clkctrl.c | 5 +- drivers/clocksource/timer-fttmr010.c | 73 +++++++++------- drivers/clocksource/timer-mediatek.c | 10 +-- drivers/crypto/chelsio/chtls/chtls.h | 5 ++ drivers/crypto/chelsio/chtls/chtls_main.c | 50 ++++++----- drivers/crypto/mxc-scc.c | 12 +-- drivers/crypto/stm32/stm32-hash.c | 2 +- drivers/dma/stm32-dma.c | 20 ++--- drivers/firmware/arm_sdei.c | 6 -- drivers/gpio/gpio-pca953x.c | 2 +- drivers/gpio/gpio-raspberrypi-exp.c | 1 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- drivers/gpu/ipu-v3/ipu-pre.c | 6 ++ drivers/hid/hid-core.c | 51 ++++++++++-- drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 5 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 15 +++- drivers/infiniband/hw/hns/hns_roce_mr.c | 4 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 3 +- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 + drivers/infiniband/hw/qib/qib_sdma.c | 4 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +- drivers/infiniband/sw/rxe/rxe_hw_counters.c | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.h | 6 +- drivers/infiniband/ulp/srp/ib_srp.c | 1 + drivers/input/serio/gscps2.c | 4 +- drivers/input/serio/hp_sdc.c | 4 +- drivers/iommu/amd_iommu.c | 8 +- drivers/mailbox/mailbox-test.c | 14 ++-- drivers/mailbox/stm32-ipcc.c | 37 ++++++--- drivers/md/bcache/debug.c | 3 +- drivers/md/bcache/super.c | 3 +- drivers/md/bcache/writeback.c | 3 +- drivers/md/dm-flakey.c | 33 +++++--- drivers/md/dm-raid.c | 3 +- drivers/media/platform/atmel/atmel-isc.c | 12 ++- drivers/media/platform/stm32/stm32-dcmi.c | 23 +++++- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + drivers/memory/omap-gpmc.c | 1 + drivers/misc/mei/bus.c | 9 +- drivers/misc/mei/hw-me-regs.h | 1 + drivers/misc/mei/pci-me.c | 1 + drivers/mmc/core/block.c | 6 -- drivers/mmc/core/queue.c | 9 +- drivers/mmc/host/meson-gx-mmc.c | 73 +++++++++++++--- drivers/mtd/mtdcore.h | 2 +- drivers/mtd/mtdpart.c | 35 ++++++-- drivers/mtd/nand/raw/atmel/nand-controller.c | 2 +- drivers/mtd/nand/raw/atmel/pmecc.c | 21 +++-- drivers/mtd/nand/raw/sunxi_nand.c | 2 +- drivers/mtd/spi-nor/spi-nor.c | 2 +- drivers/mtd/ubi/build.c | 2 +- drivers/mtd/ubi/kapi.c | 2 +- drivers/net/Kconfig | 4 +- drivers/net/can/c_can/c_can.c | 26 ++++++ drivers/net/can/flexcan.c | 10 ++- drivers/net/can/rx-offload.c | 96 ++++++++++++++++++---- drivers/net/can/spi/mcp251x.c | 2 +- drivers/net/can/usb/peak_usb/pcan_usb.c | 15 ++-- drivers/net/dsa/bcm_sf2.c | 7 +- drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 57 +++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 78 ++++++++++++++---- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 +- drivers/net/ethernet/broadcom/genet/bcmmii.c | 33 ++++++++ drivers/net/ethernet/cadence/macb.h | 6 +- drivers/net/ethernet/cadence/macb_main.c | 19 +++-- drivers/net/ethernet/cadence/macb_ptp.c | 5 +- drivers/net/ethernet/freescale/fec_main.c | 2 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 7 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 7 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +- drivers/net/ethernet/mscc/ocelot.h | 2 +- drivers/net/ethernet/sfc/ef10.c | 29 +++++-- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 4 +- drivers/net/ethernet/ti/cpts.c | 4 +- drivers/net/macvlan.c | 3 +- drivers/net/slip/slip.c | 1 + drivers/net/vxlan.c | 13 ++- drivers/net/wan/fsl_ucc_hdlc.c | 1 - drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 10 +++ .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 29 ++++++- .../wireless/broadcom/brcm80211/brcmfmac/sdio.h | 9 +- drivers/net/wireless/intel/iwlwifi/dvm/main.c | 17 ++++ .../net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 19 ----- .../net/wireless/intel/iwlwifi/iwl-eeprom-parse.h | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 14 ++++ drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 24 +++--- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 10 +-- drivers/net/wireless/marvell/mwifiex/debugfs.c | 14 ++-- drivers/net/wireless/marvell/mwifiex/scan.c | 18 ++-- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 3 +- drivers/nvme/host/core.c | 41 +++++++-- drivers/nvme/host/nvme.h | 3 + drivers/pci/msi.c | 22 +++-- drivers/pinctrl/intel/pinctrl-cherryview.c | 24 +++--- drivers/pinctrl/pinctrl-xway.c | 39 ++++++--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 2 +- drivers/pinctrl/sh-pfc/pfc-sh7264.c | 9 +- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 16 ++-- drivers/pinctrl/stm32/pinctrl-stm32.c | 26 +++--- drivers/platform/x86/hp-wmi.c | 10 +-- drivers/platform/x86/mlx-platform.c | 4 +- drivers/power/avs/smartreflex.c | 3 +- drivers/pwm/core.c | 1 + drivers/pwm/pwm-bcm-iproc.c | 1 + drivers/pwm/pwm-berlin.c | 1 - drivers/pwm/pwm-clps711x.c | 4 +- drivers/pwm/pwm-pca9685.c | 1 - drivers/pwm/pwm-samsung.c | 1 - drivers/regulator/palmas-regulator.c | 5 +- drivers/regulator/tps65910-regulator.c | 4 +- drivers/reset/core.c | 1 + drivers/s390/crypto/ap_queue.c | 23 +++++- drivers/scsi/csiostor/csio_init.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 12 +++ drivers/scsi/libsas/sas_expander.c | 29 ++++++- drivers/scsi/lpfc/lpfc.h | 6 ++ drivers/scsi/lpfc/lpfc_attr.c | 4 +- drivers/scsi/lpfc/lpfc_bsg.c | 6 +- drivers/scsi/lpfc/lpfc_els.c | 4 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 2 +- drivers/scsi/lpfc/lpfc_init.c | 7 +- drivers/scsi/lpfc/lpfc_scsi.c | 18 ++++ drivers/scsi/lpfc/lpfc_sli.c | 2 + drivers/scsi/qla2xxx/qla_attr.c | 2 + drivers/scsi/qla2xxx/qla_init.c | 10 +-- drivers/scsi/qla2xxx/qla_nvme.c | 16 +--- drivers/scsi/qla2xxx/qla_os.c | 2 + drivers/scsi/qla2xxx/tcm_qla2xxx.c | 48 ++--------- drivers/scsi/qla2xxx/tcm_qla2xxx.h | 3 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 7 +- drivers/target/target_core_user.c | 2 +- drivers/thunderbolt/switch.c | 54 +++++++++--- drivers/tty/serial/8250/8250_core.c | 26 ++++++ drivers/tty/serial/8250/8250_fsl.c | 23 +++++- drivers/tty/serial/8250/8250_of.c | 5 ++ drivers/tty/serial/max310x.c | 7 +- drivers/tty/serial/sh-sci.c | 2 +- drivers/usb/dwc2/core.c | 2 +- drivers/usb/host/ehci-omap.c | 7 +- drivers/usb/serial/ftdi_sio.c | 3 + drivers/usb/serial/ftdi_sio_ids.h | 7 ++ drivers/vfio/vfio_iommu_spapr_tce.c | 10 +-- drivers/watchdog/meson_gxbb_wdt.c | 4 +- drivers/watchdog/sama5d4_wdt.c | 4 +- drivers/xen/xen-pciback/pci_stub.c | 3 +- fs/btrfs/delayed-ref.c | 3 - fs/btrfs/dev-replace.c | 21 +++-- fs/btrfs/disk-io.c | 7 +- fs/btrfs/extent-tree.c | 7 +- fs/btrfs/extent_io.h | 4 +- fs/btrfs/volumes.c | 13 +-- fs/ceph/super.c | 11 ++- fs/exofs/super.c | 37 +++++++-- fs/ext4/inode.c | 15 ++++ fs/ext4/super.c | 21 +++-- fs/f2fs/file.c | 2 +- fs/f2fs/segment.c | 2 +- fs/gfs2/bmap.c | 2 + fs/ocfs2/journal.c | 6 +- fs/ubifs/sb.c | 13 ++- fs/xfs/libxfs/xfs_symlink_remote.c | 14 +++- fs/xfs/xfs_buf.c | 3 +- fs/xfs/xfs_ioctl32.c | 40 ++++++++- fs/xfs/xfs_rtalloc.c | 4 +- fs/xfs/xfs_symlink.c | 33 ++++---- include/linux/blktrace_api.h | 8 +- include/linux/genalloc.h | 13 +-- include/linux/gpio/consumer.h | 2 +- include/linux/idr.h | 2 +- include/linux/kprobes.h | 3 + include/linux/memory_hotplug.h | 18 ++-- include/linux/netdevice.h | 2 +- include/linux/reset-controller.h | 2 +- include/linux/sched/task.h | 2 + include/linux/serial_8250.h | 4 + include/linux/swap.h | 6 -- include/linux/trace_events.h | 2 + include/net/fq_impl.h | 4 +- include/net/sctp/structs.h | 3 + include/net/sock.h | 2 +- include/trace/events/rpcrdma.h | 28 +++++++ init/main.c | 1 - kernel/bpf/cpumap.c | 13 ++- kernel/bpf/syscall.c | 6 +- kernel/fork.c | 5 -- kernel/kprobes.c | 67 +++++++++++---- kernel/trace/trace_events.c | 34 ++++++-- kernel/trace/trace_events_hist.c | 24 +++--- lib/genalloc.c | 25 +++--- lib/radix-tree.c | 2 +- mm/internal.h | 10 +++ mm/memblock.c | 7 +- mm/page_alloc.c | 29 +++---- net/bridge/netfilter/ebt_dnat.c | 19 ++++- net/core/neighbour.c | 13 ++- net/core/net_namespace.c | 3 +- net/core/sock.c | 2 +- net/decnet/dn_dev.c | 2 +- net/ipv4/ip_gre.c | 33 ++++---- net/ipv4/ip_tunnel.c | 8 +- net/ipv4/tcp_timer.c | 6 +- net/ipv6/ip6_gre.c | 36 ++++---- net/mac80211/sta_info.c | 3 +- net/netfilter/nf_nat_sip.c | 39 ++++++++- net/netfilter/nf_tables_api.c | 2 + net/openvswitch/datapath.c | 17 +++- net/psample/psample.c | 2 +- net/sched/sch_mq.c | 3 +- net/sched/sch_mqprio.c | 4 +- net/sched/sch_multiq.c | 2 +- net/sched/sch_prio.c | 2 +- net/sctp/associola.c | 1 + net/sctp/endpointola.c | 1 + net/sctp/input.c | 4 +- net/sctp/sm_statefuns.c | 4 +- net/sctp/transport.c | 3 +- net/smc/smc_cdc.c | 7 +- net/smc/smc_cdc.h | 45 +++++++--- net/smc/smc_core.c | 4 + net/smc/smc_tx.c | 10 +-- net/sunrpc/xprtrdma/rpc_rdma.c | 4 + net/tipc/link.c | 2 +- net/tipc/netlink_compat.c | 15 +++- net/vmw_vsock/af_vsock.c | 7 +- net/xfrm/xfrm_state.c | 2 + samples/bpf/Makefile | 1 + samples/vfio-mdev/mtty.c | 26 +++--- scripts/gdb/linux/symbols.py | 3 +- security/apparmor/apparmorfs.c | 1 + sound/core/compress_offload.c | 2 +- sound/soc/codecs/msm8916-wcd-analog.c | 4 +- sound/soc/codecs/rt5645.c | 14 ++++ sound/soc/kirkwood/kirkwood-i2s.c | 11 +-- sound/soc/samsung/i2s.c | 8 +- sound/soc/stm/stm32_i2s.c | 29 ++++--- sound/soc/stm/stm32_sai.c | 11 ++- sound/soc/stm/stm32_sai_sub.c | 12 ++- tools/testing/selftests/bpf/test_sockmap.c | 9 ++ tools/vm/page-types.c | 2 +- virt/kvm/kvm_main.c | 2 +- 398 files changed, 2626 insertions(+), 1216 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 6/321 clk: samsung: exynos5433: Fix error paths
From: Marek Szyprowski <[email protected]>
[ Upstream commit faac3604d05e8015567124e5ee79edc3f1568a89 ]
Add checking the value returned by samsung_clk_alloc_reg_dump() and devm_kcalloc(). While fixing this, also release all gathered clocks.
--- drivers/clk/samsung/clk-exynos5433.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/clk/samsung/clk-exynos5433.c +12 -2
@@ -16,6 +16,7 @@#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> +#include <linux/slab.h> #include <dt-bindings/clock/exynos5433.h>
@@ -5527,6 +5528,8 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev) data->clk_save =samsung_clk_alloc_reg_dump (info->clk_regs, info->nr_clk_regs); +if (!data->clk_save) +return -ENOMEM ; data->nr_clk_save = info->nr_clk_regs; data->clk_suspend = info->suspend_regs; data->nr_clk_suspend = info->nr_suspend_regs;
@@ -5535,12 +5538,19 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev)if (data->nr_pclks >0 ) { data->pclks =devm_kcalloc (dev,sizeof (struct clk *), data->nr_pclks,GFP_KERNEL ); - +if (!data->pclks) { +kfree (data->clk_save); +return -ENOMEM ; + }for (i =0 ; i < data->nr_pclks; i++) {struct clk *clk =of_clk_get (dev->of_node, i); -if (IS_ERR (clk)) +if (IS_ERR (clk)) { +kfree (data->clk_save); +while (--i >=0 ) +clk_put (data->pclks[i]);return PTR_ERR (clk); + } data->pclks[i] = clk; } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 33/321 can: rx-offload: can_rx_offload_irq_offload_fifo(): continue on error
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit 1f7f504dcd9d1262437bdcf4fa071e41dec1af03 ]
In case of a resource shortage, i.e. the rx_offload queue will overflow or a skb fails to be allocated (due to OOM), can_rx_offload_offload_one() will call mailbox_read() to discard the mailbox and return an ERR_PTR.
If the hardware FIFO is empty can_rx_offload_offload_one() will return NULL.
In case a CAN frame was read from the hardware, can_rx_offload_offload_one() returns the skb containing it.
Without this patch can_rx_offload_irq_offload_fifo() bails out if no skb returned, regardless of the reason.
Similar to can_rx_offload_irq_offload_timestamp() in case of a resource shortage the whole FIFO should be discarded, to avoid an IRQ storm and give the system some time to recover. However if the FIFO is empty the loop can be left.
With this patch the loop is left in case of empty FIFO, but not on errors.
--- drivers/net/can/rx-offload.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/can/rx-offload.c +3 -1
@@ -257,7 +257,9 @@ int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload)while (1 ) { skb =can_rx_offload_offload_one (offload,0 ); -if (IS_ERR_OR_NULL (skb)) +if (IS_ERR (skb)) +continue ; +if (!skb)break ;skb_queue_tail (&offload->skb_queue, skb);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 29/321 can: rx-offload: can_rx_offload_offload_one(): do not increase the skb_queue beyond skb_queue_len_max
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit a2dc3f5e1022a5ede8af9ab89a144f1e69db8636 ]
The skb_queue is a linked list, holding the skb to be processed in the next NAPI call.
Without this patch, the queue length in can_rx_offload_offload_one() is limited to skb_queue_len_max + 1. As the skb_queue is a linked list, no array or other resources are accessed out-of-bound, however this behaviour is counterintuitive.
This patch limits the rx-offload skb_queue length to skb_queue_len_max.
--- drivers/net/can/rx-offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/rx-offload.c +1 -1
@@ -124,7 +124,7 @@ static struct sk_buff *can_rx_offload_offload_one(struct can_rx_offload *offloadint ret;/* If queue is full or skb not available, read to discard mailbox */ -if (likely (skb_queue_len (&offload->skb_queue) <= +if (likely (skb_queue_len (&offload->skb_queue) < offload->skb_queue_len_max)) skb =alloc_can_skb (offload->dev, &cf);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 27/321 can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
In reply to Greg Kroah-HartmanFrom: Jeroen Hofstee <[email protected]>
[ Upstream commit 23c5a9488f076bab336177cd1d1a366bd8ddf087 ]
When the CAN interface is closed it the hardwre is put in power down mode, but does not reset the error counters / state. Reset the D_CAN on open, so the reported state and the actual state match.
According to [1], the C_CAN module doesn't have the software reset.
--- drivers/net/can/c_can/c_can.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/net/can/c_can/c_can.c +26 -0
@@ -52,6 +52,7 @@#define CONTROL_EX_PDR BIT(8)/* control register */ +#define CONTROL_SWR BIT(15)#define CONTROL_TEST BIT(7)#define CONTROL_CCE BIT(6)#define CONTROL_DISABLE_AR BIT(5)
@@ -572,6 +573,26 @@ static void c_can_configure_msg_objects(struct net_device *dev) IF_MCONT_RCV_EOB); } +static int c_can_software_reset (struct net_device *dev) +{ +struct c_can_priv *priv =netdev_priv (dev); +int retry =0 ; + +if (priv->type !=BOSCH_D_CAN ) +return 0 ; + + priv->write_reg (priv,C_CAN_CTRL_REG ,CONTROL_SWR |CONTROL_INIT ); +while (priv->read_reg (priv,C_CAN_CTRL_REG ) &CONTROL_SWR ) { +msleep (20 ); +if (retry++ >100 ) { +netdev_err (dev,"CCTRL: software reset failed\n" ); +return -EIO ; + } + } + +return 0 ; +} +/* * Configure C_CAN chip: * - enable/disable auto-retransmission
@@ -581,6 +602,11 @@ static void c_can_configure_msg_objects(struct net_device *dev)static int c_can_chip_config (struct net_device *dev) {struct c_can_priv *priv =netdev_priv (dev); +int err; + + err =c_can_software_reset (dev); +if (err) +return err;/* enable automatic retransmission */ priv->write_reg (priv,C_CAN_CTRL_REG ,CONTROL_ENABLE_AR );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 19/321 idr: Fix integer overflow in idr_for_each_entry
In reply to Greg Kroah-HartmanFrom: Matthew Wilcox (Oracle) <[email protected]>
[ Upstream commit f6341c5af4e6e15041be39976d16deca789555fa ]
If there is an entry at INT_MAX then idr_for_each_entry() will increment id after handling it. This is undefined behaviour, and is caught by UBSAN. Adding 1U to id forces the operation to be carried out as an unsigned addition which (when assigned to id) will result in INT_MIN. Since there is never an entry stored at INT_MIN, idr_get_next() will return NULL, ending the loop as expected.
--- include/linux/idr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/idr.h +1 -1
@@ -185,7 +185,7 @@ static inline void idr_preload_end(void)* is convenient for a "not found" value. */ #define idr_for_each_entry (idr, entry, id) \ - for (id = 0; ((entry) = idr_get_next(idr, &(id))) != NULL; ++id) + for (id = 0; ((entry) = idr_get_next(idr, &(id))) != NULL; id += 1U)/** * idr_for_each_entry_ul() - Iterate over an IDR's elements of a given type.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 18/321 powerpc/bpf: Fix tail call implementation
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 7de086909365cd60a5619a45af3f4152516fd75c ]
We have seen many crashes on powerpc hosts while loading bpf programs.
The problem here is that bpf_int_jit_compile() does a first pass to compute the program length.
Then it allocates memory to store the generated program and calls bpf_jit_build_body() a second time (and a third time later)
What I have observed is that the second bpf_jit_build_body() could end up using few more words than expected.
If bpf_jit_binary_alloc() put the space for the program at the end of the allocated page, we then write on a non mapped memory.
It appears that bpf_jit_emit_tail_call() calls bpf_jit_emit_common_epilogue() while ctx->seen might not be stable.
Only after the second pass we can be sure ctx->seen wont be changed.
Trying to avoid a second pass seems quite complex and probably not worth it.
--- arch/powerpc/net/bpf_jit_comp64.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/powerpc/net/bpf_jit_comp64.c +13 -0
@@ -949,6 +949,19 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp) goto out_addrs; } +/* +* If we have seen a tail call, we need a second pass. +* This is because bpf_jit_emit_common_epilogue() is called +* from bpf_jit_emit_tail_call() with a not yet stable ctx->seen. +*/ +if (cgctx.seen &SEEN_TAILCALL ) { + cgctx.idx =0 ; +if (bpf_jit_build_body (fp,0 , &cgctx, addrs, false)) { + fp = org_fp; + goto out_addrs; + } + } +/* * Pretend to build prologue, given the features we've seen. This will * update ctgtx.idx as it pretends to output instructions, then we can
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 15/321 clk: sunxi-ng: a80: fix the zeroing of bits 16 and 18
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit cdfc2e2086bf9c465f44e2db25561373b084a113 ]
The zero'ing of bits 16 and 18 is incorrect. Currently the code is masking with the bitwise-and of BIT(16) & BIT(18) which is 0, so the updated value for val is always zero. Fix this by bitwise and-ing value with the correct mask that will zero bits 16 and 18.
Addresses-Coverity: (" Suspicious &= or |= constant expression")
--- drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun9i-a80.c +1 -1
@@ -1231,7 +1231,7 @@ static int sun9i_a80_ccu_probe(struct platform_device *pdev)/* Enforce d1 = 0, d2 = 0 for Audio PLL */ val =readl (reg +SUN9I_A80_PLL_AUDIO_REG ); - val &= (BIT (16 ) &BIT (18 )); + val &= ~(BIT (16 ) |BIT (18 ));writel (val, reg +SUN9I_A80_PLL_AUDIO_REG );/* Enforce P = 1 for both CPU cluster PLLs */
Signature · 1 line
2.20.1
Re: [PATCH 4.19 024/321] net: fec: add missed clk_disable_unprepare in remove
In reply to Greg Kroah-HartmanHi,
Quoted 10 lines · Greg Kroah-Hartman
From: Chuhong Yuan <[email protected]>
[ Upstream commit
c43eab3eddb4c6742ac20138659a9b701822b274]This driver forgets to disable and unprepare clks when remove. Add calls to
clk_disable_unprepareto fix it.Signed-off-by Chuhong Yuan <[email protected]>Signed-off-by David S. Miller <[email protected]>Signed-off-by Sasha Levin <[email protected]>
This commit also requires the following commit:
commit a31eda65ba210741b598044d045480494d0ed52a
Author: Chuhong Yuan <[email protected]> Date: Wed Nov 20 09:25:13 2019 +0800
net: fec: fix clock count mis-match
pm_runtime_put_autosuspend in probe will call runtime suspend to disable clks automatically if CONFIG_PM is defined. (If CONFIG_PM is not defined, its implementation will be empty, then runtime suspend will not be called.)
Therefore, we can call pm_runtime_get_sync to runtime resume it first to enable clks, which matches the runtime suspend. (Only when CONFIG_PM is defined, otherwise pm_runtime_get_sync will also be empty, then runtime resume will not be called.)
Then it is fine to disable clks without causing clock count mis-match.
And this should also apply to 5.3.
Best regards,
Nobuhiro
Greg Kroah-Hartman
maintainerRe: [PATCH 4.19 024/321] net: fec: add missed clk_disable_unprepare in remove
Quoted 35 lines · Nobuhiro Iwamatsu
Hi,
Quoted 10 lines · Greg Kroah-Hartman
From: Chuhong Yuan <[email protected]>
[ Upstream commit
c43eab3eddb4c6742ac20138659a9b701822b274]This driver forgets to disable and unprepare clks when remove. Add calls to
clk_disable_unprepareto fix it.Signed-off-by Chuhong Yuan <[email protected]>Signed-off-by David S. Miller <[email protected]>Signed-off-by Sasha Levin <[email protected]>This commit also requires the following commit:
commit
a31eda65ba210741b598044d045480494d0ed52aAuthor: Chuhong Yuan <[email protected]> Date: Wed Nov 20 09:25:13 2019 +0800net: fec: fix clock count mis-match
pm_runtime_put_autosuspendin probe will call runtime suspend to disable clks automatically ifCONFIG_PMis defined. (IfCONFIG_PMis not defined, its implementation will be empty, then runtime suspend will not be called.)Therefore, we can call
pm_runtime_get_syncto runtime resume it first to enable clks, which matches the runtime suspend. (Only whenCONFIG_PMis defined, otherwisepm_runtime_get_syncwill also be empty, then runtime resume will not be called.)Then it is fine to disable clks without causing clock count mis-match.
Quoted 7 lines
Fixes c43eab3eddb4 ("net: fec: add missed clk_disable_unprepare in remove")Signed-off-by Chuhong Yuan <[email protected]>Acked-by Fugang Duan <[email protected]>Signed-off-by David S. Miller <[email protected]>And this should also apply to 5.3.
Thanks, now queued up.
greg k-h
Re: [PATCH 4.19 004/321] ASoC: compress: fix unsigned integer overflow check
In reply to Greg Kroah-HartmanQuoted 6 lines · Greg Kroah-Hartman
From: Xiaojun Sang <[email protected]>
[ Upstream commit
d3645b055399538415586ebaacaedebc1e5899b0]Parameter fragments and
fragment_sizeare type of u32.U32_MAXis the correct check.
Why is this in stable? I doubt raising limit from 2GB to 4GB can be called bugfix... kmalloc() will have problems allocating huge ammount of memory, anyway.
Best regards,
Pavel
Quoted 10 lines
+++
b/sound/core/compress_offload.csound/core/compress_offload.c +1
-1@@ -529,7 +529,7 @@ static int snd_compress_check_input(struct snd_compr_params *params) {/* first let's check the buffer parameter's */ if (params->buffer.fragment_size ==0 || - params->buffer.fragments >INT_MAX / params->buffer.fragment_size || + params->buffer.fragments >U32_MAX / params->buffer.fragment_size || params->buffer.fragments ==0 )return -EINVAL ;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 4.19 012/321] reset: fix reset_control_ops kerneldoc comment
In reply to Greg Kroah-HartmanQuoted 6 lines · Greg Kroah-Hartman
From: Randy Dunlap <[email protected]>
[ Upstream commit
f430c7ed8bc22992ed528b518da465b060b9223f]Add a missing short description to the
reset_control_opsdocumentation.
Why is it pending for stable? It does not break anything, but neither it fixes anything, it adds to reviewer load...
Sasha, what is your process for selecting commits for stable?
Best regards,
Pavel
Quoted 10 lines
+++
b/include/linux/reset-controller.hinclude/linux/reset-controller.h +1
-1@@ -7,7 +7,7 @@struct reset_controller_dev ;/** -* struct reset_control_ops +* struct reset_control_ops - reset controller driver callbacks * * @reset: for self-deasserting resets, does all necessary * things to reset the device
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Jon Hunter
maintainerQuoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.88 release. There are 321 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 Thu, 05 Dec 2019 22:30:32 +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.19.88-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
...
Quoted 2 lines
Ding Tao <[email protected]>
arm64: dts: marvell: armada-37xx: Enable emmc on espressobin
The above commit is causing the following build failure for ARM64 ...
DTC arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtbarch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d0000: Reference to non-existent node or label "sdio_pins"
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d8000: Reference to non-existent node or label "mmc_pins"
Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 30 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.88 release. There are 321 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 Thu, 05 Dec 2019 22:30:32 +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.19.88-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Ding Tao <[email protected]>
arm64: dts: marvell: armada-37xx: Enable emmc on espressobinThe above commit is causing the following build failure for ARM64 ...
Quoted 8 lines
DTC
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtbarch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d0000: Reference to non-existent node or label "sdio_pins"
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d8000: Reference to non-existent node or label "mmc_pins"
Thanks for letting me know, I'll go drop this one and push out a -rc2 with that removed.
greg k-h
Re: [PATCH 4.19 044/321] mac80211: fix station inactive_time shortly after boot
In reply to Greg Kroah-HartmanQuoted 8 lines · Greg Kroah-Hartman
From: Ahmed Zaki <[email protected]>
[ Upstream commit
285531f9e6774e3be71da6673d475ff1a088d675]In the first 5 minutes after boot (time of
INITIAL_JIFFIES),ieee80211_sta_last_active()returns zero iflast_ackis zero. This leads to "inactive time" showingjiffies_to_msecs(jiffies).
Quoted 8 lines
# iw wlan0 station get fc:ec:da:64:a6:dd Station fc:ec:da:64:a6:dd (on wlan0) inactive time: 4294894049 ms . . connected time: 70 secondsFix by returning
last_rxiflast_ack== 0.
I guess it fixes the message, but is it right fix?
Quoted 5 lines
net/mac80211/sta_info.c +0
-0
net/mac80211/sta_info.c unsigned long ieee80211_sta_last_active(struct sta_info *sta) · line 2363
Quoted 9 lines
net/mac80211/sta_info.c +2
-1@@ -2356,7 +2356,8 @@ unsigned long ieee80211_sta_last_active(struct sta_info *sta) {struct ieee80211_sta_rx_stats *stats =sta_get_last_rx_stats (sta); -if (time_after (stats->last_rx, sta->status_stats.last_ack)) +if (!sta->status_stats.last_ack || +time_after (stats->last_rx, sta->status_stats.last_ack))return stats->last_rx;return sta->status_stats.last_ack; }
I mean, jiffies do wrapraound periodically, so eventually we'll have sta->status_stats.last_ack == 0 even through it is not short after boot, no?
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 4.19 044/321] mac80211: fix station inactive_time shortly after boot
Quoted 10 lines · Pavel Machek
net/mac80211/sta_info.c unsigned long ieee80211_sta_last_active(struct sta_info *sta) · line 2363
Quoted 6 lines
net/mac80211/sta_info.c +2
-1-if (time_after (stats->last_rx, sta->status_stats.last_ack)) +if (!sta->status_stats.last_ack || +time_after (stats->last_rx, sta->status_stats.last_ack))return stats->last_rx;return sta->status_stats.last_ack; }I mean, jiffies do wrapraound periodically, so eventually we'll have
sta->status_stats.last_ack== 0 even through it is not short after boot, no?
Yeah. I contemplated that when I applied the original patch - it's a bit complicated otherwise, you have to track "is this valid" etc.
Since this is updated on pretty much every frame, it's highly unlikely you'll go without the value for long, so I figured this was good enough.
johannes
Re: [PATCH 4.19 044/321] mac80211: fix station inactive_time shortly after boot
Quoted 14 lines · Johannes Berg
Quoted 10 lines · Pavel Machek
net/mac80211/sta_info.c unsigned long ieee80211_sta_last_active(struct sta_info *sta) · line 2363
Quoted 6 lines
net/mac80211/sta_info.c +2
-1-if (time_after (stats->last_rx, sta->status_stats.last_ack)) +if (!sta->status_stats.last_ack || +time_after (stats->last_rx, sta->status_stats.last_ack))return stats->last_rx;return sta->status_stats.last_ack; }I mean, jiffies do wrapraound periodically, so eventually we'll have
sta->status_stats.last_ack== 0 even through it is not short after boot, no?
Quoted 8 lines
Yeah. I contemplated that when I applied the original patch - it's a bit complicated otherwise, you have to track "is this valid" etc.
Since this is updated on pretty much every frame, it's highly unlikely you'll go without the value for long, so I figured this was good enough.
johannes
That happened when I was testing an IBSS network, so a unit would have last_ack = 0
for some neighbours for extended period of time, but last_rx was always valid (from
broadcasts and beacons I guess). In this case, it makes sense to use last_rx, no matter
jiffies had wrapped around or not.
For STA/AP situations, last_ack should pretty much be valid and non-zero.
Ahmed
Re: [PATCH 4.19 073/321] bus: ti-sysc: Check for no-reset and no-idle flags at the child level
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
From: Tony Lindgren <[email protected]>
[ Upstream commit
4014c08ba39476a18af546186da625a6833a1529]With ti-sysc, we need to now have the device tree properties for ti,no-reset-on-init and ti,no-idle-on-init at the module level instead of the child device level.
Let's check for these properties at the child device level to enable quirks, and warn about moving the properties to the module level.
Quoted 6 lines
Otherwise am335x-evm based boards tagging gpio1 with ti,no-reset-on-init will have their DDR power disabled if wired up in such a tricky way.
Note that this should not be an issue for earlier kernels as we don't rely on this until the dts files have been updated to probe with ti-sysc interconnect target driver.
This is queued for 4.19-stable, but the comment seems to say it is not needed in the older kernels.
Tony, do we want this in 4.19?
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Jon Hunter
maintainerQuoted 36 lines · Greg Kroah-Hartman
Quoted 35 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.88 release. There are 321 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 Thu, 05 Dec 2019 22:30:32 +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.19.88-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Ding Tao <[email protected]>
arm64: dts: marvell: armada-37xx: Enable emmc on espressobinThe above commit is causing the following build failure for ARM64 ...
DTC
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtbarch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d0000: Reference to non-existent node or label "sdio_pins"
Quoted 6 lines
Quoted 3 lines
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d8000: Reference to non-existent node or label "mmc_pins"Thanks for letting me know, I'll go drop this one and push out a -rc2 with that removed.
Great! All tests now passing for Tegra ...
Test results for stable-v4.19:
13 builds: 13 pass, 0 fail
22 boots: 22 pass, 0 fail
32 tests: 32 pass, 0 failLinux version: 4.19.88-rc2-gba731ec12c66
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 49 lines · Jon Hunter
Quoted 36 lines · Greg Kroah-Hartman
Quoted 35 lines · Jon Hunter
Quoted 20 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.88 release. There are 321 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 Thu, 05 Dec 2019 22:30:32 +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.19.88-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:...
Quoted 2 lines
Ding Tao <[email protected]>
arm64: dts: marvell: armada-37xx: Enable emmc on espressobinThe above commit is causing the following build failure for ARM64 ...
DTC
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtbarch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d0000: Reference to non-existent node or label "sdio_pins"Quoted 6 lines
Quoted 3 lines
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: ERROR (phandle_references): /soc/internal-regs@d0000000/sdhci@d8000: Reference to non-existent node or label "mmc_pins"Thanks for letting me know, I'll go drop this one and push out a -rc2 with that removed.
Great! All tests now passing for Tegra ...
Test results for stable-v4.19:
Quoted 8 lines
13 builds: 13 pass, 0 fail 22 boots: 22 pass, 0 fail 32 tests: 32 pass, 0 failLinux version: 4.19.88-rc2-gba731ec12c66
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra30-cardhu-a04
Wonderful, thanks for testing all of these and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.88 release. There are 321 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 Thu, 05 Dec 2019 22:30:32 +0000. Anything received after that time might be too late.
Build results:
total: 156 pass: 156 fail: 0 Qemu test results: total: 390 pass: 390 fail: 0
Guenter
Quoted 2 lines
Thanks for letting me know, I'll go drop this one and push out a -rc2 with that removed.
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 4.19.88-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: ba731ec12c667db0f1f85e4bfe11387587feb243
git describe: v4.19.87-322-gba731ec12c66
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.87-322-gba731ec12c66
No regressions (compared to build v4.19.87)
No fixes (compared to build v4.19.87)
Ran 21276 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
Test Suites
-----------
* build
* kvm-unit-tests
* libhugetlbfs
* linux-log-parser
* ltp-containers-tests
* ltp-commands-tests
* ltp-dio-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-sched-tests
* ltp-cap_bounds-tests
* ltp-cpuhotplug-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-securebits-tests
* perf
* v4l2-compliance
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Re: [PATCH 4.19 082/321] ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
In reply to Greg Kroah-HartmanHi!
Quoted 11 lines
From: Hans de Goede <[email protected]>
[ Upstream commit
1a2fa02f7489dc4d746f2a15fb77b3ce1affade8]Ignore
acpi_device_fix_up_power()return value. If we return an error we end up withacpi_default_enumeration()still creating a platform- device for the device and we end up with the device still being used but without the special LPSS related handling which is not useful.Specicifically ignoring the error fixes the touchscreen no longer working after a suspend/resume on a Prowise PT301 tablet.
I'm pretty sure it does, but:
a) do you believe this is right patch for -stable? Should it get lot more testing in mainline as it.... may change things in a wrong way for someone else?
b) if we are ignoring errors now, should we at least printk() to let the user know that something is wrong with the ACPI tables?
Best regards,
Pavel
Quoted 20 lines
drivers/acpi/acpi_lpss.c +1
-6@@ -665,12 +665,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,* have _PS0 and _PS3 without _PSC (and no power resources), so * acpi_bus_init_power() will assume that the BIOS has put them into D0. */ - ret =acpi_device_fix_up_power (adev); -if (ret) { -/* Skip the device, but continue the namespace scan. */ - ret =0 ; - goto err_out; - } +acpi_device_fix_up_power (adev);drivers/acpi/acpi_lpss.c +0
-0adev->driver_data = pdata; pdev =acpi_create_platform_device (adev, dev_desc->properties);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 4.19 084/321] scsi: qla2xxx: Fix NPIV handling for FC-NVMe
In reply to Greg Kroah-HartmanHi!
Quoted 8 lines
From: Himanshu Madhani <[email protected]>
[ Upstream commit
5e6803b409ba3c18434de6693062d98a470bcb1e]This patch fixes issues with NPIV port with FC-NVMe. Clean up code for remoteport delete and also call
nvme_deletewhen deleting VPs.
drivers/scsi/qla2xxx/qla_nvme.c static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport) · line 560
Quoted 8 lines
drivers/scsi/qla2xxx/qla_nvme.c +1
-1@@ -564,7 +554,7 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)schedule_work (&fcport->free_work); } - fcport->nvme_flag &= ~(NVME_FLAG_REGISTERED |NVME_FLAG_DELETING ); + fcport->nvme_flag &= ~NVME_FLAG_DELETING ;ql_log (ql_log_info, fcport->vha,0x2110 ,"remoteport_delete of %p completed.\n" , fcport); }
Current -next-20191204 contains
fcport->nvme_flag &= ~NVME_FLAG_REGISTERED;
fcport->nvme_flag &= ~NVME_FLAG_DELETING;
... and there's no explanation in changelog why removing NVME_FLAG_REGISTERED is good idea.
Are you sure this change is correct and suitable for -stable?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 4.19 082/321] ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
In reply to Pavel MachekQuoted 11 lines · Pavel Machek
Hi!
Quoted 9 lines
From: Hans de Goede <[email protected]>
[ Upstream commit
1a2fa02f7489dc4d746f2a15fb77b3ce1affade8]Ignore
acpi_device_fix_up_power()return value. If we return an error we end up withacpi_default_enumeration()still creating a platform- device for the device and we end up with the device still being used but without the special LPSS related handling which is not useful.
Quoted 5 lines
Quoted 2 lines
Specicifically ignoring the error fixes the touchscreen no longer working after a suspend/resume on a Prowise PT301 tablet.
I'm pretty sure it does, but:
a) do you believe this is right patch for -stable?
Yes.
Quoted 1 line
Should it get lot more testing in mainline
It's been in the mainline since 5.0 and I'm not aware of any bug reports against it.
Quoted 5 lines
as it.... may change things in a wrong way
for someone else?b) if we are ignoring errors now, should we at least
printk()to let the user know that something is wrong with the ACPI tables?
The question whether or not to print a message is orthogonal to this patch. Perhaps it would be useful to print a message on an error regardless of whether or not the error is ignored, but then users would need to know what to do about that error message.
Quoted 19 lines
Quoted 19 lines
drivers/acpi/acpi_lpss.c +1
-6@@ -665,12 +665,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,* have _PS0 and _PS3 without _PSC (and no power resources), so * acpi_bus_init_power() will assume that the BIOS has put them into D0. */ - ret =acpi_device_fix_up_power (adev); -if (ret) { -/* Skip the device, but continue the namespace scan. */ - ret =0 ; - goto err_out; - } +acpi_device_fix_up_power (adev); adev->driver_data = pdata;pdev = acpi_create_platform_device(adev, dev_desc->properties);
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.88 release. There are 321 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 Thu, 05 Dec 2019 22:30:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.88-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Re: [PATCH 4.19 082/321] ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
In reply to Pavel MachekHi,
Quoted 11 lines · Pavel Machek
Hi!
Quoted 9 lines
From: Hans de Goede <[email protected]>
[ Upstream commit
1a2fa02f7489dc4d746f2a15fb77b3ce1affade8]Ignore
acpi_device_fix_up_power()return value. If we return an error we end up withacpi_default_enumeration()still creating a platform- device for the device and we end up with the device still being used but without the special LPSS related handling which is not useful.
Quoted 8 lines
Quoted 2 lines
Specicifically ignoring the error fixes the touchscreen no longer working after a suspend/resume on a Prowise PT301 tablet.
I'm pretty sure it does, but:
a) do you believe this is right patch for -stable? Should it get lot more testing in mainline as it.... may change things in a wrong way for someone else?
This has already been answered by Rafael.
Quoted 2 lines
b) if we are ignoring errors now, should we at least
printk()to let the user know that something is wrong with the ACPI tables?
acpi_device_fix_up_power() fails when the ACPI _PS0 method fails and when there are errors while executing an ACPI method the ACPI subsystem already is pretty verbose about this.
Regards,
Hans
Quoted 25 lines
Best regards,
PavelQuoted 20 lines
drivers/acpi/acpi_lpss.c +1
-6@@ -665,12 +665,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,* have _PS0 and _PS3 without _PSC (and no power resources), so * acpi_bus_init_power() will assume that the BIOS has put them into D0. */ - ret =acpi_device_fix_up_power (adev); -if (ret) { -/* Skip the device, but continue the namespace scan. */ - ret =0 ; - goto err_out; - } +acpi_device_fix_up_power (adev);adev->driver_data = pdata; pdev = acpi_create_platform_device(adev, dev_desc->properties);
Re: [PATCH 4.19 200/321] mm/page_alloc.c: deduplicate __memblock_free_early() and memblock_free()
In reply to Greg Kroah-HartmanHi!
Quoted 7 lines · Greg Kroah-Hartman
From: Wentao Wang <[email protected]>
[ Upstream commit
d31cfe7bff9109476da92c245b56083e9b48d60a]mm/memblock.c +0
-0@@ -1537,12 +1537,7 @@ void * __init memblock_virt_alloc_try_nid(*/
mm/memblock.c void * __init memblock_virt_alloc_try_nid( · line 1541
Quoted 10 lines
mm/memblock.c +1
-6void __init __memblock_free_early (phys_addr_t base,phys_addr_t size) { -phys_addr_t end = base + size -1 ; - -memblock_dbg ("%s: [%pa-%pa] %pF\n" , - __func__, &base, &end, (void *)_RET_IP_); -kmemleak_free_part_phys (base, size); -memblock_remove_range (&memblock.reserved, base, size); +memblock_free (base, size); }
This makes the memblock_dbg() less useful: _RET_IP_ will now be one of __memblock_free_early(), not of the original caller.
That may be okay, but I guess it should be mentioned in changelog, and I don't really see why it is queued for -stable.
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 4.19 200/321] mm/page_alloc.c: deduplicate __memblock_free_early() and memblock_free()
Quoted 23 lines · Pavel Machek
Hi!
Quoted 7 lines · Greg Kroah-Hartman
From: Wentao Wang <[email protected]>
[ Upstream commit
d31cfe7bff9109476da92c245b56083e9b48d60a]mm/memblock.c +0
-0@@ -1537,12 +1537,7 @@ void * __init memblock_virt_alloc_try_nid(*/ mm/memblock.c void * __init memblock_virt_alloc_try_nid( · line 1541
Quoted 10 lines
mm/memblock.c +1
-6void __init __memblock_free_early (phys_addr_t base,phys_addr_t size) { -phys_addr_t end = base + size -1 ; - -memblock_dbg ("%s: [%pa-%pa] %pF\n" , - __func__, &base, &end, (void *)_RET_IP_); -kmemleak_free_part_phys (base, size); -memblock_remove_range (&memblock.reserved, base, size); +memblock_free (base, size); }This makes the
memblock_dbg()less useful: _RET_IP_ will now be one of__memblock_free_early(), not of the original caller.
Quoted 2 lines
That may be okay, but I guess it should be mentioned in changelog, and I don't really see why it is queued for -stable.
Not sure why this one was picked for -stable, but in upstream there is a followup commit 4d72868c8f7c ("memblock: replace usage of __memblock_free_early() with memblock_free()") that completely eliminates __memblock_free_early(). IMHO it would make sense to either to take both or to drop both.
Quoted 5 lines
Best regards,
PavelSignature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Signature · 2 lines
Sincerely yours, Mike.
Re: [PATCH 4.19 084/321] scsi: qla2xxx: Fix NPIV handling for FC-NVMe
In reply to Pavel MachekHello,
On 12/4/19, 3:48 PM, "Pavel Machek" <[email protected] on behalf of [email protected]> wrote:
Hi!
> From: Himanshu Madhani <[email protected]>
>
> [ Upstream commit 5e6803b409ba3c18434de6693062d98a470bcb1e ]
>
> This patch fixes issues with NPIV port with FC-NVMe. Clean up code for
> remoteport delete and also call nvme_delete when deleting VPs.
> @@ -564,7 +554,7 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
> schedule_work(&fcport->free_work);
> }
>
> - fcport->nvme_flag &= ~(NVME_FLAG_REGISTERED | NVME_FLAG_DELETING);
> + fcport->nvme_flag &= ~NVME_FLAG_DELETING;
> ql_log(ql_log_info, fcport->vha, 0x2110,
> "remoteport_delete of %p completed.\n", fcport);
> }
Current -next-20191204 contains
fcport->nvme_flag &= ~NVME_FLAG_REGISTERED;
fcport->nvme_flag &= ~ NVME_FLAG_DELETING;
... and there's no explanation in changelog why removing
NVME_FLAG_REGISTERED is good idea.This patch was mostly cleanup and if you notice on line 541 we are already clearing up NVME_FLAG_REGISTERED flag.
e84067d743010 (Duane Grigsby 2017-06-21 13:48:43 -0700 541) fcport->nvme_flag &= ~NVME_FLAG_REGISTERED;
so this patch is just removing duplicate clearing. At some point we will need to fix double line of clearing NVME_FLAG_REGISTERED and NVME_FLAG_DELETING in one line. I'll send patch to fix that for net-next.
Thanks,
Himanshu
Are you sure this change is correct and suitable for -stable?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 4.19 226/321] mm/hotplug: invalid PFNs from pfn_to_online_page()
In reply to Greg Kroah-HartmanHi!
Quoted 5 lines
This is due to the commit
9f1eb38e0e11("mm, kmemleak: little optimization while scanning") starts to usepfn_to_online_page()instead ofpfn_valid(). However, in theCONFIG_MEMORY_HOTPLUG=ycase,pfn_to_online_page()does not callmemblock_is_map_memory()whilepfn_valid()does.
...
Quoted 1 line
Fixes 9f1eb38e0e11 ("mm, kmemleak: little optimization while scanning")
Commit 9f1eb38e0e11 does not seem to be in v4.19-stable tree. Is this commit still neccessary/good idea?
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html