kernel: bump 4.9 to 4.9.150

Refreshed all patches.

Remove upstreamed:
- 510-f2fs-fix-sanity_check_raw_super-on-big-endian-machines.patch

Altered patches:
- 024-7-net-reorganize-struct-sock-for-better-data-locality.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
Koen Vandeputte 2019-01-15 11:57:34 +01:00
parent f34ad1a8f0
commit cae263227f
18 changed files with 46 additions and 101 deletions

View File

@ -2,10 +2,10 @@
LINUX_RELEASE?=1
LINUX_VERSION-4.9 = .148
LINUX_VERSION-4.9 = .150
LINUX_VERSION-4.14 = .91
LINUX_KERNEL_HASH-4.9.148 = 6067151b0225a8de1ab79abc9be7bae237eaca0cd838eb26684169560d88a994
LINUX_KERNEL_HASH-4.9.150 = 94cc177ba2b433e4e30fefef38de33248ba1e2499ebda905096a8822097117e4
LINUX_KERNEL_HASH-4.14.91 = 6a587c8b4160918efa082b0c2eda8c2db0f50d8814ad1d1ac94be1edf66ca6a9
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))

View File

@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -688,6 +688,8 @@ static int bcm2835_spi_setup(struct spi_
@@ -686,6 +686,8 @@ static int bcm2835_spi_setup(struct spi_
{
int err;
struct gpio_chip *chip;
@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/*
* sanity checking the native-chipselects
*/
@@ -704,15 +706,42 @@ static int bcm2835_spi_setup(struct spi_
@@ -702,15 +704,42 @@ static int bcm2835_spi_setup(struct spi_
"setup: only two native chip-selects are supported\n");
return -EINVAL;
}

View File

@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -707,6 +707,7 @@ static int bcm2835_spi_setup(struct spi_
@@ -705,6 +705,7 @@ static int bcm2835_spi_setup(struct spi_
return -EINVAL;
}
@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* now translate native cs to GPIO */
/* first look for chip select pins in the devices pin groups */
for (pingroup_index = 0;
@@ -756,6 +757,7 @@ static int bcm2835_spi_setup(struct spi_
@@ -754,6 +755,7 @@ static int bcm2835_spi_setup(struct spi_
spi->chip_select, spi->cs_gpio, err);
return err;
}

View File

@ -9,7 +9,7 @@ Subject: [PATCH] spi-bcm2835: Remove unused code
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -679,17 +679,8 @@ static void bcm2835_spi_set_cs(struct sp
@@ -677,17 +677,8 @@ static void bcm2835_spi_set_cs(struct sp
bcm2835_wr(bs, BCM2835_SPI_CS, cs);
}
@ -27,7 +27,7 @@ Subject: [PATCH] spi-bcm2835: Remove unused code
/*
* sanity checking the native-chipselects
*/
@@ -707,58 +698,6 @@ static int bcm2835_spi_setup(struct spi_
@@ -705,58 +696,6 @@ static int bcm2835_spi_setup(struct spi_
return -EINVAL;
}

View File

@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -343,6 +343,9 @@ struct sock {
@@ -344,6 +344,9 @@ struct sock {
#define sk_rxhash __sk_common.skc_rxhash
socket_lock_t sk_lock;
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct sk_buff_head sk_receive_queue;
/*
* The backlog queue is special, it is always used with
@@ -359,14 +362,13 @@ struct sock {
@@ -360,14 +363,13 @@ struct sock {
struct sk_buff *tail;
} sk_backlog;
#define sk_rmem_alloc sk_backlog.rmem_alloc
@ -80,7 +80,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int sk_rcvbuf;
struct sk_filter __rcu *sk_filter;
@@ -379,11 +381,30 @@ struct sock {
@@ -380,11 +382,30 @@ struct sock {
#endif
struct dst_entry *sk_rx_dst;
struct dst_entry __rcu *sk_dst_cache;
@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/*
* Because of non atomicity rules, all
@@ -399,41 +420,23 @@ struct sock {
@@ -400,31 +421,17 @@ struct sock {
#define SK_PROTOCOL_MAX U8_MAX
kmemcheck_bitfield_end(flags);
@ -143,8 +143,9 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
- long sk_sndtimeo;
- struct timer_list sk_timer;
ktime_t sk_stamp;
u16 sk_tsflags;
u8 sk_shutdown;
#if BITS_PER_LONG==32
seqlock_t sk_stamp_seq;
@@ -434,10 +441,6 @@ struct sock {
u32 sk_tskey;
struct socket *sk_socket;
void *sk_user_data;

View File

@ -44,7 +44,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
* @sk_lingertime: %SO_LINGER l_linger setting
* @sk_backlog: always used with the per-socket spinlock held
* @sk_callback_lock: used with the callbacks in the end of this struct
@@ -421,6 +422,8 @@ struct sock {
@@ -422,6 +423,8 @@ struct sock {
kmemcheck_bitfield_end(flags);
u16 sk_gso_max_segs;
@ -55,7 +55,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
rwlock_t sk_callback_lock;
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2475,6 +2475,7 @@ void sock_init_data(struct socket *sock,
@@ -2478,6 +2478,7 @@ void sock_init_data(struct socket *sock,
sk->sk_max_pacing_rate = ~0U;
sk->sk_pacing_rate = ~0U;

View File

@ -269,7 +269,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
"NAPI Complete, did %d packets with budget %d\n",
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -658,7 +658,7 @@ static int xgene_enet_napi(struct napi_s
@@ -655,7 +655,7 @@ static int xgene_enet_napi(struct napi_s
processed = xgene_enet_process_ring(ring, budget);
if (processed != budget) {
@ -701,7 +701,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1320,7 +1320,7 @@ restart_poll:
@@ -1324,7 +1324,7 @@ restart_poll:
ibmveth_replenish_task(adapter);
if (frames_processed < budget) {

View File

@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -957,7 +957,7 @@ static void init_tel_txopt(struct ipv6_t
@@ -958,7 +958,7 @@ static void init_tel_txopt(struct ipv6_t
opt->dst_opt[5] = IPV6_TLV_PADN;
opt->dst_opt[6] = 1;
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
opt->ops.opt_nflen = 8;
}
@@ -1199,7 +1199,7 @@ route_lookup:
@@ -1200,7 +1200,7 @@ route_lookup:
if (encap_limit >= 0) {
init_tel_txopt(&opt, encap_limit);

View File

@ -33,11 +33,9 @@ CC: stable@vger.kernel.org # v4.0+
arch/arm/mach-cns3xxx/pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
index 5e11ad3164e0..95a11d5b3587 100644
--- a/arch/arm/mach-cns3xxx/pcie.c
+++ b/arch/arm/mach-cns3xxx/pcie.c
@@ -93,7 +93,7 @@ static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
@@ -93,7 +93,7 @@ static int cns3xxx_pci_read_config(struc
u32 mask = (0x1ull << (size * 8)) - 1;
int shift = (where % 4) * 8;
@ -46,6 +44,3 @@ index 5e11ad3164e0..95a11d5b3587 100644
if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
(where & 0xffc) == PCI_CLASS_REVISION)
--
2.17.1

View File

@ -15,7 +15,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1312,6 +1312,9 @@ int genphy_update_link(struct phy_device
@@ -1309,6 +1309,9 @@ int genphy_update_link(struct phy_device
{
int status;

View File

@ -328,7 +328,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3084,6 +3084,8 @@ static __net_initdata struct pernet_oper
@@ -3087,6 +3087,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+
config SPI_ATMEL_QUADSPI
tristate "Atmel Quad SPI Controller"
depends on ARCH_AT91 || (ARM && COMPILE_TEST)
depends on ARCH_AT91 || (ARM && COMPILE_TEST && !ARCH_EBSA110)
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1648,10 +1648,12 @@ int spi_nor_scan(struct spi_nor *nor, co

View File

@ -1,51 +0,0 @@
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: linux-f2fs-devel@lists.sourceforge.net, yuchao0@huawei.com,
jaegeuk@kernel.org
Subject: [PATCH v2 1/1] f2fs: fix validation of the block count in
sanity_check_raw_super
Date: Sat, 22 Dec 2018 11:22:26 +0100
Message-Id: <20181222102226.10050-2-martin.blumenstingl@googlemail.com>
Treat "block_count" from struct f2fs_super_block as 64-bit little endian
value in sanity_check_raw_super() because struct f2fs_super_block
declares "block_count" as "__le64".
This fixes a bug where the superblock validation fails on big endian
devices with the following error:
F2FS-fs (sda1): Wrong segment_count / block_count (61439 > 0)
F2FS-fs (sda1): Can't find valid F2FS filesystem in 1th superblock
F2FS-fs (sda1): Wrong segment_count / block_count (61439 > 0)
F2FS-fs (sda1): Can't find valid F2FS filesystem in 2th superblock
As result of this the partition cannot be mounted.
With this patch applied the superblock validation works fine and the
partition can be mounted again:
F2FS-fs (sda1): Mounted with checkpoint version = 7c84
My little endian x86-64 hardware was able to mount the partition without
this fix.
To confirm that mounting f2fs filesystems works on big endian machines
again I tested this on a 32-bit MIPS big endian (lantiq) device.
Fixes: 0cfe75c5b01199 ("f2fs: enhance sanity_check_raw_super() to avoid potential overflows")
Cc: stable@vger.kernel.org
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
---
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1427,10 +1427,10 @@ static int sanity_check_raw_super(struct
return 1;
}
- if (segment_count > (le32_to_cpu(raw_super->block_count) >> 9)) {
+ if (segment_count > (le64_to_cpu(raw_super->block_count) >> 9)) {
f2fs_msg(sb, KERN_INFO,
- "Wrong segment_count / block_count (%u > %u)",
- segment_count, le32_to_cpu(raw_super->block_count));
+ "Wrong segment_count / block_count (%u > %llu)",
+ segment_count, le64_to_cpu(raw_super->block_count));
return 1;
}

View File

@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
@@ -3266,6 +3268,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
@@ -3879,6 +3882,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
default:
return -ENOPROTOOPT;
}
@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
@@ -3931,6 +3944,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;

View File

@ -292,7 +292,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
@@ -961,6 +1100,7 @@ static void init_tel_txopt(struct ipv6_t
@@ -962,6 +1101,7 @@ static void init_tel_txopt(struct ipv6_t
opt->ops.opt_nflen = 8;
}
@ -300,7 +300,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
/**
* ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
* @t: the outgoing tunnel device
@@ -1299,6 +1439,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1300,6 +1440,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
{
struct ip6_tnl *t = netdev_priv(dev);
struct ipv6hdr *ipv6h;
@ -308,7 +308,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
int encap_limit = -1;
__u16 offset;
struct flowi6 fl6;
@@ -1361,6 +1502,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1362,6 +1503,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_mark = skb->mark;
}
@ -327,7 +327,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
return -1;
@@ -1488,6 +1641,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
@@ -1489,6 +1642,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.flowinfo = p->flowinfo;
t->parms.link = p->link;
t->parms.proto = p->proto;
@ -342,7 +342,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
dst_cache_reset(&t->dst_cache);
ip6_tnl_link_config(t);
return 0;
@@ -1526,6 +1687,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
@@ -1527,6 +1688,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
p->flowinfo = u->flowinfo;
p->link = u->link;
p->proto = u->proto;
@ -350,7 +350,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
memcpy(p->name, u->name, sizeof(u->name));
}
@@ -1903,6 +2065,15 @@ static int ip6_tnl_validate(struct nlatt
@@ -1904,6 +2066,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
@ -366,7 +366,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
@@ -1937,6 +2108,46 @@ static void ip6_tnl_netlink_parms(struct
@@ -1938,6 +2109,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_COLLECT_METADATA])
parms->collect_md = true;
@ -413,7 +413,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
@@ -2050,6 +2261,12 @@ static void ip6_tnl_dellink(struct net_d
@@ -2051,6 +2262,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
@ -426,7 +426,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
@@ -2077,6 +2294,24 @@ static size_t ip6_tnl_get_size(const str
@@ -2078,6 +2295,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(2) +
/* IFLA_IPTUN_COLLECT_METADATA */
nla_total_size(0) +
@ -451,7 +451,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
0;
}
@@ -2084,6 +2319,9 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2085,6 +2320,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
@ -461,7 +461,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
@@ -2092,9 +2330,27 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2093,9 +2331,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) ||
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
@ -490,7 +490,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
@@ -2132,6 +2388,7 @@ static const struct nla_policy ip6_tnl_p
@@ -2133,6 +2389,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_SPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },

View File

@ -76,7 +76,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static inline const char *rtn_type(char *buf, size_t len, unsigned int t)
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -157,6 +157,7 @@ static int ipmr_rule_action(struct fib_r
@@ -159,6 +159,7 @@ static int ipmr_rule_action(struct fib_r
case FR_ACT_UNREACHABLE:
return -ENETUNREACH;
case FR_ACT_PROHIBIT:
@ -99,7 +99,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
tb_id = fib_rule_get_table(rule, arg);
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -167,6 +167,8 @@ static int ip6mr_rule_action(struct fib_
@@ -169,6 +169,8 @@ static int ip6mr_rule_action(struct fib_
return -ENETUNREACH;
case FR_ACT_PROHIBIT:
return -EACCES;

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1001,6 +1001,9 @@ void phy_detach(struct phy_device *phyde
@@ -998,6 +998,9 @@ void phy_detach(struct phy_device *phyde
struct mii_bus *bus;
int i;

View File

@ -1695,7 +1695,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
EXPORT_SYMBOL(phy_ethtool_get_wol);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1046,7 +1046,7 @@ int phy_suspend(struct phy_device *phyde
@@ -1043,7 +1043,7 @@ int phy_suspend(struct phy_device *phyde
if (wol.wolopts)
return -EBUSY;
@ -1704,7 +1704,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ret = phydrv->suspend(phydev);
if (ret)
@@ -1063,7 +1063,7 @@ int phy_resume(struct phy_device *phydev
@@ -1060,7 +1060,7 @@ int phy_resume(struct phy_device *phydev
struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver);
int ret = 0;
@ -1713,7 +1713,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ret = phydrv->resume(phydev);
if (ret)
@@ -1720,7 +1720,7 @@ static int phy_remove(struct device *dev
@@ -1717,7 +1717,7 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);