core/linux-mmp to 3.18.45-2

This commit is contained in:
Kevin Mihelich 2016-12-09 03:23:02 +00:00
parent b89776a26b
commit 12cff11fa1
10 changed files with 128 additions and 33 deletions

View file

@ -1,7 +1,7 @@
From d09252bdaa8747fa2bd0b8c3b66b2d062f9f985b Mon Sep 17 00:00:00 2001
From 50c47ecd8e145225551e33de572eb4bde84b864a Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 26 Jan 2015 11:03:08 -0700
Subject: [PATCH 1/8] clk:mmp: Adding clocks of pxa168 peripherals for gplugd
Subject: [PATCH 1/9] clk:mmp: Adding clocks of pxa168 peripherals for gplugd
1. Adding peripherals register address information
2. Changing clock names for sd driver reference sdhci-pxav2
@ -335,5 +335,5 @@ index 014396b..39a80fb 100644
+ clk_register_clkdev(clk, NULL, "pxa168-eth");
}
--
2.8.0
2.10.2

View file

@ -1,7 +1,7 @@
From 2b7b0fc0e98bd91972413e1a5ecdc568102bd7b8 Mon Sep 17 00:00:00 2001
From e43cc7d091352f82d2fda3439a68e2c5d03420c0 Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 27 Jan 2014 09:26:20 -0700
Subject: [PATCH 2/8] arch:arm:mmp: initialize gpio driver before other drivers
Subject: [PATCH 2/9] arch:arm:mmp: initialize gpio driver before other drivers
Add gpio driver for pxa168 based gplugd before adding other
peripheral drivers to boot properly.
@ -49,5 +49,5 @@ index d81b247..83a7019 100644
pxa168_add_eth(&gplugd_eth_platform_data);
}
--
2.8.0
2.10.2

View file

@ -1,7 +1,7 @@
From b4db6ab77256a6761670e45fa4738fc775063d2e Mon Sep 17 00:00:00 2001
From 13c6324acbf65678412415d6c0272878bc02dea8 Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 27 Jan 2014 09:47:06 -0700
Subject: [PATCH 3/8] arch:arm:mmp: Adding spi master and mtd dataflash for
Subject: [PATCH 3/9] arch:arm:mmp: Adding spi master and mtd dataflash for
gplugd
1. Adding SPI master for gplugd
@ -89,5 +89,5 @@ index 83a7019..9c441e1 100644
MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform")
--
2.8.0
2.10.2

View file

@ -1,7 +1,7 @@
From 50bdeeeb6490c8ee3da64b466c3eef2e11df199f Mon Sep 17 00:00:00 2001
From 1f105cbfcbd629d29bdbad20199129e7cf964caa Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 26 Jan 2015 11:08:19 -0700
Subject: [PATCH 4/8] drivers:spi: Adding mmp dependency for SPI_PXA2XX
Subject: [PATCH 4/9] drivers:spi: Adding mmp dependency for SPI_PXA2XX
adding arch_mmp dependency for SPI_PXA2XX as pxa168 based gplugd
uses SPI_PXA2XX
@ -30,5 +30,5 @@ index 84e7c9e..caa969f 100644
This enables using a PXA2xx or Sodaville SSP port as a SPI master
controller. The driver can be configured to use any SSP port and
--
2.8.0
2.10.2

View file

@ -1,7 +1,7 @@
From 0301652be6fa93f3f0cd6de523cfc896c868d312 Mon Sep 17 00:00:00 2001
From 495551c342fe06cec9a3c1af632b26d10639b153 Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 26 Jan 2015 11:28:52 -0700
Subject: [PATCH 5/8] mmp:ethernet: Adding ethernet MAC address reading for
Subject: [PATCH 5/9] mmp:ethernet: Adding ethernet MAC address reading for
gplugd
Currently Marvell's pxa168 ethernet driver uses random MAC address
@ -219,5 +219,5 @@ index 18d75e7..ca94155 100644
#endif /* __LINUX_PXA168_ETH_H */
--
2.8.0
2.10.2

View file

@ -1,7 +1,7 @@
From 467a8c6aba68b033b95538419e09358ce0d99694 Mon Sep 17 00:00:00 2001
From 0e9da541d71f8f60362d43d78ff915fc61c4f05f Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 26 Jan 2015 11:40:41 -0700
Subject: [PATCH 6/8] mmp:mmc: adding sdhc support for pxa168 based gplugd
Subject: [PATCH 6/9] mmp:mmc: adding sdhc support for pxa168 based gplugd
Fixing can't talk to controller for sdhci PXAV2
@ -177,5 +177,5 @@ index b4c23e9..f0f36c9 100644
dev_err(dev, "failed to get io clock\n");
ret = PTR_ERR(clk);
--
2.8.0
2.10.2

View file

@ -1,7 +1,7 @@
From e5510c9645ffce45c0f9f58c7612cb795baf514f Mon Sep 17 00:00:00 2001
From 17ec3d3ac862cf798485230c032eeb911afa642a Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 26 Jan 2015 11:51:13 -0700
Subject: [PATCH 7/8] arch:arm:mmp: Adding USB Host and OTG peripheral for
Subject: [PATCH 7/9] arch:arm:mmp: Adding USB Host and OTG peripheral for
pxa168
Adding USB host, USB OTG peripherals memory, register information
@ -160,5 +160,5 @@ index def8f46..feed849 100644
extern int __init pxa168_add_usb_host(struct mv_usb_platform_data *pdata);
--
2.8.0
2.10.2

View file

@ -1,7 +1,7 @@
From 2d2edca6a4b43aa752722192288b55c09174832b Mon Sep 17 00:00:00 2001
From f25bccd3f00f61ffffef99dc2e55770095c81c19 Mon Sep 17 00:00:00 2001
From: Ashokkumar G <0xfee1dead.sa@gmail.com>
Date: Mon, 26 Jan 2015 12:08:26 -0700
Subject: [PATCH 8/8] arch:arm:mmp:gplugd: Fix gPlugD reboot issue
Subject: [PATCH 8/9] arch:arm:mmp:gplugd: Fix gPlugD reboot issue
Board hangs in u-boot after issuing reboot related
commands from Linux console due to not resetting
@ -143,5 +143,5 @@ index 0000000..91ecb78
+
+#endif /* __ASM_MACH_REGS_APMU_H */
--
2.8.0
2.10.2

View file

@ -0,0 +1,92 @@
From 061da405aa4108735134e85191dc48467f6dec35 Mon Sep 17 00:00:00 2001
From: Philip Pettersson <philip.pettersson@gmail.com>
Date: Wed, 30 Nov 2016 14:55:36 -0800
Subject: [PATCH 9/9] packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to a use-after-free on a function pointer in the
struct timer_list when the socket is closed as the previously
initialized timer will not be deleted.
The bug is fixed by taking lock_sock(sk) in packet_setsockopt when
changing the packet version while also taking the lock at the start
of packet_set_ring.
Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
Signed-off-by: Philip Pettersson <philip.pettersson@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/packet/af_packet.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index e73b3fb..abffc15 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3281,19 +3281,25 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
if (optlen != sizeof(val))
return -EINVAL;
- if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
- return -EBUSY;
if (copy_from_user(&val, optval, sizeof(val)))
return -EFAULT;
switch (val) {
case TPACKET_V1:
case TPACKET_V2:
case TPACKET_V3:
- po->tp_version = val;
- return 0;
+ break;
default:
return -EINVAL;
}
+ lock_sock(sk);
+ if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
+ ret = -EBUSY;
+ } else {
+ po->tp_version = val;
+ ret = 0;
+ }
+ release_sock(sk);
+ return ret;
}
case PACKET_RESERVE:
{
@@ -3756,6 +3762,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
/* Added to avoid minimal code churn */
struct tpacket_req *req = &req_u->req;
+ lock_sock(sk);
/* Opening a Tx-ring is NOT supported in TPACKET_V3 */
if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
WARN(1, "Tx-ring is not supported.\n");
@@ -3837,7 +3844,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
goto out;
}
- lock_sock(sk);
/* Detach socket from network */
spin_lock(&po->bind_lock);
@@ -3886,11 +3892,11 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
if (!tx_ring)
prb_shutdown_retire_blk_timer(po, tx_ring, rb_queue);
}
- release_sock(sk);
if (pg_vec)
free_pg_vec(pg_vec, order, req->tp_block_nr);
out:
+ release_sock(sk);
return err;
}
--
2.10.2

View file

@ -8,7 +8,7 @@ _srcname=linux-3.18
_kernelname=${pkgbase#linux}
_desc="Marvell PXA168/MMP platforms"
pkgver=3.18.45
pkgrel=1
pkgrel=2
arch=('arm')
url="https://github.com/Marvell-Semi/PXA168_kernel/tree/gplugd-dev"
license=('GPL2')
@ -24,17 +24,19 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
'0006-mmp-mmc-adding-sdhc-support-for-pxa168-based-gplugd.patch'
'0007-arch-arm-mmp-Adding-USB-Host-and-OTG-peripheral-for-.patch'
'0008-arch-arm-mmp-gplugd-Fix-gPlugD-reboot-issue.patch'
'0009-packet-fix-race-condition-in-packet_set_ring.patch'
'config')
md5sums=('9e854df51ca3fef8bfe566dbd7b89241'
'46375e6ec7ed50e9497390c1f6bb92b3'
'956a8b53a33b60968e68609e07892b3e'
'4ea1754be6fa76c6eefb734751eefe3f'
'de2d584e824988f2fe5290e45ecadc88'
'33a041756c3bebf111db13726dc9ef81'
'a6443837c3c1e1d29c77fd3393ffdf4d'
'1edc88fd718fca908a1ef30cfe7fc906'
'2d74c4384883e3a3dca55aab8eb17e8e'
'75649853ce1f2d3e42fbcef18105e94a'
'e505809b8ff9f233986ab0797a8932fc'
'1c33a3d7c9dcb256e288f1f679c595df'
'f56073b69e187d97119cc2b1d947ff13'
'bbc148c838fef6bc255ca12ed6c32d3a'
'4048860d050595f333c143f5c00caa00'
'de8fd3a885883dc75be987dd534cffbf'
'2ac5d79b6aef4243aeef43f0e1aaa81e'
'01a8473817232b928de05ad05743aabc'
'eb616d6ad2bdd44b1136220adadd8330'
'402813a242ce345758a31518f9cd8573')
prepare() {
@ -52,6 +54,7 @@ prepare() {
git apply ../0006-mmp-mmc-adding-sdhc-support-for-pxa168-based-gplugd.patch
git apply ../0007-arch-arm-mmp-Adding-USB-Host-and-OTG-peripheral-for-.patch
git apply ../0008-arch-arm-mmp-gplugd-Fix-gPlugD-reboot-issue.patch
git apply ../0009-packet-fix-race-condition-in-packet_set_ring.patch
cat "${srcdir}/config" > ./.config