Refactor Marvell kernel sources
Rename LINUXFAMILY: marvell to mvebu Replace default kernel with 4.4.x branch from dev configuration
This commit is contained in:
parent
3cb6520cad
commit
baab6587a5
@ -1,12 +1,12 @@
|
||||
# Marvell Armada 38x 1x mPCIe M.2 2xGBE SFP
|
||||
BOARD_NAME="Clearfog Base"
|
||||
LINUXFAMILY="marvell"
|
||||
LINUXFAMILY="mvebu"
|
||||
BOOTCONFIG="armada_38x_clearfog_config"
|
||||
MODULES=""
|
||||
MODULES_NEXT="mv_cesa"
|
||||
MODULES_DEV="mv_cesa"
|
||||
CLI_TARGET="jessie,xenial:default,next"
|
||||
KERNEL_TARGET="default,next,dev"
|
||||
KERNEL_TARGET="default,next"
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="http://docs.armbian.com/Hardware_Other/#marvel-armada-clearfog"
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
# Marvell Armada 38x 2x mPCIe M.2 BBE Switch SFP
|
||||
BOARD_NAME="Clearfog Pro"
|
||||
LINUXFAMILY="marvell"
|
||||
LINUXFAMILY="mvebu"
|
||||
BOOTCONFIG="armada_38x_clearfog_config"
|
||||
MODULES=""
|
||||
MODULES_NEXT="#mv88e6xxx_drv mv_cesa"
|
||||
MODULES_DEV="mv_cesa"
|
||||
CLI_TARGET="jessie,xenial:default,next"
|
||||
KERNEL_TARGET="default,next,dev"
|
||||
KERNEL_TARGET="default,next"
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="http://docs.armbian.com/Hardware_Other/#marvel-armada-clearfog"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -16,9 +16,9 @@ HAS_UUID_SUPPORT=yes
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
KERNELSOURCE='https://github.com/SolidRun/linux-armada38x'
|
||||
KERNELBRANCH='branch:linux-3.10.70-15t1-clearfog'
|
||||
KERNELDIR='linux-armada'
|
||||
KERNELSOURCE='https://github.com/moonman/linux-stable'
|
||||
KERNELBRANCH='branch:linux-4.4.y-marvell'
|
||||
KERNELDIR='linux-armada-lts'
|
||||
;;
|
||||
|
||||
next)
|
||||
@ -26,12 +26,6 @@ case $BRANCH in
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
|
||||
dev)
|
||||
KERNELSOURCE='https://github.com/moonman/linux-stable'
|
||||
KERNELBRANCH='branch:linux-4.4.y-marvell'
|
||||
KERNELDIR='linux-armada-lts'
|
||||
;;
|
||||
esac
|
||||
|
||||
CPUMIN=800000
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,599 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b1129094ebfd..d2a3930159ea 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 73
|
||||
+SUBLEVEL = 74
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
|
||||
index 1382fec9e8c5..7fcb1ac0f232 100644
|
||||
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
|
||||
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
|
||||
@@ -50,6 +50,7 @@ ethernet@b0000 {
|
||||
fsl,num_tx_queues = <0x8>;
|
||||
fsl,magic-packet;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
+ ranges;
|
||||
|
||||
queue-group@b0000 {
|
||||
#address-cells = <1>;
|
||||
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
|
||||
index 221cd2ea5b31..9f25427c1527 100644
|
||||
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
|
||||
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
|
||||
@@ -50,6 +50,7 @@ ethernet@b1000 {
|
||||
fsl,num_tx_queues = <0x8>;
|
||||
fsl,magic-packet;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
+ ranges;
|
||||
|
||||
queue-group@b1000 {
|
||||
#address-cells = <1>;
|
||||
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
|
||||
index 61456c317609..cd7c318ab131 100644
|
||||
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
|
||||
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
|
||||
@@ -49,6 +49,7 @@ ethernet@b2000 {
|
||||
fsl,num_tx_queues = <0x8>;
|
||||
fsl,magic-packet;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
+ ranges;
|
||||
|
||||
queue-group@b2000 {
|
||||
#address-cells = <1>;
|
||||
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
|
||||
index a87f0c42cb8b..f69fed826a56 100644
|
||||
--- a/drivers/md/dm.c
|
||||
+++ b/drivers/md/dm.c
|
||||
@@ -2333,10 +2333,16 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
|
||||
set_bit(DMF_FREEING, &md->flags);
|
||||
spin_unlock(&_minor_lock);
|
||||
|
||||
+ /*
|
||||
+ * Take suspend_lock so that presuspend and postsuspend methods
|
||||
+ * do not race with internal suspend.
|
||||
+ */
|
||||
+ mutex_lock(&md->suspend_lock);
|
||||
if (!dm_suspended_md(md)) {
|
||||
dm_table_presuspend_targets(map);
|
||||
dm_table_postsuspend_targets(map);
|
||||
}
|
||||
+ mutex_unlock(&md->suspend_lock);
|
||||
|
||||
/*
|
||||
* Rare, but there may be I/O requests still going to complete,
|
||||
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
|
||||
index ed2130727643..f6415fda103b 100644
|
||||
--- a/drivers/net/ethernet/amd/pcnet32.c
|
||||
+++ b/drivers/net/ethernet/amd/pcnet32.c
|
||||
@@ -1516,7 +1516,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
{
|
||||
struct pcnet32_private *lp;
|
||||
int i, media;
|
||||
- int fdx, mii, fset, dxsuflo;
|
||||
+ int fdx, mii, fset, dxsuflo, sram;
|
||||
int chip_version;
|
||||
char *chipname;
|
||||
struct net_device *dev;
|
||||
@@ -1553,7 +1553,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
}
|
||||
|
||||
/* initialize variables */
|
||||
- fdx = mii = fset = dxsuflo = 0;
|
||||
+ fdx = mii = fset = dxsuflo = sram = 0;
|
||||
chip_version = (chip_version >> 12) & 0xffff;
|
||||
|
||||
switch (chip_version) {
|
||||
@@ -1586,6 +1586,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
chipname = "PCnet/FAST III 79C973"; /* PCI */
|
||||
fdx = 1;
|
||||
mii = 1;
|
||||
+ sram = 1;
|
||||
break;
|
||||
case 0x2626:
|
||||
chipname = "PCnet/Home 79C978"; /* PCI */
|
||||
@@ -1609,6 +1610,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
chipname = "PCnet/FAST III 79C975"; /* PCI */
|
||||
fdx = 1;
|
||||
mii = 1;
|
||||
+ sram = 1;
|
||||
break;
|
||||
case 0x2628:
|
||||
chipname = "PCnet/PRO 79C976";
|
||||
@@ -1637,6 +1639,31 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
dxsuflo = 1;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * The Am79C973/Am79C975 controllers come with 12K of SRAM
|
||||
+ * which we can use for the Tx/Rx buffers but most importantly,
|
||||
+ * the use of SRAM allow us to use the BCR18:NOUFLO bit to avoid
|
||||
+ * Tx fifo underflows.
|
||||
+ */
|
||||
+ if (sram) {
|
||||
+ /*
|
||||
+ * The SRAM is being configured in two steps. First we
|
||||
+ * set the SRAM size in the BCR25:SRAM_SIZE bits. According
|
||||
+ * to the datasheet, each bit corresponds to a 512-byte
|
||||
+ * page so we can have at most 24 pages. The SRAM_SIZE
|
||||
+ * holds the value of the upper 8 bits of the 16-bit SRAM size.
|
||||
+ * The low 8-bits start at 0x00 and end at 0xff. So the
|
||||
+ * address range is from 0x0000 up to 0x17ff. Therefore,
|
||||
+ * the SRAM_SIZE is set to 0x17. The next step is to set
|
||||
+ * the BCR26:SRAM_BND midway through so the Tx and Rx
|
||||
+ * buffers can share the SRAM equally.
|
||||
+ */
|
||||
+ a->write_bcr(ioaddr, 25, 0x17);
|
||||
+ a->write_bcr(ioaddr, 26, 0xc);
|
||||
+ /* And finally enable the NOUFLO bit */
|
||||
+ a->write_bcr(ioaddr, 18, a->read_bcr(ioaddr, 18) | (1 << 11));
|
||||
+ }
|
||||
+
|
||||
dev = alloc_etherdev(sizeof(*lp));
|
||||
if (!dev) {
|
||||
ret = -ENOMEM;
|
||||
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
|
||||
index e6660d692008..ec0d32ad7592 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
|
||||
@@ -541,7 +541,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
|
||||
|
||||
ret = iwl_mvm_mac_ctxt_add(mvm, vif);
|
||||
if (ret)
|
||||
- goto out_remove_mac;
|
||||
+ goto out_release;
|
||||
|
||||
/*
|
||||
* Update power state on the new interface. Admittedly, based on
|
||||
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
|
||||
index cfd49eca67aa..c81716042073 100644
|
||||
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
|
||||
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
|
||||
@@ -1465,7 +1465,7 @@ static int tcm_qla2xxx_check_initiator_node_acl(
|
||||
/*
|
||||
* Finally register the new FC Nexus with TCM
|
||||
*/
|
||||
- __transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
|
||||
+ transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
|
||||
index 6948984a25ab..c2d602825422 100644
|
||||
--- a/drivers/staging/vt6655/rf.c
|
||||
+++ b/drivers/staging/vt6655/rf.c
|
||||
@@ -966,6 +966,7 @@ bool RFbSetPower(
|
||||
break;
|
||||
case RATE_6M:
|
||||
case RATE_9M:
|
||||
+ case RATE_12M:
|
||||
case RATE_18M:
|
||||
byPwr = pDevice->abyOFDMPwrTbl[uCH];
|
||||
if (pDevice->byRFType == RF_UW2452) {
|
||||
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
|
||||
index e415af32115a..c67d3795db4a 100644
|
||||
--- a/drivers/target/tcm_fc/tfc_io.c
|
||||
+++ b/drivers/target/tcm_fc/tfc_io.c
|
||||
@@ -346,7 +346,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
|
||||
ep = fc_seq_exch(seq);
|
||||
if (ep) {
|
||||
lport = ep->lp;
|
||||
- if (lport && (ep->xid <= lport->lro_xid))
|
||||
+ if (lport && (ep->xid <= lport->lro_xid)) {
|
||||
/*
|
||||
* "ddp_done" trigger invalidation of HW
|
||||
* specific DDP context
|
||||
@@ -361,6 +361,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
|
||||
* identified using ep->xid)
|
||||
*/
|
||||
cmd->was_ddp_setup = 0;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c
|
||||
index 6e560d56094b..754fdf8c6356 100644
|
||||
--- a/fs/hfsplus/brec.c
|
||||
+++ b/fs/hfsplus/brec.c
|
||||
@@ -131,13 +131,16 @@ skip:
|
||||
hfs_bnode_write(node, entry, data_off + key_len, entry_len);
|
||||
hfs_bnode_dump(node);
|
||||
|
||||
- if (new_node) {
|
||||
- /* update parent key if we inserted a key
|
||||
- * at the start of the first node
|
||||
- */
|
||||
- if (!rec && new_node != node)
|
||||
- hfs_brec_update_parent(fd);
|
||||
+ /*
|
||||
+ * update parent key if we inserted a key
|
||||
+ * at the start of the node and it is not the new node
|
||||
+ */
|
||||
+ if (!rec && new_node != node) {
|
||||
+ hfs_bnode_read_key(node, fd->search_key, data_off + size);
|
||||
+ hfs_brec_update_parent(fd);
|
||||
+ }
|
||||
|
||||
+ if (new_node) {
|
||||
hfs_bnode_put(fd->bnode);
|
||||
if (!new_node->parent) {
|
||||
hfs_btree_inc_height(tree);
|
||||
@@ -168,9 +171,6 @@ skip:
|
||||
goto again;
|
||||
}
|
||||
|
||||
- if (!rec)
|
||||
- hfs_brec_update_parent(fd);
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -370,6 +370,8 @@ again:
|
||||
if (IS_ERR(parent))
|
||||
return PTR_ERR(parent);
|
||||
__hfs_brec_find(parent, fd, hfs_find_rec_by_key);
|
||||
+ if (fd->record < 0)
|
||||
+ return -ENOENT;
|
||||
hfs_bnode_dump(parent);
|
||||
rec = fd->record;
|
||||
|
||||
diff --git a/kernel/events/core.c b/kernel/events/core.c
|
||||
index 7bf4d519c20f..7daf52c340cd 100644
|
||||
--- a/kernel/events/core.c
|
||||
+++ b/kernel/events/core.c
|
||||
@@ -4007,6 +4007,13 @@ static void perf_pending_event(struct irq_work *entry)
|
||||
{
|
||||
struct perf_event *event = container_of(entry,
|
||||
struct perf_event, pending);
|
||||
+ int rctx;
|
||||
+
|
||||
+ rctx = perf_swevent_get_recursion_context();
|
||||
+ /*
|
||||
+ * If we 'fail' here, that's OK, it means recursion is already disabled
|
||||
+ * and we won't recurse 'further'.
|
||||
+ */
|
||||
|
||||
if (event->pending_disable) {
|
||||
event->pending_disable = 0;
|
||||
@@ -4017,6 +4024,9 @@ static void perf_pending_event(struct irq_work *entry)
|
||||
event->pending_wakeup = 0;
|
||||
perf_event_wakeup(event);
|
||||
}
|
||||
+
|
||||
+ if (rctx >= 0)
|
||||
+ perf_swevent_put_recursion_context(rctx);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
|
||||
index 845563b81a0f..9f0ea9d8be73 100644
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -60,13 +60,24 @@ struct ieee80211_local;
|
||||
#define IEEE80211_UNSET_POWER_LEVEL INT_MIN
|
||||
|
||||
/*
|
||||
- * Some APs experience problems when working with U-APSD. Decrease the
|
||||
- * probability of that happening by using legacy mode for all ACs but VO.
|
||||
- * The AP that caused us trouble was a Cisco 4410N. It ignores our
|
||||
- * setting, and always treats non-VO ACs as legacy.
|
||||
+ * Some APs experience problems when working with U-APSD. Decreasing the
|
||||
+ * probability of that happening by using legacy mode for all ACs but VO isn't
|
||||
+ * enough.
|
||||
+ *
|
||||
+ * Cisco 4410N originally forced us to enable VO by default only because it
|
||||
+ * treated non-VO ACs as legacy.
|
||||
+ *
|
||||
+ * However some APs (notably Netgear R7000) silently reclassify packets to
|
||||
+ * different ACs. Since u-APSD ACs require trigger frames for frame retrieval
|
||||
+ * clients would never see some frames (e.g. ARP responses) or would fetch them
|
||||
+ * accidentally after a long time.
|
||||
+ *
|
||||
+ * It makes little sense to enable u-APSD queues by default because it needs
|
||||
+ * userspace applications to be aware of it to actually take advantage of the
|
||||
+ * possible additional powersavings. Implicitly depending on driver autotrigger
|
||||
+ * frame support doesn't make much sense.
|
||||
*/
|
||||
-#define IEEE80211_DEFAULT_UAPSD_QUEUES \
|
||||
- IEEE80211_WMM_IE_STA_QOSINFO_AC_VO
|
||||
+#define IEEE80211_DEFAULT_UAPSD_QUEUES 0
|
||||
|
||||
#define IEEE80211_DEFAULT_MAX_SP_LEN \
|
||||
IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
|
||||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
|
||||
index 9299a38c372e..cd60be8d9aba 100644
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2023,6 +2023,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
|
||||
+ if (ieee80211_drop_unencrypted(rx, hdr->frame_control))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
/* frame is in RMC, don't forward */
|
||||
if (ieee80211_is_data(hdr->frame_control) &&
|
||||
is_multicast_ether_addr(hdr->addr1) &&
|
||||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
||||
index dc200bf831ae..90a0e552cb32 100644
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -4032,6 +4032,16 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
|
||||
if (parse_station_flags(info, dev->ieee80211_ptr->iftype, ¶ms))
|
||||
return -EINVAL;
|
||||
|
||||
+ /* HT/VHT requires QoS, but if we don't have that just ignore HT/VHT
|
||||
+ * as userspace might just pass through the capabilities from the IEs
|
||||
+ * directly, rather than enforcing this restriction and returning an
|
||||
+ * error in this case.
|
||||
+ */
|
||||
+ if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME))) {
|
||||
+ params.ht_capa = NULL;
|
||||
+ params.vht_capa = NULL;
|
||||
+ }
|
||||
+
|
||||
/* When you run into this, adjust the code below for the new flag */
|
||||
BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 7);
|
||||
|
||||
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
|
||||
index 3c839cc4e00e..0ef2b2a33ee5 100644
|
||||
--- a/sound/soc/codecs/adav80x.c
|
||||
+++ b/sound/soc/codecs/adav80x.c
|
||||
@@ -307,7 +307,7 @@ static int adav80x_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
|
||||
- unsigned int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ unsigned int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
@@ -323,7 +323,7 @@ static int adav80x_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = adav80x->deemph;
|
||||
+ ucontrol->value.integer.value[0] = adav80x->deemph;
|
||||
return 0;
|
||||
};
|
||||
|
||||
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
|
||||
index 5f9af1fb76e8..68379c14720b 100644
|
||||
--- a/sound/soc/codecs/ak4641.c
|
||||
+++ b/sound/soc/codecs/ak4641.c
|
||||
@@ -74,7 +74,7 @@ static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
@@ -90,7 +90,7 @@ static int ak4641_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = ak4641->deemph;
|
||||
+ ucontrol->value.integer.value[0] = ak4641->deemph;
|
||||
return 0;
|
||||
};
|
||||
|
||||
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
|
||||
index 03036b326732..ffa4a2d8a4bc 100644
|
||||
--- a/sound/soc/codecs/cs4271.c
|
||||
+++ b/sound/soc/codecs/cs4271.c
|
||||
@@ -267,7 +267,7 @@ static int cs4271_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = cs4271->deemph;
|
||||
+ ucontrol->value.integer.value[0] = cs4271->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ static int cs4271_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- cs4271->deemph = ucontrol->value.enumerated.item[0];
|
||||
+ cs4271->deemph = ucontrol->value.integer.value[0];
|
||||
return cs4271_set_deemph(codec);
|
||||
}
|
||||
|
||||
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
|
||||
index 3b5f565a23a5..665e0ddc2ef0 100644
|
||||
--- a/sound/soc/codecs/sgtl5000.c
|
||||
+++ b/sound/soc/codecs/sgtl5000.c
|
||||
@@ -1111,13 +1111,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
|
||||
/* Enable VDDC charge pump */
|
||||
ana_pwr |= SGTL5000_VDDC_CHRGPMP_POWERUP;
|
||||
} else if (vddio >= 3100 && vdda >= 3100) {
|
||||
- /*
|
||||
- * if vddio and vddd > 3.1v,
|
||||
- * charge pump should be clean before set ana_pwr
|
||||
- */
|
||||
- snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
|
||||
- SGTL5000_VDDC_CHRGPMP_POWERUP, 0);
|
||||
-
|
||||
+ ana_pwr &= ~SGTL5000_VDDC_CHRGPMP_POWERUP;
|
||||
/* VDDC use VDDIO rail */
|
||||
lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
|
||||
lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
|
||||
diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
|
||||
index d447c4aa1d5e..675a8fd0deed 100644
|
||||
--- a/sound/soc/codecs/tas5086.c
|
||||
+++ b/sound/soc/codecs/tas5086.c
|
||||
@@ -173,7 +173,7 @@ static int tas5086_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = priv->deemph;
|
||||
+ ucontrol->value.integer.value[0] = priv->deemph;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ static int tas5086_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- priv->deemph = ucontrol->value.enumerated.item[0];
|
||||
+ priv->deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
return tas5086_set_deemph(codec);
|
||||
}
|
||||
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
|
||||
index 7fefd766b582..124fb538dfa9 100644
|
||||
--- a/sound/soc/codecs/wm2000.c
|
||||
+++ b/sound/soc/codecs/wm2000.c
|
||||
@@ -605,7 +605,7 @@ static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm2000->anc_active;
|
||||
+ ucontrol->value.integer.value[0] = wm2000->anc_active;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -615,7 +615,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
- int anc_active = ucontrol->value.enumerated.item[0];
|
||||
+ int anc_active = ucontrol->value.integer.value[0];
|
||||
int ret;
|
||||
|
||||
if (anc_active > 1)
|
||||
@@ -638,7 +638,7 @@ static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm2000->spk_ena;
|
||||
+ ucontrol->value.integer.value[0] = wm2000->spk_ena;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -648,7 +648,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
- int val = ucontrol->value.enumerated.item[0];
|
||||
+ int val = ucontrol->value.integer.value[0];
|
||||
int ret;
|
||||
|
||||
if (val > 1)
|
||||
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
|
||||
index 10d492b6a5b4..944b09b1f481 100644
|
||||
--- a/sound/soc/codecs/wm8731.c
|
||||
+++ b/sound/soc/codecs/wm8731.c
|
||||
@@ -121,7 +121,7 @@ static int wm8731_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8731->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8731->deemph;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ static int wm8731_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
int ret = 0;
|
||||
|
||||
if (deemph > 1)
|
||||
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
|
||||
index 9d88437cdcd1..79f4a217b5d5 100644
|
||||
--- a/sound/soc/codecs/wm8903.c
|
||||
+++ b/sound/soc/codecs/wm8903.c
|
||||
@@ -446,7 +446,7 @@ static int wm8903_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8903->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8903->deemph;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -456,7 +456,7 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
int ret = 0;
|
||||
|
||||
if (deemph > 1)
|
||||
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
|
||||
index af62f843a691..c68d541cd350 100644
|
||||
--- a/sound/soc/codecs/wm8904.c
|
||||
+++ b/sound/soc/codecs/wm8904.c
|
||||
@@ -523,7 +523,7 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8904->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8904->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
|
||||
index 82c8ba975720..1c1fc6119758 100644
|
||||
--- a/sound/soc/codecs/wm8955.c
|
||||
+++ b/sound/soc/codecs/wm8955.c
|
||||
@@ -393,7 +393,7 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8955->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8955->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
|
||||
index 412d90f7b256..4a8decf85a4a 100644
|
||||
--- a/sound/soc/codecs/wm8960.c
|
||||
+++ b/sound/soc/codecs/wm8960.c
|
||||
@@ -181,7 +181,7 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8960->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8960->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
@ -1,748 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index d2a3930159ea..87909d8302ad 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 74
|
||||
+SUBLEVEL = 75
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
|
||||
index a88894190e41..c991fe680e58 100644
|
||||
--- a/drivers/acpi/processor_idle.c
|
||||
+++ b/drivers/acpi/processor_idle.c
|
||||
@@ -978,7 +978,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
|
||||
return -EINVAL;
|
||||
|
||||
drv->safe_state_index = -1;
|
||||
- for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
|
||||
+ for (i = CPUIDLE_DRIVER_STATE_START; i < CPUIDLE_STATE_MAX; i++) {
|
||||
drv->states[i].name[0] = '\0';
|
||||
drv->states[i].desc[0] = '\0';
|
||||
}
|
||||
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
|
||||
index cf1576d54363..a5c987ae665d 100644
|
||||
--- a/drivers/block/nbd.c
|
||||
+++ b/drivers/block/nbd.c
|
||||
@@ -815,10 +815,6 @@ static int __init nbd_init(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
|
||||
- if (!nbd_dev)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
part_shift = 0;
|
||||
if (max_part > 0) {
|
||||
part_shift = fls(max_part);
|
||||
@@ -840,6 +836,10 @@ static int __init nbd_init(void)
|
||||
if (nbds_max > 1UL << (MINORBITS - part_shift))
|
||||
return -EINVAL;
|
||||
|
||||
+ nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
|
||||
+ if (!nbd_dev)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
for (i = 0; i < nbds_max; i++) {
|
||||
struct gendisk *disk = alloc_disk(1 << part_shift);
|
||||
if (!disk)
|
||||
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
|
||||
index ec3fc4fd9160..b94a37630e36 100644
|
||||
--- a/drivers/dma/omap-dma.c
|
||||
+++ b/drivers/dma/omap-dma.c
|
||||
@@ -487,6 +487,7 @@ static int omap_dma_terminate_all(struct omap_chan *c)
|
||||
* c->desc is NULL and exit.)
|
||||
*/
|
||||
if (c->desc) {
|
||||
+ omap_dma_desc_free(&c->desc->vd);
|
||||
c->desc = NULL;
|
||||
/* Avoid stopping the dma twice */
|
||||
if (!c->paused)
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
|
||||
index b131520521e4..72b02483ff03 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_bios.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_bios.c
|
||||
@@ -76,7 +76,7 @@ static bool igp_read_bios_from_vram(struct radeon_device *rdev)
|
||||
|
||||
static bool radeon_read_bios(struct radeon_device *rdev)
|
||||
{
|
||||
- uint8_t __iomem *bios;
|
||||
+ uint8_t __iomem *bios, val1, val2;
|
||||
size_t size;
|
||||
|
||||
rdev->bios = NULL;
|
||||
@@ -86,15 +86,19 @@ static bool radeon_read_bios(struct radeon_device *rdev)
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (size == 0 || bios[0] != 0x55 || bios[1] != 0xaa) {
|
||||
+ val1 = readb(&bios[0]);
|
||||
+ val2 = readb(&bios[1]);
|
||||
+
|
||||
+ if (size == 0 || val1 != 0x55 || val2 != 0xaa) {
|
||||
pci_unmap_rom(rdev->pdev, bios);
|
||||
return false;
|
||||
}
|
||||
- rdev->bios = kmemdup(bios, size, GFP_KERNEL);
|
||||
+ rdev->bios = kzalloc(size, GFP_KERNEL);
|
||||
if (rdev->bios == NULL) {
|
||||
pci_unmap_rom(rdev->pdev, bios);
|
||||
return false;
|
||||
}
|
||||
+ memcpy_fromio(rdev->bios, bios, size);
|
||||
pci_unmap_rom(rdev->pdev, bios);
|
||||
return true;
|
||||
}
|
||||
diff --git a/drivers/iio/imu/adis_trigger.c b/drivers/iio/imu/adis_trigger.c
|
||||
index e0017c22bb9c..f53e9a803a0e 100644
|
||||
--- a/drivers/iio/imu/adis_trigger.c
|
||||
+++ b/drivers/iio/imu/adis_trigger.c
|
||||
@@ -60,7 +60,7 @@ int adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)
|
||||
iio_trigger_set_drvdata(adis->trig, adis);
|
||||
ret = iio_trigger_register(adis->trig);
|
||||
|
||||
- indio_dev->trig = adis->trig;
|
||||
+ indio_dev->trig = iio_trigger_get(adis->trig);
|
||||
if (ret)
|
||||
goto error_free_irq;
|
||||
|
||||
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
|
||||
index 7da0832f187b..01d661e0fa6c 100644
|
||||
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
|
||||
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
|
||||
@@ -25,6 +25,16 @@
|
||||
#include <linux/poll.h>
|
||||
#include "inv_mpu_iio.h"
|
||||
|
||||
+static void inv_clear_kfifo(struct inv_mpu6050_state *st)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ /* take the spin lock sem to avoid interrupt kick in */
|
||||
+ spin_lock_irqsave(&st->time_stamp_lock, flags);
|
||||
+ kfifo_reset(&st->timestamps);
|
||||
+ spin_unlock_irqrestore(&st->time_stamp_lock, flags);
|
||||
+}
|
||||
+
|
||||
int inv_reset_fifo(struct iio_dev *indio_dev)
|
||||
{
|
||||
int result;
|
||||
@@ -51,6 +61,10 @@ int inv_reset_fifo(struct iio_dev *indio_dev)
|
||||
INV_MPU6050_BIT_FIFO_RST);
|
||||
if (result)
|
||||
goto reset_fifo_fail;
|
||||
+
|
||||
+ /* clear timestamps fifo */
|
||||
+ inv_clear_kfifo(st);
|
||||
+
|
||||
/* enable interrupt */
|
||||
if (st->chip_config.accl_fifo_enable ||
|
||||
st->chip_config.gyro_fifo_enable) {
|
||||
@@ -84,16 +98,6 @@ reset_fifo_fail:
|
||||
return result;
|
||||
}
|
||||
|
||||
-static void inv_clear_kfifo(struct inv_mpu6050_state *st)
|
||||
-{
|
||||
- unsigned long flags;
|
||||
-
|
||||
- /* take the spin lock sem to avoid interrupt kick in */
|
||||
- spin_lock_irqsave(&st->time_stamp_lock, flags);
|
||||
- kfifo_reset(&st->timestamps);
|
||||
- spin_unlock_irqrestore(&st->time_stamp_lock, flags);
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* inv_mpu6050_irq_handler() - Cache a timestamp at each data ready interrupt.
|
||||
*/
|
||||
@@ -187,7 +191,6 @@ end_session:
|
||||
flush_fifo:
|
||||
/* Flush HW and SW FIFOs. */
|
||||
inv_reset_fifo(indio_dev);
|
||||
- inv_clear_kfifo(st);
|
||||
mutex_unlock(&indio_dev->mlock);
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
|
||||
index a84112322071..055ebebc07dd 100644
|
||||
--- a/drivers/infiniband/core/umem.c
|
||||
+++ b/drivers/infiniband/core/umem.c
|
||||
@@ -94,6 +94,14 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
|
||||
if (dmasync)
|
||||
dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
|
||||
|
||||
+ /*
|
||||
+ * If the combination of the addr and size requested for this memory
|
||||
+ * region causes an integer overflow, return error.
|
||||
+ */
|
||||
+ if ((PAGE_ALIGN(addr + size) <= size) ||
|
||||
+ (PAGE_ALIGN(addr + size) <= addr))
|
||||
+ return ERR_PTR(-EINVAL);
|
||||
+
|
||||
if (!can_do_mlock())
|
||||
return ERR_PTR(-EPERM);
|
||||
|
||||
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
|
||||
index 2c6f0f2ecd9d..949b38633496 100644
|
||||
--- a/drivers/infiniband/core/uverbs_main.c
|
||||
+++ b/drivers/infiniband/core/uverbs_main.c
|
||||
@@ -460,6 +460,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
|
||||
|
||||
entry->desc.async.element = element;
|
||||
entry->desc.async.event_type = event;
|
||||
+ entry->desc.async.reserved = 0;
|
||||
entry->counter = counter;
|
||||
|
||||
list_add_tail(&entry->list, &file->async_file->event_list);
|
||||
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
|
||||
index 4d599cedbb0b..6ee534874535 100644
|
||||
--- a/drivers/infiniband/hw/mlx4/mad.c
|
||||
+++ b/drivers/infiniband/hw/mlx4/mad.c
|
||||
@@ -64,6 +64,14 @@ enum {
|
||||
#define GUID_TBL_BLK_NUM_ENTRIES 8
|
||||
#define GUID_TBL_BLK_SIZE (GUID_TBL_ENTRY_SIZE * GUID_TBL_BLK_NUM_ENTRIES)
|
||||
|
||||
+/* Counters should be saturate once they reach their maximum value */
|
||||
+#define ASSIGN_32BIT_COUNTER(counter, value) do {\
|
||||
+ if ((value) > U32_MAX) \
|
||||
+ counter = cpu_to_be32(U32_MAX); \
|
||||
+ else \
|
||||
+ counter = cpu_to_be32(value); \
|
||||
+} while (0)
|
||||
+
|
||||
struct mlx4_mad_rcv_buf {
|
||||
struct ib_grh grh;
|
||||
u8 payload[256];
|
||||
@@ -730,10 +738,14 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
||||
static void edit_counter(struct mlx4_counter *cnt,
|
||||
struct ib_pma_portcounters *pma_cnt)
|
||||
{
|
||||
- pma_cnt->port_xmit_data = cpu_to_be32((be64_to_cpu(cnt->tx_bytes)>>2));
|
||||
- pma_cnt->port_rcv_data = cpu_to_be32((be64_to_cpu(cnt->rx_bytes)>>2));
|
||||
- pma_cnt->port_xmit_packets = cpu_to_be32(be64_to_cpu(cnt->tx_frames));
|
||||
- pma_cnt->port_rcv_packets = cpu_to_be32(be64_to_cpu(cnt->rx_frames));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_xmit_data,
|
||||
+ (be64_to_cpu(cnt->tx_bytes) >> 2));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_rcv_data,
|
||||
+ (be64_to_cpu(cnt->rx_bytes) >> 2));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_xmit_packets,
|
||||
+ be64_to_cpu(cnt->tx_frames));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_rcv_packets,
|
||||
+ be64_to_cpu(cnt->rx_frames));
|
||||
}
|
||||
|
||||
static int iboe_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
|
||||
index f804c1faa7ff..d3b54f7b849f 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/* Offset base used to differentiate between CAPTURE and OUTPUT
|
||||
* while mmaping */
|
||||
-#define DST_QUEUE_OFF_BASE (TASK_SIZE / 2)
|
||||
+#define DST_QUEUE_OFF_BASE (1 << 30)
|
||||
|
||||
#define MFC_BANK1_ALLOC_CTX 0
|
||||
#define MFC_BANK2_ALLOC_CTX 1
|
||||
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h
|
||||
index 71ea77576d22..e783ea0e3837 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/dvm/dev.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/dvm/dev.h
|
||||
@@ -670,7 +670,6 @@ struct iwl_priv {
|
||||
unsigned long reload_jiffies;
|
||||
int reload_count;
|
||||
bool ucode_loaded;
|
||||
- bool init_ucode_run; /* Don't run init uCode again */
|
||||
|
||||
u8 plcp_delta_threshold;
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/dvm/ucode.c b/drivers/net/wireless/iwlwifi/dvm/ucode.c
|
||||
index 0a1cdc5e856b..5ad94a8080b8 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/dvm/ucode.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/dvm/ucode.c
|
||||
@@ -425,9 +425,6 @@ int iwl_run_init_ucode(struct iwl_priv *priv)
|
||||
if (!priv->fw->img[IWL_UCODE_INIT].sec[0].len)
|
||||
return 0;
|
||||
|
||||
- if (priv->init_ucode_run)
|
||||
- return 0;
|
||||
-
|
||||
iwl_init_notification_wait(&priv->notif_wait, &calib_wait,
|
||||
calib_complete, ARRAY_SIZE(calib_complete),
|
||||
iwlagn_wait_calib, priv);
|
||||
@@ -447,8 +444,6 @@ int iwl_run_init_ucode(struct iwl_priv *priv)
|
||||
*/
|
||||
ret = iwl_wait_notification(&priv->notif_wait, &calib_wait,
|
||||
UCODE_CALIB_TIMEOUT);
|
||||
- if (!ret)
|
||||
- priv->init_ucode_run = true;
|
||||
|
||||
goto out;
|
||||
|
||||
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
|
||||
index 1ad39c799c74..bfe812fcce34 100644
|
||||
--- a/drivers/scsi/be2iscsi/be_main.c
|
||||
+++ b/drivers/scsi/be2iscsi/be_main.c
|
||||
@@ -5080,9 +5080,9 @@ free_port:
|
||||
hba_free:
|
||||
if (phba->msix_enabled)
|
||||
pci_disable_msix(phba->pcidev);
|
||||
- iscsi_host_remove(phba->shost);
|
||||
pci_dev_put(phba->pcidev);
|
||||
iscsi_host_free(phba->shost);
|
||||
+ pci_set_drvdata(pcidev, NULL);
|
||||
disable_pci:
|
||||
pci_disable_device(pcidev);
|
||||
return ret;
|
||||
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
|
||||
index e5953c8018c5..9f3168e8e5a8 100644
|
||||
--- a/drivers/scsi/scsi_lib.c
|
||||
+++ b/drivers/scsi/scsi_lib.c
|
||||
@@ -1242,9 +1242,11 @@ int scsi_prep_state_check(struct scsi_device *sdev, struct request *req)
|
||||
"rejecting I/O to dead device\n");
|
||||
ret = BLKPREP_KILL;
|
||||
break;
|
||||
- case SDEV_QUIESCE:
|
||||
case SDEV_BLOCK:
|
||||
case SDEV_CREATED_BLOCK:
|
||||
+ ret = BLKPREP_DEFER;
|
||||
+ break;
|
||||
+ case SDEV_QUIESCE:
|
||||
/*
|
||||
* If the devices is blocked we defer normal commands.
|
||||
*/
|
||||
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
|
||||
index 9559ea749d83..5a3ea20e9cb5 100644
|
||||
--- a/drivers/target/iscsi/iscsi_target.c
|
||||
+++ b/drivers/target/iscsi/iscsi_target.c
|
||||
@@ -1179,7 +1179,7 @@ iscsit_handle_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
||||
* traditional iSCSI block I/O.
|
||||
*/
|
||||
if (iscsit_allocate_iovecs(cmd) < 0) {
|
||||
- return iscsit_add_reject_cmd(cmd,
|
||||
+ return iscsit_reject_cmd(cmd,
|
||||
ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
|
||||
}
|
||||
immed_data = cmd->immediate_data;
|
||||
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
|
||||
index 0e57bcb8e3f7..2320e20d5be7 100644
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -94,6 +94,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
xhci->quirks |= XHCI_INTEL_HOST;
|
||||
+ xhci->quirks |= XHCI_AVOID_BEI;
|
||||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) {
|
||||
@@ -109,7 +110,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
* PPT chipsets.
|
||||
*/
|
||||
xhci->quirks |= XHCI_SPURIOUS_REBOOT;
|
||||
- xhci->quirks |= XHCI_AVOID_BEI;
|
||||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
|
||||
pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
|
||||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
|
||||
index cf127a080644..4d918d5f945a 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio.c
|
||||
+++ b/drivers/usb/serial/ftdi_sio.c
|
||||
@@ -620,6 +620,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
+ { USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) },
|
||||
/*
|
||||
* ELV devices:
|
||||
*/
|
||||
@@ -1899,8 +1900,12 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
|
||||
{
|
||||
struct usb_device *udev = serial->dev;
|
||||
|
||||
- if ((udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems")) ||
|
||||
- (udev->product && !strcmp(udev->product, "BeagleBone/XDS100V2")))
|
||||
+ if (udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems"))
|
||||
+ return ftdi_jtag_probe(serial);
|
||||
+
|
||||
+ if (udev->product &&
|
||||
+ (!strcmp(udev->product, "BeagleBone/XDS100V2") ||
|
||||
+ !strcmp(udev->product, "SNAP Connect E10")))
|
||||
return ftdi_jtag_probe(serial);
|
||||
|
||||
return 0;
|
||||
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
index e8d352615297..e906b6aa2424 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio_ids.h
|
||||
+++ b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
@@ -561,6 +561,12 @@
|
||||
*/
|
||||
#define FTDI_NT_ORIONLXM_PID 0x7c90 /* OrionLXm Substation Automation Platform */
|
||||
|
||||
+/*
|
||||
+ * Synapse Wireless product ids (FTDI_VID)
|
||||
+ * http://www.synapse-wireless.com
|
||||
+ */
|
||||
+#define FTDI_SYNAPSE_SS200_PID 0x9090 /* SS200 - SNAP Stick 200 */
|
||||
+
|
||||
|
||||
/********************************/
|
||||
/** third-party VID/PID combos **/
|
||||
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
|
||||
index 5fcc10fa62bd..f4a8577c3e91 100644
|
||||
--- a/fs/cifs/file.c
|
||||
+++ b/fs/cifs/file.c
|
||||
@@ -1789,6 +1789,7 @@ refind_writable:
|
||||
cifsFileInfo_put(inv_file);
|
||||
spin_lock(&cifs_file_list_lock);
|
||||
++refind;
|
||||
+ inv_file = NULL;
|
||||
goto refind_writable;
|
||||
}
|
||||
}
|
||||
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
|
||||
index 46387e49aa46..8cd6474e248f 100644
|
||||
--- a/fs/ocfs2/file.c
|
||||
+++ b/fs/ocfs2/file.c
|
||||
@@ -2372,10 +2372,14 @@ out_dio:
|
||||
/* buffered aio wouldn't have proper lock coverage today */
|
||||
BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT));
|
||||
|
||||
+ if (unlikely(written <= 0))
|
||||
+ goto no_sync;
|
||||
+
|
||||
if (((file->f_flags & O_DSYNC) && !direct_io) || IS_SYNC(inode) ||
|
||||
((file->f_flags & O_DIRECT) && !direct_io)) {
|
||||
- ret = filemap_fdatawrite_range(file->f_mapping, *ppos,
|
||||
- *ppos + count - 1);
|
||||
+ ret = filemap_fdatawrite_range(file->f_mapping,
|
||||
+ iocb->ki_pos - written,
|
||||
+ iocb->ki_pos - 1);
|
||||
if (ret < 0)
|
||||
written = ret;
|
||||
|
||||
@@ -2388,10 +2392,12 @@ out_dio:
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
- ret = filemap_fdatawait_range(file->f_mapping, *ppos,
|
||||
- *ppos + count - 1);
|
||||
+ ret = filemap_fdatawait_range(file->f_mapping,
|
||||
+ iocb->ki_pos - written,
|
||||
+ iocb->ki_pos - 1);
|
||||
}
|
||||
|
||||
+no_sync:
|
||||
/*
|
||||
* deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io
|
||||
* function pointer which is called when o_direct io completes so that
|
||||
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
|
||||
index 65fc60a07c47..9f285fb9bab3 100644
|
||||
--- a/fs/proc/task_mmu.c
|
||||
+++ b/fs/proc/task_mmu.c
|
||||
@@ -1110,9 +1110,19 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int pagemap_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ /* do not disclose physical addresses to unprivileged
|
||||
+ userspace (closes a rowhammer attack vector) */
|
||||
+ if (!capable(CAP_SYS_ADMIN))
|
||||
+ return -EPERM;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
const struct file_operations proc_pagemap_operations = {
|
||||
.llseek = mem_lseek, /* borrow this */
|
||||
.read = pagemap_read,
|
||||
+ .open = pagemap_open,
|
||||
};
|
||||
#endif /* CONFIG_PROC_PAGE_MONITOR */
|
||||
|
||||
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
|
||||
index fa1abeb45b76..49c48dda162d 100644
|
||||
--- a/include/linux/blk_types.h
|
||||
+++ b/include/linux/blk_types.h
|
||||
@@ -170,7 +170,9 @@ enum rq_flag_bits {
|
||||
__REQ_ELVPRIV, /* elevator private data attached */
|
||||
__REQ_FAILED, /* set if the request failed */
|
||||
__REQ_QUIET, /* don't worry about errors */
|
||||
- __REQ_PREEMPT, /* set for "ide_preempt" requests */
|
||||
+ __REQ_PREEMPT, /* set for "ide_preempt" requests and also
|
||||
+ for requests for which the SCSI "quiesce"
|
||||
+ state must be ignored. */
|
||||
__REQ_ALLOCED, /* request came from our alloc pool */
|
||||
__REQ_COPY_USER, /* contains copies of user pages */
|
||||
__REQ_FLUSH_SEQ, /* request for flush sequence */
|
||||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
|
||||
index e9ef6d6b51d5..341551c7b4c8 100644
|
||||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -29,6 +29,19 @@
|
||||
#define ULLONG_MAX (~0ULL)
|
||||
#define SIZE_MAX (~(size_t)0)
|
||||
|
||||
+#define U8_MAX ((u8)~0U)
|
||||
+#define S8_MAX ((s8)(U8_MAX>>1))
|
||||
+#define S8_MIN ((s8)(-S8_MAX - 1))
|
||||
+#define U16_MAX ((u16)~0U)
|
||||
+#define S16_MAX ((s16)(U16_MAX>>1))
|
||||
+#define S16_MIN ((s16)(-S16_MAX - 1))
|
||||
+#define U32_MAX ((u32)~0U)
|
||||
+#define S32_MAX ((s32)(U32_MAX>>1))
|
||||
+#define S32_MIN ((s32)(-S32_MAX - 1))
|
||||
+#define U64_MAX ((u64)~0ULL)
|
||||
+#define S64_MAX ((s64)(U64_MAX>>1))
|
||||
+#define S64_MIN ((s64)(-S64_MAX - 1))
|
||||
+
|
||||
#define STACK_MAGIC 0xdeadbeef
|
||||
|
||||
#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
|
||||
diff --git a/ipc/compat.c b/ipc/compat.c
|
||||
index 892f6585dd60..d3b376025e9b 100644
|
||||
--- a/ipc/compat.c
|
||||
+++ b/ipc/compat.c
|
||||
@@ -381,7 +381,7 @@ COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
|
||||
uptr = compat_ptr(ipck.msgp);
|
||||
fifth = ipck.msgtyp;
|
||||
}
|
||||
- return do_msgrcv(first, uptr, second, fifth, third,
|
||||
+ return do_msgrcv(first, uptr, second, (s32)fifth, third,
|
||||
compat_do_msg_fill);
|
||||
}
|
||||
case MSGGET:
|
||||
diff --git a/kernel/printk.c b/kernel/printk.c
|
||||
index f7aff4bd5454..fd0154a57d6e 100644
|
||||
--- a/kernel/printk.c
|
||||
+++ b/kernel/printk.c
|
||||
@@ -107,7 +107,7 @@ static struct console *exclusive_console;
|
||||
*/
|
||||
struct console_cmdline
|
||||
{
|
||||
- char name[8]; /* Name of the driver */
|
||||
+ char name[16]; /* Name of the driver */
|
||||
int index; /* Minor dev. to use */
|
||||
char *options; /* Options for the driver */
|
||||
#ifdef CONFIG_A11Y_BRAILLE_CONSOLE
|
||||
@@ -2290,6 +2290,8 @@ void register_console(struct console *newcon)
|
||||
*/
|
||||
for (i = 0; i < MAX_CMDLINECONSOLES && console_cmdline[i].name[0];
|
||||
i++) {
|
||||
+ BUILD_BUG_ON(sizeof(console_cmdline[i].name) !=
|
||||
+ sizeof(newcon->name));
|
||||
if (strcmp(console_cmdline[i].name, newcon->name) != 0)
|
||||
continue;
|
||||
if (newcon->index >= 0 &&
|
||||
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
|
||||
index 1ad92b46753e..2298237db142 100644
|
||||
--- a/mm/memory_hotplug.c
|
||||
+++ b/mm/memory_hotplug.c
|
||||
@@ -1039,6 +1039,10 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
|
||||
return NULL;
|
||||
|
||||
arch_refresh_nodedata(nid, pgdat);
|
||||
+ } else {
|
||||
+ /* Reset the nr_zones and classzone_idx to 0 before reuse */
|
||||
+ pgdat->nr_zones = 0;
|
||||
+ pgdat->classzone_idx = 0;
|
||||
}
|
||||
|
||||
/* we can use NODE_DATA(nid) from here */
|
||||
@@ -1802,15 +1806,6 @@ void try_offline_node(int nid)
|
||||
if (is_vmalloc_addr(zone->wait_table))
|
||||
vfree(zone->wait_table);
|
||||
}
|
||||
-
|
||||
- /*
|
||||
- * Since there is no way to guarentee the address of pgdat/zone is not
|
||||
- * on stack of any kernel threads or used by other kernel objects
|
||||
- * without reference counting or other symchronizing method, do not
|
||||
- * reset node_data and free pgdat here. Just reset it to 0 and reuse
|
||||
- * the memory when the node is online again.
|
||||
- */
|
||||
- memset(pgdat, 0, sizeof(*pgdat));
|
||||
}
|
||||
EXPORT_SYMBOL(try_offline_node);
|
||||
|
||||
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
|
||||
index 73cbc5dc150b..b034f79deb0e 100644
|
||||
--- a/mm/page-writeback.c
|
||||
+++ b/mm/page-writeback.c
|
||||
@@ -793,8 +793,11 @@ static void bdi_update_write_bandwidth(struct backing_dev_info *bdi,
|
||||
* bw * elapsed + write_bandwidth * (period - elapsed)
|
||||
* write_bandwidth = ---------------------------------------------------
|
||||
* period
|
||||
+ *
|
||||
+ * @written may have decreased due to account_page_redirty().
|
||||
+ * Avoid underflowing @bw calculation.
|
||||
*/
|
||||
- bw = written - bdi->written_stamp;
|
||||
+ bw = written - min(written, bdi->written_stamp);
|
||||
bw *= HZ;
|
||||
if (unlikely(elapsed > period)) {
|
||||
do_div(bw, elapsed);
|
||||
@@ -858,7 +861,7 @@ static void global_update_bandwidth(unsigned long thresh,
|
||||
unsigned long now)
|
||||
{
|
||||
static DEFINE_SPINLOCK(dirty_lock);
|
||||
- static unsigned long update_time;
|
||||
+ static unsigned long update_time = INITIAL_JIFFIES;
|
||||
|
||||
/*
|
||||
* check locklessly first to optimize away locking for the most time
|
||||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
|
||||
index 913dc4f49b10..92b5e1f7d3b0 100644
|
||||
--- a/net/ipv4/tcp_output.c
|
||||
+++ b/net/ipv4/tcp_output.c
|
||||
@@ -2909,6 +2909,7 @@ static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn)
|
||||
goto fallback;
|
||||
syn_data->ip_summed = CHECKSUM_PARTIAL;
|
||||
memcpy(syn_data->cb, syn->cb, sizeof(syn->cb));
|
||||
+ skb_shinfo(syn_data)->gso_segs = 1;
|
||||
if (unlikely(memcpy_fromiovecend(skb_put(syn_data, space),
|
||||
fo->data->msg_iov, 0, space))) {
|
||||
kfree_skb(syn_data);
|
||||
diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
|
||||
index 612a5ddaf93b..799bafc2af39 100644
|
||||
--- a/net/llc/sysctl_net_llc.c
|
||||
+++ b/net/llc/sysctl_net_llc.c
|
||||
@@ -18,28 +18,28 @@ static struct ctl_table llc2_timeout_table[] = {
|
||||
{
|
||||
.procname = "ack",
|
||||
.data = &sysctl_llc2_ack_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_ack_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "busy",
|
||||
.data = &sysctl_llc2_busy_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_busy_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "p",
|
||||
.data = &sysctl_llc2_p_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_p_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "rej",
|
||||
.data = &sysctl_llc2_rej_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_rej_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
|
||||
index 2b8199f68785..5497f50af2f0 100644
|
||||
--- a/net/netfilter/nfnetlink_queue_core.c
|
||||
+++ b/net/netfilter/nfnetlink_queue_core.c
|
||||
@@ -228,7 +228,7 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data)
|
||||
}
|
||||
|
||||
static int
|
||||
-nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen)
|
||||
+nfqnl_zcopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
|
||||
{
|
||||
int i, j = 0;
|
||||
int plen = 0; /* length of skb->head fragment */
|
||||
diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c
|
||||
index 907214b4c4d0..fc6cbe827856 100644
|
||||
--- a/net/rds/sysctl.c
|
||||
+++ b/net/rds/sysctl.c
|
||||
@@ -71,14 +71,14 @@ static ctl_table rds_sysctl_rds_table[] = {
|
||||
{
|
||||
.procname = "max_unacked_packets",
|
||||
.data = &rds_sysctl_max_unacked_packets,
|
||||
- .maxlen = sizeof(unsigned long),
|
||||
+ .maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "max_unacked_bytes",
|
||||
.data = &rds_sysctl_max_unacked_bytes,
|
||||
- .maxlen = sizeof(unsigned long),
|
||||
+ .maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
|
||||
index ff427733c290..464be51025f6 100644
|
||||
--- a/security/selinux/selinuxfs.c
|
||||
+++ b/security/selinux/selinuxfs.c
|
||||
@@ -150,7 +150,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
|
||||
goto out;
|
||||
|
||||
/* No partial writes. */
|
||||
- length = EINVAL;
|
||||
+ length = -EINVAL;
|
||||
if (*ppos != 0)
|
||||
goto out;
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 4008034b6ebe..a8eb7fe2766e 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -266,7 +266,7 @@ static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
|
||||
{
|
||||
/* We currently only handle front, HP */
|
||||
static hda_nid_t pins[] = {
|
||||
- 0x0f, 0x10, 0x14, 0x15, 0
|
||||
+ 0x0f, 0x10, 0x14, 0x15, 0x17, 0
|
||||
};
|
||||
hda_nid_t *p;
|
||||
for (p = pins; *p; p++)
|
||||
@@ -3363,6 +3363,7 @@ enum {
|
||||
ALC269_FIXUP_QUANTA_MUTE,
|
||||
ALC269_FIXUP_LIFEBOOK,
|
||||
ALC269_FIXUP_LIFEBOOK_EXTMIC,
|
||||
+ ALC269_FIXUP_LIFEBOOK_HP_PIN,
|
||||
ALC269_FIXUP_AMIC,
|
||||
ALC269_FIXUP_DMIC,
|
||||
ALC269VB_FIXUP_AMIC,
|
||||
@@ -3477,6 +3478,13 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
{ }
|
||||
},
|
||||
},
|
||||
+ [ALC269_FIXUP_LIFEBOOK_HP_PIN] = {
|
||||
+ .type = HDA_FIXUP_PINS,
|
||||
+ .v.pins = (const struct hda_pintbl[]) {
|
||||
+ { 0x21, 0x0221102f }, /* HP out */
|
||||
+ { }
|
||||
+ },
|
||||
+ },
|
||||
[ALC269_FIXUP_AMIC] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
@@ -3727,6 +3735,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
|
||||
SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
|
||||
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
|
||||
+ SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
|
||||
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
|
||||
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
|
||||
index c89a5bf5c00e..c311681bd390 100644
|
||||
--- a/sound/usb/mixer_quirks.c
|
||||
+++ b/sound/usb/mixer_quirks.c
|
||||
@@ -175,6 +175,7 @@ static const struct rc_config {
|
||||
{ USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
|
||||
{ USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */
|
||||
{ USB_ID(0x041e, 0x30df), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
|
||||
+ { USB_ID(0x041e, 0x3237), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
|
||||
{ USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,728 +0,0 @@
|
||||
diff --git a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
|
||||
index a4873e5e3e36..e30e184f50c7 100644
|
||||
--- a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
|
||||
+++ b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
|
||||
@@ -38,7 +38,7 @@ dma_apbx: dma-apbx@80024000 {
|
||||
80 81 68 69
|
||||
70 71 72 73
|
||||
74 75 76 77>;
|
||||
- interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty",
|
||||
+ interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty",
|
||||
"saif0", "saif1", "i2c0", "i2c1",
|
||||
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
|
||||
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
|
||||
diff --git a/Makefile b/Makefile
|
||||
index cf99a9b53c6f..e26cb1e56266 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 78
|
||||
+SUBLEVEL = 79
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
|
||||
index 9746d0e7fcb4..5dfb3d354470 100644
|
||||
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
|
||||
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
|
||||
@@ -32,6 +32,10 @@
|
||||
0xf0000000 0 0xf0000000 0x8000000 /* Device Bus, NOR 128MiB */>;
|
||||
|
||||
internal-regs {
|
||||
+ rtc@10300 {
|
||||
+ /* No crystal connected to the internal RTC */
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
serial@12000 {
|
||||
clock-frequency = <250000000>;
|
||||
status = "okay";
|
||||
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
|
||||
index d107c4af321f..6fef54416cbf 100644
|
||||
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
|
||||
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
|
||||
@@ -89,6 +89,7 @@
|
||||
|
||||
ahb@80080000 {
|
||||
usb0: usb@80080000 {
|
||||
+ dr_mode = "host";
|
||||
vbus-supply = <®_usb0_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
|
||||
index 97d1a550eb98..2a571bcacaf4 100644
|
||||
--- a/arch/arm/boot/dts/imx25.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx25.dtsi
|
||||
@@ -393,6 +393,7 @@
|
||||
|
||||
pwm4: pwm@53fc8000 {
|
||||
compatible = "fsl,imx25-pwm", "fsl,imx27-pwm";
|
||||
+ #pwm-cells = <2>;
|
||||
reg = <0x53fc8000 0x4000>;
|
||||
clocks = <&clks 108>, <&clks 52>;
|
||||
clock-names = "ipg", "per";
|
||||
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
|
||||
index 4c10a1968c0e..2e76b84c6bad 100644
|
||||
--- a/arch/arm/boot/dts/imx28.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx28.dtsi
|
||||
@@ -691,7 +691,7 @@
|
||||
80 81 68 69
|
||||
70 71 72 73
|
||||
74 75 76 77>;
|
||||
- interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty",
|
||||
+ interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty",
|
||||
"saif0", "saif1", "i2c0", "i2c1",
|
||||
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
|
||||
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
|
||||
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
|
||||
index ee6367b8eaf7..e9b13b92ba1e 100644
|
||||
--- a/drivers/acpi/acpica/dsopcode.c
|
||||
+++ b/drivers/acpi/acpica/dsopcode.c
|
||||
@@ -539,8 +539,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
|
||||
return_ACPI_STATUS(AE_NOT_EXIST);
|
||||
}
|
||||
|
||||
- obj_desc->region.address =
|
||||
- (acpi_physical_address) ACPI_TO_INTEGER(table);
|
||||
+ obj_desc->region.address = ACPI_PTR_TO_PHYSADDR(table);
|
||||
obj_desc->region.length = table->length;
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
||||
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
|
||||
index e57cd38004e3..0d2351596a3c 100644
|
||||
--- a/drivers/acpi/acpica/tbinstal.c
|
||||
+++ b/drivers/acpi/acpica/tbinstal.c
|
||||
@@ -301,8 +301,7 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
|
||||
ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
|
||||
"%4.4s %p Attempted physical table override failed",
|
||||
table_header->signature,
|
||||
- ACPI_CAST_PTR(void,
|
||||
- table_desc->address)));
|
||||
+ ACPI_PHYSADDR_TO_PTR(table_desc->address)));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -318,7 +317,7 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
|
||||
ACPI_INFO((AE_INFO,
|
||||
"%4.4s %p %s table override, new table: %p",
|
||||
table_header->signature,
|
||||
- ACPI_CAST_PTR(void, table_desc->address),
|
||||
+ ACPI_PHYSADDR_TO_PTR(table_desc->address),
|
||||
override_type, new_table));
|
||||
|
||||
/* We can now unmap/delete the original table (if fully mapped) */
|
||||
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
|
||||
index 7c2ecfb7c2c3..e12486031d97 100644
|
||||
--- a/drivers/acpi/acpica/tbxfroot.c
|
||||
+++ b/drivers/acpi/acpica/tbxfroot.c
|
||||
@@ -118,7 +118,7 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
-acpi_status acpi_find_root_pointer(acpi_size *table_address)
|
||||
+acpi_status acpi_find_root_pointer(acpi_physical_address * table_address)
|
||||
{
|
||||
u8 *table_ptr;
|
||||
u8 *mem_rover;
|
||||
@@ -176,7 +176,8 @@ acpi_status acpi_find_root_pointer(acpi_size *table_address)
|
||||
physical_address +=
|
||||
(u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
|
||||
|
||||
- *table_address = physical_address;
|
||||
+ *table_address =
|
||||
+ (acpi_physical_address) physical_address;
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
}
|
||||
@@ -209,7 +210,7 @@ acpi_status acpi_find_root_pointer(acpi_size *table_address)
|
||||
(ACPI_HI_RSDP_WINDOW_BASE +
|
||||
ACPI_PTR_DIFF(mem_rover, table_ptr));
|
||||
|
||||
- *table_address = physical_address;
|
||||
+ *table_address = (acpi_physical_address) physical_address;
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
|
||||
index ca1cb2d756c2..c3768fafff45 100644
|
||||
--- a/drivers/gpio/gpiolib.c
|
||||
+++ b/drivers/gpio/gpiolib.c
|
||||
@@ -752,6 +752,7 @@ static struct class gpio_class = {
|
||||
*/
|
||||
static int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
|
||||
{
|
||||
+ struct gpio_chip *chip;
|
||||
unsigned long flags;
|
||||
int status;
|
||||
const char *ioname = NULL;
|
||||
@@ -769,8 +770,16 @@ static int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ chip = desc->chip;
|
||||
+
|
||||
mutex_lock(&sysfs_lock);
|
||||
|
||||
+ /* check if chip is being removed */
|
||||
+ if (!chip || !chip->exported) {
|
||||
+ status = -ENODEV;
|
||||
+ goto fail_unlock;
|
||||
+ }
|
||||
+
|
||||
spin_lock_irqsave(&gpio_lock, flags);
|
||||
if (!test_bit(FLAG_REQUESTED, &desc->flags) ||
|
||||
test_bit(FLAG_EXPORT, &desc->flags)) {
|
||||
@@ -1040,6 +1049,8 @@ static void gpiochip_unexport(struct gpio_chip *chip)
|
||||
{
|
||||
int status;
|
||||
struct device *dev;
|
||||
+ struct gpio_desc *desc;
|
||||
+ unsigned int i;
|
||||
|
||||
mutex_lock(&sysfs_lock);
|
||||
dev = class_find_device(&gpio_class, NULL, chip, match_export);
|
||||
@@ -1047,6 +1058,7 @@ static void gpiochip_unexport(struct gpio_chip *chip)
|
||||
sysfs_remove_group(&dev->kobj, &gpiochip_attr_group);
|
||||
put_device(dev);
|
||||
device_unregister(dev);
|
||||
+ /* prevent further gpiod exports */
|
||||
chip->exported = 0;
|
||||
status = 0;
|
||||
} else
|
||||
@@ -1056,6 +1068,13 @@ static void gpiochip_unexport(struct gpio_chip *chip)
|
||||
if (status)
|
||||
pr_debug("%s: chip %s status %d\n", __func__,
|
||||
chip->label, status);
|
||||
+
|
||||
+ /* unregister gpiod class devices owned by sysfs */
|
||||
+ for (i = 0; i < chip->ngpio; i++) {
|
||||
+ desc = &chip->desc[i];
|
||||
+ if (test_and_clear_bit(FLAG_SYSFS, &desc->flags))
|
||||
+ gpiod_free(desc);
|
||||
+ }
|
||||
}
|
||||
|
||||
static int __init gpiolib_sysfs_init(void)
|
||||
@@ -1265,6 +1284,8 @@ int gpiochip_remove(struct gpio_chip *chip)
|
||||
int status = 0;
|
||||
unsigned id;
|
||||
|
||||
+ gpiochip_unexport(chip);
|
||||
+
|
||||
spin_lock_irqsave(&gpio_lock, flags);
|
||||
|
||||
gpiochip_remove_pin_ranges(chip);
|
||||
@@ -1285,9 +1306,6 @@ int gpiochip_remove(struct gpio_chip *chip)
|
||||
|
||||
spin_unlock_irqrestore(&gpio_lock, flags);
|
||||
|
||||
- if (status == 0)
|
||||
- gpiochip_unexport(chip);
|
||||
-
|
||||
return status;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gpiochip_remove);
|
||||
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
|
||||
index f5d1dc5b5563..54ebfbe370c6 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_lvds.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_lvds.c
|
||||
@@ -1007,12 +1007,28 @@ static int intel_dual_link_lvds_callback(const struct dmi_system_id *id)
|
||||
static const struct dmi_system_id intel_dual_link_lvds[] = {
|
||||
{
|
||||
.callback = intel_dual_link_lvds_callback,
|
||||
- .ident = "Apple MacBook Pro (Core i5/i7 Series)",
|
||||
+ .ident = "Apple MacBook Pro 15\" (2010)",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro6,2"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .callback = intel_dual_link_lvds_callback,
|
||||
+ .ident = "Apple MacBook Pro 15\" (2011)",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
|
||||
},
|
||||
},
|
||||
+ {
|
||||
+ .callback = intel_dual_link_lvds_callback,
|
||||
+ .ident = "Apple MacBook Pro 15\" (2012)",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,1"),
|
||||
+ },
|
||||
+ },
|
||||
{ } /* terminating entry */
|
||||
};
|
||||
|
||||
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
|
||||
index 7ad66823d022..56998eca1a8d 100644
|
||||
--- a/drivers/mmc/card/block.c
|
||||
+++ b/drivers/mmc/card/block.c
|
||||
@@ -908,6 +908,18 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type)
|
||||
md->reset_done &= ~type;
|
||||
}
|
||||
|
||||
+int mmc_access_rpmb(struct mmc_queue *mq)
|
||||
+{
|
||||
+ struct mmc_blk_data *md = mq->data;
|
||||
+ /*
|
||||
+ * If this is a RPMB partition access, return ture
|
||||
+ */
|
||||
+ if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
|
||||
{
|
||||
struct mmc_blk_data *md = mq->data;
|
||||
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
|
||||
index 9447a0e970d1..645519fe3acd 100644
|
||||
--- a/drivers/mmc/card/queue.c
|
||||
+++ b/drivers/mmc/card/queue.c
|
||||
@@ -37,7 +37,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req)
|
||||
return BLKPREP_KILL;
|
||||
}
|
||||
|
||||
- if (mq && mmc_card_removed(mq->card))
|
||||
+ if (mq && (mmc_card_removed(mq->card) || mmc_access_rpmb(mq)))
|
||||
return BLKPREP_KILL;
|
||||
|
||||
req->cmd_flags |= REQ_DONTPREP;
|
||||
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h
|
||||
index 5752d50049a3..99e6521e6169 100644
|
||||
--- a/drivers/mmc/card/queue.h
|
||||
+++ b/drivers/mmc/card/queue.h
|
||||
@@ -73,4 +73,6 @@ extern void mmc_queue_bounce_post(struct mmc_queue_req *);
|
||||
extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *);
|
||||
extern void mmc_packed_clean(struct mmc_queue *);
|
||||
|
||||
+extern int mmc_access_rpmb(struct mmc_queue *);
|
||||
+
|
||||
#endif
|
||||
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
|
||||
index 9c9fc69a01b3..ea40c5139766 100644
|
||||
--- a/drivers/pinctrl/core.c
|
||||
+++ b/drivers/pinctrl/core.c
|
||||
@@ -1077,7 +1077,7 @@ void devm_pinctrl_put(struct pinctrl *p)
|
||||
EXPORT_SYMBOL_GPL(devm_pinctrl_put);
|
||||
|
||||
int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
|
||||
- bool dup, bool locked)
|
||||
+ bool dup)
|
||||
{
|
||||
int i, ret;
|
||||
struct pinctrl_maps *maps_node;
|
||||
@@ -1145,11 +1145,9 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
|
||||
maps_node->maps = maps;
|
||||
}
|
||||
|
||||
- if (!locked)
|
||||
- mutex_lock(&pinctrl_maps_mutex);
|
||||
+ mutex_lock(&pinctrl_maps_mutex);
|
||||
list_add_tail(&maps_node->node, &pinctrl_maps);
|
||||
- if (!locked)
|
||||
- mutex_unlock(&pinctrl_maps_mutex);
|
||||
+ mutex_unlock(&pinctrl_maps_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1164,7 +1162,7 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
|
||||
int pinctrl_register_mappings(struct pinctrl_map const *maps,
|
||||
unsigned num_maps)
|
||||
{
|
||||
- return pinctrl_register_map(maps, num_maps, true, false);
|
||||
+ return pinctrl_register_map(maps, num_maps, true);
|
||||
}
|
||||
|
||||
void pinctrl_unregister_map(struct pinctrl_map const *map)
|
||||
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
|
||||
index 75476b3d87da..b24ea846c867 100644
|
||||
--- a/drivers/pinctrl/core.h
|
||||
+++ b/drivers/pinctrl/core.h
|
||||
@@ -183,7 +183,7 @@ static inline struct pin_desc *pin_desc_get(struct pinctrl_dev *pctldev,
|
||||
}
|
||||
|
||||
int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
|
||||
- bool dup, bool locked);
|
||||
+ bool dup);
|
||||
void pinctrl_unregister_map(struct pinctrl_map const *map);
|
||||
|
||||
extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev);
|
||||
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
|
||||
index 340fb4e6c600..fd91c4c31f6b 100644
|
||||
--- a/drivers/pinctrl/devicetree.c
|
||||
+++ b/drivers/pinctrl/devicetree.c
|
||||
@@ -92,7 +92,7 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,
|
||||
dt_map->num_maps = num_maps;
|
||||
list_add_tail(&dt_map->node, &p->dt_maps);
|
||||
|
||||
- return pinctrl_register_map(map, num_maps, false, true);
|
||||
+ return pinctrl_register_map(map, num_maps, false);
|
||||
}
|
||||
|
||||
struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
|
||||
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
|
||||
index 4fc32c8091e9..ff92155dbc88 100644
|
||||
--- a/drivers/tty/hvc/hvc_xen.c
|
||||
+++ b/drivers/tty/hvc/hvc_xen.c
|
||||
@@ -299,11 +299,27 @@ static int xen_initial_domain_console_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static void xen_console_update_evtchn(struct xencons_info *info)
|
||||
+{
|
||||
+ if (xen_hvm_domain()) {
|
||||
+ uint64_t v;
|
||||
+ int err;
|
||||
+
|
||||
+ err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
|
||||
+ if (!err && v)
|
||||
+ info->evtchn = v;
|
||||
+ } else
|
||||
+ info->evtchn = xen_start_info->console.domU.evtchn;
|
||||
+}
|
||||
+
|
||||
void xen_console_resume(void)
|
||||
{
|
||||
struct xencons_info *info = vtermno_to_xencons(HVC_COOKIE);
|
||||
- if (info != NULL && info->irq)
|
||||
+ if (info != NULL && info->irq) {
|
||||
+ if (!xen_initial_domain())
|
||||
+ xen_console_update_evtchn(info);
|
||||
rebind_evtchn_irq(info->evtchn, info->irq);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void xencons_disconnect_backend(struct xencons_info *info)
|
||||
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
|
||||
index ecdbae19a766..090d8ce25bd1 100644
|
||||
--- a/fs/nilfs2/btree.c
|
||||
+++ b/fs/nilfs2/btree.c
|
||||
@@ -388,7 +388,7 @@ static int nilfs_btree_root_broken(const struct nilfs_btree_node *node,
|
||||
nchildren = nilfs_btree_node_get_nchildren(node);
|
||||
|
||||
if (unlikely(level < NILFS_BTREE_LEVEL_NODE_MIN ||
|
||||
- level > NILFS_BTREE_LEVEL_MAX ||
|
||||
+ level >= NILFS_BTREE_LEVEL_MAX ||
|
||||
nchildren < 0 ||
|
||||
nchildren > NILFS_BTREE_ROOT_NCHILDREN_MAX)) {
|
||||
pr_crit("NILFS: bad btree root (inode number=%lu): level = %d, flags = 0x%x, nchildren = %d\n",
|
||||
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
|
||||
index 2b941113e423..2c119d5d04c9 100644
|
||||
--- a/fs/ocfs2/dlm/dlmmaster.c
|
||||
+++ b/fs/ocfs2/dlm/dlmmaster.c
|
||||
@@ -729,6 +729,19 @@ lookup:
|
||||
if (tmpres) {
|
||||
spin_unlock(&dlm->spinlock);
|
||||
spin_lock(&tmpres->spinlock);
|
||||
+
|
||||
+ /*
|
||||
+ * Right after dlm spinlock was released, dlm_thread could have
|
||||
+ * purged the lockres. Check if lockres got unhashed. If so
|
||||
+ * start over.
|
||||
+ */
|
||||
+ if (hlist_unhashed(&tmpres->hash_node)) {
|
||||
+ spin_unlock(&tmpres->spinlock);
|
||||
+ dlm_lockres_put(tmpres);
|
||||
+ tmpres = NULL;
|
||||
+ goto lookup;
|
||||
+ }
|
||||
+
|
||||
/* Wait on the thread that is mastering the resource */
|
||||
if (tmpres->owner == DLM_LOCK_RES_OWNER_UNKNOWN) {
|
||||
__dlm_wait_on_lockres(tmpres);
|
||||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
|
||||
index 454881e6450a..fcabb1597d5b 100644
|
||||
--- a/include/acpi/acpixf.h
|
||||
+++ b/include/acpi/acpixf.h
|
||||
@@ -177,7 +177,7 @@ acpi_status acpi_load_tables(void);
|
||||
*/
|
||||
acpi_status acpi_reallocate_root_table(void);
|
||||
|
||||
-acpi_status acpi_find_root_pointer(acpi_size *rsdp_address);
|
||||
+acpi_status acpi_find_root_pointer(acpi_physical_address *rsdp_address);
|
||||
|
||||
acpi_status acpi_unload_table_id(acpi_owner_id id);
|
||||
|
||||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
|
||||
index 6de0f2c14ec0..f05efb1160fb 100644
|
||||
--- a/include/linux/interrupt.h
|
||||
+++ b/include/linux/interrupt.h
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <linux/irqnr.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/irqflags.h>
|
||||
-#include <linux/smp.h>
|
||||
-#include <linux/percpu.h>
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/workqueue.h>
|
||||
@@ -488,15 +486,6 @@ extern void __raise_softirq_irqoff(unsigned int nr);
|
||||
extern void raise_softirq_irqoff(unsigned int nr);
|
||||
extern void raise_softirq(unsigned int nr);
|
||||
|
||||
-/* This is the worklist that queues up per-cpu softirq work.
|
||||
- *
|
||||
- * send_remote_sendirq() adds work to these lists, and
|
||||
- * the softirq handler itself dequeues from them. The queues
|
||||
- * are protected by disabling local cpu interrupts and they must
|
||||
- * only be accessed by the local cpu that they are for.
|
||||
- */
|
||||
-DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
|
||||
-
|
||||
DECLARE_PER_CPU(struct task_struct *, ksoftirqd);
|
||||
|
||||
static inline struct task_struct *this_cpu_ksoftirqd(void)
|
||||
@@ -504,17 +493,6 @@ static inline struct task_struct *this_cpu_ksoftirqd(void)
|
||||
return this_cpu_read(ksoftirqd);
|
||||
}
|
||||
|
||||
-/* Try to send a softirq to a remote cpu. If this cannot be done, the
|
||||
- * work will be queued to the local cpu.
|
||||
- */
|
||||
-extern void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq);
|
||||
-
|
||||
-/* Like send_remote_softirq(), but the caller must disable local cpu interrupts
|
||||
- * and compute the current cpu, passed in as 'this_cpu'.
|
||||
- */
|
||||
-extern void __send_remote_softirq(struct call_single_data *cp, int cpu,
|
||||
- int this_cpu, int softirq);
|
||||
-
|
||||
/* Tasklets --- multithreaded analogue of BHs.
|
||||
|
||||
Main feature differing them of generic softirqs: tasklet
|
||||
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
|
||||
index 98755767c7b0..1108acaacfc6 100644
|
||||
--- a/include/linux/nilfs2_fs.h
|
||||
+++ b/include/linux/nilfs2_fs.h
|
||||
@@ -458,7 +458,7 @@ struct nilfs_btree_node {
|
||||
/* level */
|
||||
#define NILFS_BTREE_LEVEL_DATA 0
|
||||
#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
|
||||
-#define NILFS_BTREE_LEVEL_MAX 14
|
||||
+#define NILFS_BTREE_LEVEL_MAX 14 /* Max level (exclusive) */
|
||||
|
||||
/**
|
||||
* struct nilfs_palloc_group_desc - block group descriptor
|
||||
diff --git a/kernel/softirq.c b/kernel/softirq.c
|
||||
index 21956f00cb51..b538df367de3 100644
|
||||
--- a/kernel/softirq.c
|
||||
+++ b/kernel/softirq.c
|
||||
@@ -6,8 +6,6 @@
|
||||
* Distribute under GPLv2.
|
||||
*
|
||||
* Rewritten. Old one was good in 2.2, but in 2.3 it was immoral. --ANK (990903)
|
||||
- *
|
||||
- * Remote softirq infrastructure is by Jens Axboe.
|
||||
*/
|
||||
|
||||
#include <linux/export.h>
|
||||
@@ -620,146 +618,17 @@ void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tasklet_hrtimer_init);
|
||||
|
||||
-/*
|
||||
- * Remote softirq bits
|
||||
- */
|
||||
-
|
||||
-DEFINE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
|
||||
-EXPORT_PER_CPU_SYMBOL(softirq_work_list);
|
||||
-
|
||||
-static void __local_trigger(struct call_single_data *cp, int softirq)
|
||||
-{
|
||||
- struct list_head *head = &__get_cpu_var(softirq_work_list[softirq]);
|
||||
-
|
||||
- list_add_tail(&cp->list, head);
|
||||
-
|
||||
- /* Trigger the softirq only if the list was previously empty. */
|
||||
- if (head->next == &cp->list)
|
||||
- raise_softirq_irqoff(softirq);
|
||||
-}
|
||||
-
|
||||
-#ifdef CONFIG_USE_GENERIC_SMP_HELPERS
|
||||
-static void remote_softirq_receive(void *data)
|
||||
-{
|
||||
- struct call_single_data *cp = data;
|
||||
- unsigned long flags;
|
||||
- int softirq;
|
||||
-
|
||||
- softirq = *(int *)cp->info;
|
||||
- local_irq_save(flags);
|
||||
- __local_trigger(cp, softirq);
|
||||
- local_irq_restore(flags);
|
||||
-}
|
||||
-
|
||||
-static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
|
||||
-{
|
||||
- if (cpu_online(cpu)) {
|
||||
- cp->func = remote_softirq_receive;
|
||||
- cp->info = &softirq;
|
||||
- cp->flags = 0;
|
||||
-
|
||||
- __smp_call_function_single(cpu, cp, 0);
|
||||
- return 0;
|
||||
- }
|
||||
- return 1;
|
||||
-}
|
||||
-#else /* CONFIG_USE_GENERIC_SMP_HELPERS */
|
||||
-static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
|
||||
-{
|
||||
- return 1;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-/**
|
||||
- * __send_remote_softirq - try to schedule softirq work on a remote cpu
|
||||
- * @cp: private SMP call function data area
|
||||
- * @cpu: the remote cpu
|
||||
- * @this_cpu: the currently executing cpu
|
||||
- * @softirq: the softirq for the work
|
||||
- *
|
||||
- * Attempt to schedule softirq work on a remote cpu. If this cannot be
|
||||
- * done, the work is instead queued up on the local cpu.
|
||||
- *
|
||||
- * Interrupts must be disabled.
|
||||
- */
|
||||
-void __send_remote_softirq(struct call_single_data *cp, int cpu, int this_cpu, int softirq)
|
||||
-{
|
||||
- if (cpu == this_cpu || __try_remote_softirq(cp, cpu, softirq))
|
||||
- __local_trigger(cp, softirq);
|
||||
-}
|
||||
-EXPORT_SYMBOL(__send_remote_softirq);
|
||||
-
|
||||
-/**
|
||||
- * send_remote_softirq - try to schedule softirq work on a remote cpu
|
||||
- * @cp: private SMP call function data area
|
||||
- * @cpu: the remote cpu
|
||||
- * @softirq: the softirq for the work
|
||||
- *
|
||||
- * Like __send_remote_softirq except that disabling interrupts and
|
||||
- * computing the current cpu is done for the caller.
|
||||
- */
|
||||
-void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq)
|
||||
-{
|
||||
- unsigned long flags;
|
||||
- int this_cpu;
|
||||
-
|
||||
- local_irq_save(flags);
|
||||
- this_cpu = smp_processor_id();
|
||||
- __send_remote_softirq(cp, cpu, this_cpu, softirq);
|
||||
- local_irq_restore(flags);
|
||||
-}
|
||||
-EXPORT_SYMBOL(send_remote_softirq);
|
||||
-
|
||||
-static int __cpuinit remote_softirq_cpu_notify(struct notifier_block *self,
|
||||
- unsigned long action, void *hcpu)
|
||||
-{
|
||||
- /*
|
||||
- * If a CPU goes away, splice its entries to the current CPU
|
||||
- * and trigger a run of the softirq
|
||||
- */
|
||||
- if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
|
||||
- int cpu = (unsigned long) hcpu;
|
||||
- int i;
|
||||
-
|
||||
- local_irq_disable();
|
||||
- for (i = 0; i < NR_SOFTIRQS; i++) {
|
||||
- struct list_head *head = &per_cpu(softirq_work_list[i], cpu);
|
||||
- struct list_head *local_head;
|
||||
-
|
||||
- if (list_empty(head))
|
||||
- continue;
|
||||
-
|
||||
- local_head = &__get_cpu_var(softirq_work_list[i]);
|
||||
- list_splice_init(head, local_head);
|
||||
- raise_softirq_irqoff(i);
|
||||
- }
|
||||
- local_irq_enable();
|
||||
- }
|
||||
-
|
||||
- return NOTIFY_OK;
|
||||
-}
|
||||
-
|
||||
-static struct notifier_block __cpuinitdata remote_softirq_cpu_notifier = {
|
||||
- .notifier_call = remote_softirq_cpu_notify,
|
||||
-};
|
||||
-
|
||||
void __init softirq_init(void)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
- int i;
|
||||
-
|
||||
per_cpu(tasklet_vec, cpu).tail =
|
||||
&per_cpu(tasklet_vec, cpu).head;
|
||||
per_cpu(tasklet_hi_vec, cpu).tail =
|
||||
&per_cpu(tasklet_hi_vec, cpu).head;
|
||||
- for (i = 0; i < NR_SOFTIRQS; i++)
|
||||
- INIT_LIST_HEAD(&per_cpu(softirq_work_list[i], cpu));
|
||||
}
|
||||
|
||||
- register_hotcpu_notifier(&remote_softirq_cpu_notifier);
|
||||
-
|
||||
open_softirq(TASKLET_SOFTIRQ, tasklet_action);
|
||||
open_softirq(HI_SOFTIRQ, tasklet_hi_action);
|
||||
}
|
||||
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
|
||||
index 603f1fa1b7a3..ca96f411b034 100644
|
||||
--- a/mm/memory-failure.c
|
||||
+++ b/mm/memory-failure.c
|
||||
@@ -1117,10 +1117,10 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
|
||||
* The check (unnecessarily) ignores LRU pages being isolated and
|
||||
* walked by the page reclaim code, however that's not a big loss.
|
||||
*/
|
||||
- if (!PageHuge(p) && !PageTransTail(p)) {
|
||||
- if (!PageLRU(p))
|
||||
- shake_page(p, 0);
|
||||
- if (!PageLRU(p)) {
|
||||
+ if (!PageHuge(p)) {
|
||||
+ if (!PageLRU(hpage))
|
||||
+ shake_page(hpage, 0);
|
||||
+ if (!PageLRU(hpage)) {
|
||||
/*
|
||||
* shake_page could have turned it free.
|
||||
*/
|
||||
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
|
||||
index 4ff60a6427d9..2e67dd590be5 100644
|
||||
--- a/sound/oss/sequencer.c
|
||||
+++ b/sound/oss/sequencer.c
|
||||
@@ -683,13 +683,8 @@ static int seq_timing_event(unsigned char *event_rec)
|
||||
break;
|
||||
|
||||
case TMR_ECHO:
|
||||
- if (seq_mode == SEQ_2)
|
||||
- seq_copy_to_input(event_rec, 8);
|
||||
- else
|
||||
- {
|
||||
- parm = (parm << 8 | SEQ_ECHO);
|
||||
- seq_copy_to_input((unsigned char *) &parm, 4);
|
||||
- }
|
||||
+ parm = (parm << 8 | SEQ_ECHO);
|
||||
+ seq_copy_to_input((unsigned char *) &parm, 4);
|
||||
break;
|
||||
|
||||
default:;
|
||||
@@ -1332,7 +1327,6 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
|
||||
int mode = translate_mode(file);
|
||||
struct synth_info inf;
|
||||
struct seq_event_rec event_rec;
|
||||
- unsigned long flags;
|
||||
int __user *p = arg;
|
||||
|
||||
orig_dev = dev = dev >> 4;
|
||||
@@ -1487,9 +1481,7 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
|
||||
case SNDCTL_SEQ_OUTOFBAND:
|
||||
if (copy_from_user(&event_rec, arg, sizeof(event_rec)))
|
||||
return -EFAULT;
|
||||
- spin_lock_irqsave(&lock,flags);
|
||||
play_event(event_rec.arr);
|
||||
- spin_unlock_irqrestore(&lock,flags);
|
||||
return 0;
|
||||
|
||||
case SNDCTL_MIDI_INFO:
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,698 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 067433219984..6d19e37d36d5 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 80
|
||||
+SUBLEVEL = 81
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
|
||||
index d1fea7a054be..7479d8d847a6 100644
|
||||
--- a/arch/mips/kernel/irq.c
|
||||
+++ b/arch/mips/kernel/irq.c
|
||||
@@ -110,7 +110,7 @@ void __init init_IRQ(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
-#ifdef DEBUG_STACKOVERFLOW
|
||||
+#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
||||
static inline void check_stack_overflow(void)
|
||||
{
|
||||
unsigned long sp;
|
||||
diff --git a/block/genhd.c b/block/genhd.c
|
||||
index 7694dffe9f0e..b09f5fc94dee 100644
|
||||
--- a/block/genhd.c
|
||||
+++ b/block/genhd.c
|
||||
@@ -422,9 +422,9 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)
|
||||
/* allocate ext devt */
|
||||
idr_preload(GFP_KERNEL);
|
||||
|
||||
- spin_lock(&ext_devt_lock);
|
||||
+ spin_lock_bh(&ext_devt_lock);
|
||||
idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT);
|
||||
- spin_unlock(&ext_devt_lock);
|
||||
+ spin_unlock_bh(&ext_devt_lock);
|
||||
|
||||
idr_preload_end();
|
||||
if (idx < 0)
|
||||
@@ -449,9 +449,9 @@ void blk_free_devt(dev_t devt)
|
||||
return;
|
||||
|
||||
if (MAJOR(devt) == BLOCK_EXT_MAJOR) {
|
||||
- spin_lock(&ext_devt_lock);
|
||||
+ spin_lock_bh(&ext_devt_lock);
|
||||
idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
|
||||
- spin_unlock(&ext_devt_lock);
|
||||
+ spin_unlock_bh(&ext_devt_lock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -691,13 +691,13 @@ struct gendisk *get_gendisk(dev_t devt, int *partno)
|
||||
} else {
|
||||
struct hd_struct *part;
|
||||
|
||||
- spin_lock(&ext_devt_lock);
|
||||
+ spin_lock_bh(&ext_devt_lock);
|
||||
part = idr_find(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
|
||||
if (part && get_disk(part_to_disk(part))) {
|
||||
*partno = part->partno;
|
||||
disk = part_to_disk(part);
|
||||
}
|
||||
- spin_unlock(&ext_devt_lock);
|
||||
+ spin_unlock_bh(&ext_devt_lock);
|
||||
}
|
||||
|
||||
return disk;
|
||||
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
|
||||
index e73bef3093d2..5507f36a06b4 100644
|
||||
--- a/drivers/ata/pata_octeon_cf.c
|
||||
+++ b/drivers/ata/pata_octeon_cf.c
|
||||
@@ -1068,7 +1068,7 @@ static struct of_device_id octeon_cf_match[] = {
|
||||
},
|
||||
{},
|
||||
};
|
||||
-MODULE_DEVICE_TABLE(of, octeon_i2c_match);
|
||||
+MODULE_DEVICE_TABLE(of, octeon_cf_match);
|
||||
|
||||
static struct platform_driver octeon_cf_driver = {
|
||||
.probe = octeon_cf_probe,
|
||||
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
|
||||
index 4a21e13cc58c..d5e666fb459c 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_i2c.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_i2c.c
|
||||
@@ -441,7 +441,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
|
||||
struct intel_gmbus,
|
||||
adapter);
|
||||
struct drm_i915_private *dev_priv = bus->dev_priv;
|
||||
- int i, reg_offset;
|
||||
+ int i = 0, inc, try = 0, reg_offset;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&dev_priv->gmbus_mutex);
|
||||
@@ -453,12 +453,14 @@ gmbus_xfer(struct i2c_adapter *adapter,
|
||||
|
||||
reg_offset = dev_priv->gpio_mmio_base;
|
||||
|
||||
+retry:
|
||||
I915_WRITE(GMBUS0 + reg_offset, bus->reg0);
|
||||
|
||||
- for (i = 0; i < num; i++) {
|
||||
+ for (; i < num; i += inc) {
|
||||
+ inc = 1;
|
||||
if (gmbus_is_index_read(msgs, i, num)) {
|
||||
ret = gmbus_xfer_index_read(dev_priv, &msgs[i]);
|
||||
- i += 1; /* set i to the index of the read xfer */
|
||||
+ inc = 2; /* an index read is two msgs */
|
||||
} else if (msgs[i].flags & I2C_M_RD) {
|
||||
ret = gmbus_xfer_read(dev_priv, &msgs[i], 0);
|
||||
} else {
|
||||
@@ -530,6 +532,18 @@ clear_err:
|
||||
adapter->name, msgs[i].addr,
|
||||
(msgs[i].flags & I2C_M_RD) ? 'r' : 'w', msgs[i].len);
|
||||
|
||||
+ /*
|
||||
+ * Passive adapters sometimes NAK the first probe. Retry the first
|
||||
+ * message once on -ENXIO for GMBUS transfers; the bit banging algorithm
|
||||
+ * has retries internally. See also the retry loop in
|
||||
+ * drm_do_probe_ddc_edid, which bails out on the first -ENXIO.
|
||||
+ */
|
||||
+ if (ret == -ENXIO && i == 0 && try++ == 0) {
|
||||
+ DRM_DEBUG_KMS("GMBUS [%s] NAK on first message, retry\n",
|
||||
+ adapter->name);
|
||||
+ goto retry;
|
||||
+ }
|
||||
+
|
||||
goto out;
|
||||
|
||||
timeout:
|
||||
diff --git a/drivers/iio/imu/adis16400.h b/drivers/iio/imu/adis16400.h
|
||||
index 0916bf6b6c31..1e8fd2e81d45 100644
|
||||
--- a/drivers/iio/imu/adis16400.h
|
||||
+++ b/drivers/iio/imu/adis16400.h
|
||||
@@ -165,6 +165,7 @@ struct adis16400_state {
|
||||
int filt_int;
|
||||
|
||||
struct adis adis;
|
||||
+ unsigned long avail_scan_mask[2];
|
||||
};
|
||||
|
||||
/* At the moment triggers are only used for ring buffer
|
||||
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
|
||||
index 7d60c85cc16d..9721c58ed847 100644
|
||||
--- a/drivers/iio/imu/adis16400_core.c
|
||||
+++ b/drivers/iio/imu/adis16400_core.c
|
||||
@@ -438,6 +438,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
|
||||
*val = st->variant->temp_scale_nano / 1000000;
|
||||
*val2 = (st->variant->temp_scale_nano % 1000000);
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
+ case IIO_PRESSURE:
|
||||
+ /* 20 uBar = 0.002kPascal */
|
||||
+ *val = 0;
|
||||
+ *val2 = 2000;
|
||||
+ return IIO_VAL_INT_PLUS_MICRO;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -480,10 +485,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
|
||||
}
|
||||
}
|
||||
|
||||
-#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si) { \
|
||||
+#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si, chn) { \
|
||||
.type = IIO_VOLTAGE, \
|
||||
.indexed = 1, \
|
||||
- .channel = 0, \
|
||||
+ .channel = chn, \
|
||||
.extend_name = name, \
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
|
||||
BIT(IIO_CHAN_INFO_SCALE), \
|
||||
@@ -499,10 +504,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
|
||||
}
|
||||
|
||||
#define ADIS16400_SUPPLY_CHAN(addr, bits) \
|
||||
- ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY)
|
||||
+ ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY, 0)
|
||||
|
||||
#define ADIS16400_AUX_ADC_CHAN(addr, bits) \
|
||||
- ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC)
|
||||
+ ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC, 1)
|
||||
|
||||
#define ADIS16400_GYRO_CHAN(mod, addr, bits) { \
|
||||
.type = IIO_ANGL_VEL, \
|
||||
@@ -819,11 +824,6 @@ static const struct iio_info adis16400_info = {
|
||||
.debugfs_reg_access = adis_debugfs_reg_access,
|
||||
};
|
||||
|
||||
-static const unsigned long adis16400_burst_scan_mask[] = {
|
||||
- ~0UL,
|
||||
- 0,
|
||||
-};
|
||||
-
|
||||
static const char * const adis16400_status_error_msgs[] = {
|
||||
[ADIS16400_DIAG_STAT_ZACCL_FAIL] = "Z-axis accelerometer self-test failure",
|
||||
[ADIS16400_DIAG_STAT_YACCL_FAIL] = "Y-axis accelerometer self-test failure",
|
||||
@@ -871,6 +871,20 @@ static const struct adis_data adis16400_data = {
|
||||
BIT(ADIS16400_DIAG_STAT_POWER_LOW),
|
||||
};
|
||||
|
||||
+static void adis16400_setup_chan_mask(struct adis16400_state *st)
|
||||
+{
|
||||
+ const struct adis16400_chip_info *chip_info = st->variant;
|
||||
+ unsigned i;
|
||||
+
|
||||
+ for (i = 0; i < chip_info->num_channels; i++) {
|
||||
+ const struct iio_chan_spec *ch = &chip_info->channels[i];
|
||||
+
|
||||
+ if (ch->scan_index >= 0 &&
|
||||
+ ch->scan_index != ADIS16400_SCAN_TIMESTAMP)
|
||||
+ st->avail_scan_mask[0] |= BIT(ch->scan_index);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int adis16400_probe(struct spi_device *spi)
|
||||
{
|
||||
struct adis16400_state *st;
|
||||
@@ -894,8 +908,10 @@ static int adis16400_probe(struct spi_device *spi)
|
||||
indio_dev->info = &adis16400_info;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
|
||||
- if (!(st->variant->flags & ADIS16400_NO_BURST))
|
||||
- indio_dev->available_scan_masks = adis16400_burst_scan_mask;
|
||||
+ if (!(st->variant->flags & ADIS16400_NO_BURST)) {
|
||||
+ adis16400_setup_chan_mask(st);
|
||||
+ indio_dev->available_scan_masks = st->avail_scan_mask;
|
||||
+ }
|
||||
|
||||
ret = adis_init(&st->adis, indio_dev, spi, &adis16400_data);
|
||||
if (ret)
|
||||
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
|
||||
index dbd4f5ad3343..02099afb6c79 100644
|
||||
--- a/drivers/input/mouse/elantech.c
|
||||
+++ b/drivers/input/mouse/elantech.c
|
||||
@@ -1241,10 +1241,11 @@ static bool elantech_is_signature_valid(const unsigned char *param)
|
||||
return true;
|
||||
|
||||
/*
|
||||
- * Some models have a revision higher then 20. Meaning param[2] may
|
||||
- * be 10 or 20, skip the rates check for these.
|
||||
+ * Some hw_version >= 4 models have a revision higher then 20. Meaning
|
||||
+ * that param[2] may be 10 or 20, skip the rates check for these.
|
||||
*/
|
||||
- if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40)
|
||||
+ if ((param[0] & 0x0f) >= 0x06 && (param[1] & 0xaf) == 0x0f &&
|
||||
+ param[2] < 40)
|
||||
return true;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(rates); i++)
|
||||
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
|
||||
index 7490b6c866e6..d2907a6e3dab 100644
|
||||
--- a/drivers/net/phy/dp83640.c
|
||||
+++ b/drivers/net/phy/dp83640.c
|
||||
@@ -45,7 +45,7 @@
|
||||
#define PSF_TX 0x1000
|
||||
#define EXT_EVENT 1
|
||||
#define CAL_EVENT 7
|
||||
-#define CAL_TRIGGER 7
|
||||
+#define CAL_TRIGGER 1
|
||||
#define PER_TRIGGER 6
|
||||
|
||||
#define MII_DP83640_MICR 0x11
|
||||
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
|
||||
index 427e48a80efa..299d35552a3e 100644
|
||||
--- a/drivers/net/phy/phy.c
|
||||
+++ b/drivers/net/phy/phy.c
|
||||
@@ -1022,12 +1022,14 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
|
||||
|
||||
/* According to 802.3az,the EEE is supported only in full duplex-mode.
|
||||
* Also EEE feature is active when core is operating with MII, GMII
|
||||
- * or RGMII.
|
||||
+ * or RGMII (all kinds). Internal PHYs are also allowed to proceed and
|
||||
+ * should return an error if they do not support EEE.
|
||||
*/
|
||||
if ((phydev->duplex == DUPLEX_FULL) &&
|
||||
((phydev->interface == PHY_INTERFACE_MODE_MII) ||
|
||||
(phydev->interface == PHY_INTERFACE_MODE_GMII) ||
|
||||
- (phydev->interface == PHY_INTERFACE_MODE_RGMII))) {
|
||||
+ (phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
|
||||
+ phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID))) {
|
||||
int eee_lp, eee_cap, eee_adv;
|
||||
u32 lp, cap, adv;
|
||||
int status;
|
||||
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
|
||||
index 8a9e8750703f..e0cf18c6cf11 100644
|
||||
--- a/drivers/net/xen-netback/xenbus.c
|
||||
+++ b/drivers/net/xen-netback/xenbus.c
|
||||
@@ -33,6 +33,8 @@ struct backend_info {
|
||||
enum xenbus_state frontend_state;
|
||||
struct xenbus_watch hotplug_status_watch;
|
||||
u8 have_hotplug_status_watch:1;
|
||||
+
|
||||
+ const char *hotplug_script;
|
||||
};
|
||||
|
||||
static int connect_rings(struct backend_info *);
|
||||
@@ -55,6 +57,7 @@ static int netback_remove(struct xenbus_device *dev)
|
||||
xenvif_free(be->vif);
|
||||
be->vif = NULL;
|
||||
}
|
||||
+ kfree(be->hotplug_script);
|
||||
kfree(be);
|
||||
dev_set_drvdata(&dev->dev, NULL);
|
||||
return 0;
|
||||
@@ -72,6 +75,7 @@ static int netback_probe(struct xenbus_device *dev,
|
||||
struct xenbus_transaction xbt;
|
||||
int err;
|
||||
int sg;
|
||||
+ const char *script;
|
||||
struct backend_info *be = kzalloc(sizeof(struct backend_info),
|
||||
GFP_KERNEL);
|
||||
if (!be) {
|
||||
@@ -132,6 +136,15 @@ static int netback_probe(struct xenbus_device *dev,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ script = xenbus_read(XBT_NIL, dev->nodename, "script", NULL);
|
||||
+ if (IS_ERR(script)) {
|
||||
+ err = PTR_ERR(script);
|
||||
+ xenbus_dev_fatal(dev, err, "reading script");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ be->hotplug_script = script;
|
||||
+
|
||||
err = xenbus_switch_state(dev, XenbusStateInitWait);
|
||||
if (err)
|
||||
goto fail;
|
||||
@@ -162,22 +175,14 @@ static int netback_uevent(struct xenbus_device *xdev,
|
||||
struct kobj_uevent_env *env)
|
||||
{
|
||||
struct backend_info *be = dev_get_drvdata(&xdev->dev);
|
||||
- char *val;
|
||||
|
||||
- val = xenbus_read(XBT_NIL, xdev->nodename, "script", NULL);
|
||||
- if (IS_ERR(val)) {
|
||||
- int err = PTR_ERR(val);
|
||||
- xenbus_dev_fatal(xdev, err, "reading script");
|
||||
- return err;
|
||||
- } else {
|
||||
- if (add_uevent_var(env, "script=%s", val)) {
|
||||
- kfree(val);
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
- kfree(val);
|
||||
- }
|
||||
+ if (!be)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (add_uevent_var(env, "script=%s", be->hotplug_script))
|
||||
+ return -ENOMEM;
|
||||
|
||||
- if (!be || !be->vif)
|
||||
+ if (!be->vif)
|
||||
return 0;
|
||||
|
||||
return add_uevent_var(env, "vif=%s", be->vif->dev->name);
|
||||
diff --git a/drivers/staging/ozwpan/ozusbsvc1.c b/drivers/staging/ozwpan/ozusbsvc1.c
|
||||
index 4e4b650fee3f..d4f55b08ef78 100644
|
||||
--- a/drivers/staging/ozwpan/ozusbsvc1.c
|
||||
+++ b/drivers/staging/ozwpan/ozusbsvc1.c
|
||||
@@ -314,7 +314,11 @@ static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx,
|
||||
struct oz_multiple_fixed *body =
|
||||
(struct oz_multiple_fixed *)data_hdr;
|
||||
u8 *data = body->data;
|
||||
- int n = (len - sizeof(struct oz_multiple_fixed)+1)
|
||||
+ unsigned int n;
|
||||
+ if (!body->unit_size ||
|
||||
+ len < sizeof(struct oz_multiple_fixed) - 1)
|
||||
+ break;
|
||||
+ n = (len - (sizeof(struct oz_multiple_fixed) - 1))
|
||||
/ body->unit_size;
|
||||
while (n--) {
|
||||
oz_hcd_data_ind(usb_ctx->hport, body->endpoint,
|
||||
@@ -376,10 +380,15 @@ void oz_usb_rx(struct oz_pd *pd, struct oz_elt *elt)
|
||||
case OZ_GET_DESC_RSP: {
|
||||
struct oz_get_desc_rsp *body =
|
||||
(struct oz_get_desc_rsp *)usb_hdr;
|
||||
- int data_len = elt->length -
|
||||
- sizeof(struct oz_get_desc_rsp) + 1;
|
||||
- u16 offs = le16_to_cpu(get_unaligned(&body->offset));
|
||||
- u16 total_size =
|
||||
+ u16 offs, total_size;
|
||||
+ u8 data_len;
|
||||
+
|
||||
+ if (elt->length < sizeof(struct oz_get_desc_rsp) - 1)
|
||||
+ break;
|
||||
+ data_len = elt->length -
|
||||
+ (sizeof(struct oz_get_desc_rsp) - 1);
|
||||
+ offs = le16_to_cpu(get_unaligned(&body->offset));
|
||||
+ total_size =
|
||||
le16_to_cpu(get_unaligned(&body->total_size));
|
||||
oz_trace("USB_REQ_GET_DESCRIPTOR - cnf\n");
|
||||
oz_hcd_get_desc_cnf(usb_ctx->hport, body->req_id,
|
||||
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
|
||||
index 691a82105180..ab1c5e8ac27f 100644
|
||||
--- a/drivers/usb/serial/cp210x.c
|
||||
+++ b/drivers/usb/serial/cp210x.c
|
||||
@@ -128,6 +128,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
|
||||
{ USB_DEVICE(0x10C4, 0x8977) }, /* CEL MeshWorks DevKit Device */
|
||||
{ USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
|
||||
+ { USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
|
||||
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
|
||||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
|
||||
index 4d918d5f945a..b55e5f3a311d 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio.c
|
||||
+++ b/drivers/usb/serial/ftdi_sio.c
|
||||
@@ -715,6 +715,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_AWINDA_DONGLE_PID) },
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_AWINDA_STATION_PID) },
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) },
|
||||
+ { USB_DEVICE(XSENS_VID, XSENS_MTDEVBOARD_PID) },
|
||||
{ USB_DEVICE(XSENS_VID, XSENS_MTW_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_OMNI1509) },
|
||||
{ USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
|
||||
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
index e906b6aa2424..99316d7cfc03 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio_ids.h
|
||||
+++ b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
@@ -155,6 +155,7 @@
|
||||
#define XSENS_AWINDA_STATION_PID 0x0101
|
||||
#define XSENS_AWINDA_DONGLE_PID 0x0102
|
||||
#define XSENS_MTW_PID 0x0200 /* Xsens MTw */
|
||||
+#define XSENS_MTDEVBOARD_PID 0x0300 /* Motion Tracker Development Board */
|
||||
#define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */
|
||||
|
||||
/* Xsens devices using FTDI VID */
|
||||
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
|
||||
index 84ceff6abbc1..be7e31a933e5 100644
|
||||
--- a/fs/btrfs/extent_io.c
|
||||
+++ b/fs/btrfs/extent_io.c
|
||||
@@ -4080,8 +4080,11 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
}
|
||||
ret = fiemap_fill_next_extent(fieinfo, em_start, disko,
|
||||
em_len, flags);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ if (ret == 1)
|
||||
+ ret = 0;
|
||||
goto out_free;
|
||||
+ }
|
||||
}
|
||||
out_free:
|
||||
free_extent_map(em);
|
||||
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
|
||||
index f0857e092a3c..68891ff7e5d4 100644
|
||||
--- a/fs/btrfs/super.c
|
||||
+++ b/fs/btrfs/super.c
|
||||
@@ -779,6 +779,15 @@ find_root:
|
||||
if (btrfs_root_refs(&new_root->root_item) == 0)
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
||||
+ if (!(sb->s_flags & MS_RDONLY)) {
|
||||
+ int ret;
|
||||
+ down_read(&fs_info->cleanup_work_sem);
|
||||
+ ret = btrfs_orphan_cleanup(new_root);
|
||||
+ up_read(&fs_info->cleanup_work_sem);
|
||||
+ if (ret)
|
||||
+ return ERR_PTR(ret);
|
||||
+ }
|
||||
+
|
||||
dir_id = btrfs_root_dirid(&new_root->root_item);
|
||||
setup_root:
|
||||
location.objectid = dir_id;
|
||||
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
|
||||
index a5457d577b98..6ad2e2d320fe 100644
|
||||
--- a/kernel/trace/ring_buffer_benchmark.c
|
||||
+++ b/kernel/trace/ring_buffer_benchmark.c
|
||||
@@ -455,7 +455,7 @@ static int __init ring_buffer_benchmark_init(void)
|
||||
|
||||
if (producer_fifo >= 0) {
|
||||
struct sched_param param = {
|
||||
- .sched_priority = consumer_fifo
|
||||
+ .sched_priority = producer_fifo
|
||||
};
|
||||
sched_setscheduler(producer, SCHED_FIFO, ¶m);
|
||||
} else
|
||||
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
|
||||
index 2298237db142..d85d3a0e06ce 100644
|
||||
--- a/mm/memory_hotplug.c
|
||||
+++ b/mm/memory_hotplug.c
|
||||
@@ -1803,8 +1803,10 @@ void try_offline_node(int nid)
|
||||
* wait_table may be allocated from boot memory,
|
||||
* here only free if it's allocated by vmalloc.
|
||||
*/
|
||||
- if (is_vmalloc_addr(zone->wait_table))
|
||||
+ if (is_vmalloc_addr(zone->wait_table)) {
|
||||
vfree(zone->wait_table);
|
||||
+ zone->wait_table = NULL;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(try_offline_node);
|
||||
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
|
||||
index 81de0106528b..49b4a82d3f86 100644
|
||||
--- a/net/bridge/br_multicast.c
|
||||
+++ b/net/bridge/br_multicast.c
|
||||
@@ -1007,7 +1007,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br,
|
||||
|
||||
err = br_ip6_multicast_add_group(br, port, &grec->grec_mca,
|
||||
vid);
|
||||
- if (!err)
|
||||
+ if (err)
|
||||
break;
|
||||
}
|
||||
|
||||
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
|
||||
index 526bf56f4d31..afeb8e07ee41 100644
|
||||
--- a/net/caif/caif_socket.c
|
||||
+++ b/net/caif/caif_socket.c
|
||||
@@ -332,6 +332,10 @@ static long caif_stream_data_wait(struct sock *sk, long timeo)
|
||||
release_sock(sk);
|
||||
timeo = schedule_timeout(timeo);
|
||||
lock_sock(sk);
|
||||
+
|
||||
+ if (sock_flag(sk, SOCK_DEAD))
|
||||
+ break;
|
||||
+
|
||||
clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
|
||||
}
|
||||
|
||||
@@ -376,6 +380,10 @@ static int caif_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
|
||||
struct sk_buff *skb;
|
||||
|
||||
lock_sock(sk);
|
||||
+ if (sock_flag(sk, SOCK_DEAD)) {
|
||||
+ err = -ECONNRESET;
|
||||
+ goto unlock;
|
||||
+ }
|
||||
skb = skb_dequeue(&sk->sk_receive_queue);
|
||||
caif_check_flow_release(sk);
|
||||
|
||||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
|
||||
index e23c5f64286b..222e1b6141d3 100644
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -871,6 +871,10 @@ static int ip_error(struct sk_buff *skb)
|
||||
bool send;
|
||||
int code;
|
||||
|
||||
+ /* IP on this device is disabled. */
|
||||
+ if (!in_dev)
|
||||
+ goto out;
|
||||
+
|
||||
net = dev_net(rt->dst.dev);
|
||||
if (!IN_DEV_FORWARD(in_dev)) {
|
||||
switch (rt->dst.error) {
|
||||
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
|
||||
index c3075b552248..63b536bbf0b0 100644
|
||||
--- a/net/ipv4/udp.c
|
||||
+++ b/net/ipv4/udp.c
|
||||
@@ -1293,10 +1293,8 @@ csum_copy_err:
|
||||
}
|
||||
unlock_sock_fast(sk, slow);
|
||||
|
||||
- if (noblock)
|
||||
- return -EAGAIN;
|
||||
-
|
||||
- /* starting over for a new packet */
|
||||
+ /* starting over for a new packet, but check if we need to yield */
|
||||
+ cond_resched();
|
||||
msg->msg_flags &= ~MSG_TRUNC;
|
||||
goto try_again;
|
||||
}
|
||||
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
|
||||
index 6b298dc614e3..7e3901893413 100644
|
||||
--- a/net/ipv6/udp.c
|
||||
+++ b/net/ipv6/udp.c
|
||||
@@ -494,10 +494,8 @@ csum_copy_err:
|
||||
}
|
||||
unlock_sock_fast(sk, slow);
|
||||
|
||||
- if (noblock)
|
||||
- return -EAGAIN;
|
||||
-
|
||||
- /* starting over for a new packet */
|
||||
+ /* starting over for a new packet, but check if we need to yield */
|
||||
+ cond_resched();
|
||||
msg->msg_flags &= ~MSG_TRUNC;
|
||||
goto try_again;
|
||||
}
|
||||
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
|
||||
index 2d2f07945c85..e87b27c7bffd 100644
|
||||
--- a/net/sched/sch_api.c
|
||||
+++ b/net/sched/sch_api.c
|
||||
@@ -752,10 +752,8 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
|
||||
if (dev->flags & IFF_UP)
|
||||
dev_deactivate(dev);
|
||||
|
||||
- if (new && new->ops->attach) {
|
||||
- new->ops->attach(new);
|
||||
- num_q = 0;
|
||||
- }
|
||||
+ if (new && new->ops->attach)
|
||||
+ goto skip;
|
||||
|
||||
for (i = 0; i < num_q; i++) {
|
||||
struct netdev_queue *dev_queue = dev_ingress_queue(dev);
|
||||
@@ -771,12 +769,16 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
|
||||
qdisc_destroy(old);
|
||||
}
|
||||
|
||||
+skip:
|
||||
if (!ingress) {
|
||||
notify_and_destroy(net, skb, n, classid,
|
||||
dev->qdisc, new);
|
||||
if (new && !new->ops->attach)
|
||||
atomic_inc(&new->refcnt);
|
||||
dev->qdisc = new ? : &noop_qdisc;
|
||||
+
|
||||
+ if (new && new->ops->attach)
|
||||
+ new->ops->attach(new);
|
||||
} else {
|
||||
notify_and_destroy(net, skb, n, classid, old, new);
|
||||
}
|
||||
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
|
||||
index 75e198d029d2..123c16419cbe 100644
|
||||
--- a/net/unix/af_unix.c
|
||||
+++ b/net/unix/af_unix.c
|
||||
@@ -1898,6 +1898,10 @@ static long unix_stream_data_wait(struct sock *sk, long timeo,
|
||||
unix_state_unlock(sk);
|
||||
timeo = schedule_timeout(timeo);
|
||||
unix_state_lock(sk);
|
||||
+
|
||||
+ if (sock_flag(sk, SOCK_DEAD))
|
||||
+ break;
|
||||
+
|
||||
clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
|
||||
}
|
||||
|
||||
@@ -1957,6 +1961,10 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
|
||||
struct sk_buff *skb, *last;
|
||||
|
||||
unix_state_lock(sk);
|
||||
+ if (sock_flag(sk, SOCK_DEAD)) {
|
||||
+ err = -ECONNRESET;
|
||||
+ goto unlock;
|
||||
+ }
|
||||
last = skb = skb_peek(&sk->sk_receive_queue);
|
||||
again:
|
||||
if (skb == NULL) {
|
||||
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
|
||||
index d997d0f0c54a..18a7a7b112ef 100644
|
||||
--- a/net/wireless/wext-compat.c
|
||||
+++ b/net/wireless/wext-compat.c
|
||||
@@ -1345,6 +1345,8 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
|
||||
memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN);
|
||||
wdev_unlock(wdev);
|
||||
|
||||
+ memset(&sinfo, 0, sizeof(sinfo));
|
||||
+
|
||||
if (rdev_get_station(rdev, dev, bssid, &sinfo))
|
||||
return NULL;
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 444019696f85..ca2094c914a1 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -2148,6 +2148,7 @@ static const struct hda_fixup alc882_fixups[] = {
|
||||
static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD),
|
||||
SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
|
||||
+ SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
|
||||
SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD),
|
||||
SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
|
||||
SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD),
|
||||
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
|
||||
index 061be0e5fa5a..5ea5a18f3f58 100644
|
||||
--- a/sound/usb/mixer.c
|
||||
+++ b/sound/usb/mixer.c
|
||||
@@ -891,6 +891,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
|
||||
case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
|
||||
case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
|
||||
case USB_ID(0x046d, 0x0826): /* HD Webcam c525 */
|
||||
+ case USB_ID(0x046d, 0x08ca): /* Logitech Quickcam Fusion */
|
||||
case USB_ID(0x046d, 0x0991):
|
||||
/* Most audio usb devices lie about volume resolution.
|
||||
* Most Logitech webcams have res = 384.
|
||||
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
|
||||
index 4df31b0f94a3..d06fbd9f7cbe 100644
|
||||
--- a/sound/usb/mixer_maps.c
|
||||
+++ b/sound/usb/mixer_maps.c
|
||||
@@ -418,6 +418,11 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
|
||||
.map = ebox44_map,
|
||||
},
|
||||
{
|
||||
+ /* MAYA44 USB+ */
|
||||
+ .id = USB_ID(0x2573, 0x0008),
|
||||
+ .map = maya44_map,
|
||||
+ },
|
||||
+ {
|
||||
/* KEF X300A */
|
||||
.id = USB_ID(0x27ac, 0x1000),
|
||||
.map = scms_usb3318_map,
|
||||
@ -1,263 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6d19e37d36d5..5e3e665a10b7 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 81
|
||||
+SUBLEVEL = 82
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c
|
||||
index d1939a9539c0..04aefffb4dd9 100644
|
||||
--- a/drivers/crypto/caam/caamrng.c
|
||||
+++ b/drivers/crypto/caam/caamrng.c
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/* Buffer, its dma address and lock */
|
||||
struct buf_data {
|
||||
- u8 buf[RN_BUF_SIZE];
|
||||
+ u8 buf[RN_BUF_SIZE] ____cacheline_aligned;
|
||||
dma_addr_t addr;
|
||||
struct completion filled;
|
||||
u32 hw_desc[DESC_JOB_O_LEN];
|
||||
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
|
||||
index f6341e8622ee..7bd2acce9f81 100644
|
||||
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
|
||||
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
|
||||
@@ -1487,6 +1487,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
|
||||
return MODE_BANDWIDTH;
|
||||
}
|
||||
|
||||
+ if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 ||
|
||||
+ (mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) {
|
||||
+ return MODE_H_ILLEGAL;
|
||||
+ }
|
||||
+
|
||||
if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 ||
|
||||
mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 ||
|
||||
mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 ||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index 572579f87de4..90861416b9e9 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -263,6 +263,16 @@ lpfc_sli4_eq_get(struct lpfc_queue *q)
|
||||
return NULL;
|
||||
|
||||
q->hba_index = idx;
|
||||
+
|
||||
+ /*
|
||||
+ * insert barrier for instruction interlock : data from the hardware
|
||||
+ * must have the valid bit checked before it can be copied and acted
|
||||
+ * upon. Given what was seen in lpfc_sli4_cq_get() of speculative
|
||||
+ * instructions allowing action on content before valid bit checked,
|
||||
+ * add barrier here as well. May not be needed as "content" is a
|
||||
+ * single 32-bit entity here (vs multi word structure for cq's).
|
||||
+ */
|
||||
+ mb();
|
||||
return eqe;
|
||||
}
|
||||
|
||||
@@ -368,6 +378,17 @@ lpfc_sli4_cq_get(struct lpfc_queue *q)
|
||||
|
||||
cqe = q->qe[q->hba_index].cqe;
|
||||
q->hba_index = idx;
|
||||
+
|
||||
+ /*
|
||||
+ * insert barrier for instruction interlock : data from the hardware
|
||||
+ * must have the valid bit checked before it can be copied and acted
|
||||
+ * upon. Speculative instructions were allowing a bcopy at the start
|
||||
+ * of lpfc_sli4_fp_handle_wcqe(), which is called immediately
|
||||
+ * after our return, to copy data before the valid bit check above
|
||||
+ * was done. As such, some of the copied data was stale. The barrier
|
||||
+ * ensures the check is before any data is copied.
|
||||
+ */
|
||||
+ mb();
|
||||
return cqe;
|
||||
}
|
||||
|
||||
diff --git a/fs/pipe.c b/fs/pipe.c
|
||||
index 0e0752ef2715..3e7ab278bb0c 100644
|
||||
--- a/fs/pipe.c
|
||||
+++ b/fs/pipe.c
|
||||
@@ -117,25 +117,27 @@ void pipe_wait(struct pipe_inode_info *pipe)
|
||||
}
|
||||
|
||||
static int
|
||||
-pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len,
|
||||
- int atomic)
|
||||
+pipe_iov_copy_from_user(void *addr, int *offset, struct iovec *iov,
|
||||
+ size_t *remaining, int atomic)
|
||||
{
|
||||
unsigned long copy;
|
||||
|
||||
- while (len > 0) {
|
||||
+ while (*remaining > 0) {
|
||||
while (!iov->iov_len)
|
||||
iov++;
|
||||
- copy = min_t(unsigned long, len, iov->iov_len);
|
||||
+ copy = min_t(unsigned long, *remaining, iov->iov_len);
|
||||
|
||||
if (atomic) {
|
||||
- if (__copy_from_user_inatomic(to, iov->iov_base, copy))
|
||||
+ if (__copy_from_user_inatomic(addr + *offset,
|
||||
+ iov->iov_base, copy))
|
||||
return -EFAULT;
|
||||
} else {
|
||||
- if (copy_from_user(to, iov->iov_base, copy))
|
||||
+ if (copy_from_user(addr + *offset,
|
||||
+ iov->iov_base, copy))
|
||||
return -EFAULT;
|
||||
}
|
||||
- to += copy;
|
||||
- len -= copy;
|
||||
+ *offset += copy;
|
||||
+ *remaining -= copy;
|
||||
iov->iov_base += copy;
|
||||
iov->iov_len -= copy;
|
||||
}
|
||||
@@ -143,25 +145,27 @@ pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len,
|
||||
}
|
||||
|
||||
static int
|
||||
-pipe_iov_copy_to_user(struct iovec *iov, const void *from, unsigned long len,
|
||||
- int atomic)
|
||||
+pipe_iov_copy_to_user(struct iovec *iov, void *addr, int *offset,
|
||||
+ size_t *remaining, int atomic)
|
||||
{
|
||||
unsigned long copy;
|
||||
|
||||
- while (len > 0) {
|
||||
+ while (*remaining > 0) {
|
||||
while (!iov->iov_len)
|
||||
iov++;
|
||||
- copy = min_t(unsigned long, len, iov->iov_len);
|
||||
+ copy = min_t(unsigned long, *remaining, iov->iov_len);
|
||||
|
||||
if (atomic) {
|
||||
- if (__copy_to_user_inatomic(iov->iov_base, from, copy))
|
||||
+ if (__copy_to_user_inatomic(iov->iov_base,
|
||||
+ addr + *offset, copy))
|
||||
return -EFAULT;
|
||||
} else {
|
||||
- if (copy_to_user(iov->iov_base, from, copy))
|
||||
+ if (copy_to_user(iov->iov_base,
|
||||
+ addr + *offset, copy))
|
||||
return -EFAULT;
|
||||
}
|
||||
- from += copy;
|
||||
- len -= copy;
|
||||
+ *offset += copy;
|
||||
+ *remaining -= copy;
|
||||
iov->iov_base += copy;
|
||||
iov->iov_len -= copy;
|
||||
}
|
||||
@@ -395,7 +399,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
|
||||
struct pipe_buffer *buf = pipe->bufs + curbuf;
|
||||
const struct pipe_buf_operations *ops = buf->ops;
|
||||
void *addr;
|
||||
- size_t chars = buf->len;
|
||||
+ size_t chars = buf->len, remaining;
|
||||
int error, atomic;
|
||||
|
||||
if (chars > total_len)
|
||||
@@ -409,9 +413,11 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
|
||||
}
|
||||
|
||||
atomic = !iov_fault_in_pages_write(iov, chars);
|
||||
+ remaining = chars;
|
||||
redo:
|
||||
addr = ops->map(pipe, buf, atomic);
|
||||
- error = pipe_iov_copy_to_user(iov, addr + buf->offset, chars, atomic);
|
||||
+ error = pipe_iov_copy_to_user(iov, addr, &buf->offset,
|
||||
+ &remaining, atomic);
|
||||
ops->unmap(pipe, buf, addr);
|
||||
if (unlikely(error)) {
|
||||
/*
|
||||
@@ -426,7 +432,6 @@ redo:
|
||||
break;
|
||||
}
|
||||
ret += chars;
|
||||
- buf->offset += chars;
|
||||
buf->len -= chars;
|
||||
|
||||
/* Was it a packet buffer? Clean up and exit */
|
||||
@@ -531,6 +536,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
|
||||
if (ops->can_merge && offset + chars <= PAGE_SIZE) {
|
||||
int error, atomic = 1;
|
||||
void *addr;
|
||||
+ size_t remaining = chars;
|
||||
|
||||
error = ops->confirm(pipe, buf);
|
||||
if (error)
|
||||
@@ -539,8 +545,8 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
|
||||
iov_fault_in_pages_read(iov, chars);
|
||||
redo1:
|
||||
addr = ops->map(pipe, buf, atomic);
|
||||
- error = pipe_iov_copy_from_user(offset + addr, iov,
|
||||
- chars, atomic);
|
||||
+ error = pipe_iov_copy_from_user(addr, &offset, iov,
|
||||
+ &remaining, atomic);
|
||||
ops->unmap(pipe, buf, addr);
|
||||
ret = error;
|
||||
do_wakeup = 1;
|
||||
@@ -575,6 +581,8 @@ redo1:
|
||||
struct page *page = pipe->tmp_page;
|
||||
char *src;
|
||||
int error, atomic = 1;
|
||||
+ int offset = 0;
|
||||
+ size_t remaining;
|
||||
|
||||
if (!page) {
|
||||
page = alloc_page(GFP_HIGHUSER);
|
||||
@@ -595,14 +603,15 @@ redo1:
|
||||
chars = total_len;
|
||||
|
||||
iov_fault_in_pages_read(iov, chars);
|
||||
+ remaining = chars;
|
||||
redo2:
|
||||
if (atomic)
|
||||
src = kmap_atomic(page);
|
||||
else
|
||||
src = kmap(page);
|
||||
|
||||
- error = pipe_iov_copy_from_user(src, iov, chars,
|
||||
- atomic);
|
||||
+ error = pipe_iov_copy_from_user(src, &offset, iov,
|
||||
+ &remaining, atomic);
|
||||
if (atomic)
|
||||
kunmap_atomic(src);
|
||||
else
|
||||
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
|
||||
index 0a1edc694d67..fe3e086d38e9 100644
|
||||
--- a/kernel/trace/trace_events_filter.c
|
||||
+++ b/kernel/trace/trace_events_filter.c
|
||||
@@ -1328,19 +1328,24 @@ static int check_preds(struct filter_parse_state *ps)
|
||||
{
|
||||
int n_normal_preds = 0, n_logical_preds = 0;
|
||||
struct postfix_elt *elt;
|
||||
+ int cnt = 0;
|
||||
|
||||
list_for_each_entry(elt, &ps->postfix, list) {
|
||||
- if (elt->op == OP_NONE)
|
||||
+ if (elt->op == OP_NONE) {
|
||||
+ cnt++;
|
||||
continue;
|
||||
+ }
|
||||
|
||||
+ cnt--;
|
||||
if (elt->op == OP_AND || elt->op == OP_OR) {
|
||||
n_logical_preds++;
|
||||
continue;
|
||||
}
|
||||
n_normal_preds++;
|
||||
+ WARN_ON_ONCE(cnt < 0);
|
||||
}
|
||||
|
||||
- if (!n_normal_preds || n_logical_preds >= n_normal_preds) {
|
||||
+ if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) {
|
||||
parse_error(ps, FILT_ERR_INVALID_FILTER, 0);
|
||||
return -EINVAL;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,369 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 21529dbcc11d..f7b10bb56737 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 83
|
||||
+SUBLEVEL = 84
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S
|
||||
index 16cd4ba5d7fd..bb117abb1b3b 100644
|
||||
--- a/arch/arm/kvm/interrupts.S
|
||||
+++ b/arch/arm/kvm/interrupts.S
|
||||
@@ -159,13 +159,9 @@ __kvm_vcpu_return:
|
||||
@ Don't trap coprocessor accesses for host kernel
|
||||
set_hstr vmexit
|
||||
set_hdcr vmexit
|
||||
- set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11))
|
||||
+ set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)), after_vfp_restore
|
||||
|
||||
#ifdef CONFIG_VFPv3
|
||||
- @ Save floating point registers we if let guest use them.
|
||||
- tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11))
|
||||
- bne after_vfp_restore
|
||||
-
|
||||
@ Switch VFP/NEON hardware state to the host's
|
||||
add r7, vcpu, #VCPU_VFP_GUEST
|
||||
store_vfp_state r7
|
||||
@@ -177,6 +173,8 @@ after_vfp_restore:
|
||||
@ Restore FPEXC_EN which we clobbered on entry
|
||||
pop {r2}
|
||||
VFPFMXR FPEXC, r2
|
||||
+#else
|
||||
+after_vfp_restore:
|
||||
#endif
|
||||
|
||||
@ Reset Hyp-role
|
||||
@@ -458,7 +456,7 @@ switch_to_guest_vfp:
|
||||
push {r3-r7}
|
||||
|
||||
@ NEON/VFP used. Turn on VFP access.
|
||||
- set_hcptr vmexit, (HCPTR_TCP(10) | HCPTR_TCP(11))
|
||||
+ set_hcptr vmtrap, (HCPTR_TCP(10) | HCPTR_TCP(11))
|
||||
|
||||
@ Switch VFP/NEON hardware state to the guest's
|
||||
add r7, r0, #VCPU_VFP_HOST
|
||||
diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S
|
||||
index 6f18695a09cb..b6f6137f5984 100644
|
||||
--- a/arch/arm/kvm/interrupts_head.S
|
||||
+++ b/arch/arm/kvm/interrupts_head.S
|
||||
@@ -570,8 +570,13 @@ vcpu .req r0 @ vcpu pointer always in r0
|
||||
.endm
|
||||
|
||||
/* Configures the HCPTR (Hyp Coprocessor Trap Register) on entry/return
|
||||
- * (hardware reset value is 0). Keep previous value in r2. */
|
||||
-.macro set_hcptr operation, mask
|
||||
+ * (hardware reset value is 0). Keep previous value in r2.
|
||||
+ * An ISB is emited on vmexit/vmtrap, but executed on vmexit only if
|
||||
+ * VFP wasn't already enabled (always executed on vmtrap).
|
||||
+ * If a label is specified with vmexit, it is branched to if VFP wasn't
|
||||
+ * enabled.
|
||||
+ */
|
||||
+.macro set_hcptr operation, mask, label = none
|
||||
mrc p15, 4, r2, c1, c1, 2
|
||||
ldr r3, =\mask
|
||||
.if \operation == vmentry
|
||||
@@ -580,6 +585,17 @@ vcpu .req r0 @ vcpu pointer always in r0
|
||||
bic r3, r2, r3 @ Don't trap defined coproc-accesses
|
||||
.endif
|
||||
mcr p15, 4, r3, c1, c1, 2
|
||||
+ .if \operation != vmentry
|
||||
+ .if \operation == vmexit
|
||||
+ tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11))
|
||||
+ beq 1f
|
||||
+ .endif
|
||||
+ isb
|
||||
+ .if \label != none
|
||||
+ b \label
|
||||
+ .endif
|
||||
+1:
|
||||
+ .endif
|
||||
.endm
|
||||
|
||||
/* Configures the HDCR (Hyp Debug Configuration Register) on entry/return
|
||||
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
|
||||
index 5b2f2e68e57f..503eb6ca5802 100644
|
||||
--- a/arch/mips/include/asm/mach-generic/spaces.h
|
||||
+++ b/arch/mips/include/asm/mach-generic/spaces.h
|
||||
@@ -90,7 +90,11 @@
|
||||
#endif
|
||||
|
||||
#ifndef FIXADDR_TOP
|
||||
+#ifdef CONFIG_KVM_GUEST
|
||||
+#define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000)
|
||||
+#else
|
||||
#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#endif /* __ASM_MACH_GENERIC_SPACES_H */
|
||||
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
|
||||
index 846861a20b07..b63dc809596d 100644
|
||||
--- a/arch/powerpc/perf/core-book3s.c
|
||||
+++ b/arch/powerpc/perf/core-book3s.c
|
||||
@@ -112,7 +112,16 @@ static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {}
|
||||
|
||||
static bool regs_use_siar(struct pt_regs *regs)
|
||||
{
|
||||
- return !!regs->result;
|
||||
+ /*
|
||||
+ * When we take a performance monitor exception the regs are setup
|
||||
+ * using perf_read_regs() which overloads some fields, in particular
|
||||
+ * regs->result to tell us whether to use SIAR.
|
||||
+ *
|
||||
+ * However if the regs are from another exception, eg. a syscall, then
|
||||
+ * they have not been setup using perf_read_regs() and so regs->result
|
||||
+ * is something random.
|
||||
+ */
|
||||
+ return ((TRAP(regs) == 0xf00) && regs->result);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
|
||||
index fa4c900a0d1f..62983d77455e 100644
|
||||
--- a/arch/sparc/kernel/ldc.c
|
||||
+++ b/arch/sparc/kernel/ldc.c
|
||||
@@ -2306,7 +2306,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
|
||||
if (len & (8UL - 1))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
- buf = kzalloc(len, GFP_KERNEL);
|
||||
+ buf = kzalloc(len, GFP_ATOMIC);
|
||||
if (!buf)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
|
||||
index 4c481e751e8e..98b68c2f1a1c 100644
|
||||
--- a/arch/x86/include/asm/kvm_host.h
|
||||
+++ b/arch/x86/include/asm/kvm_host.h
|
||||
@@ -541,7 +541,7 @@ struct kvm_arch {
|
||||
struct kvm_pic *vpic;
|
||||
struct kvm_ioapic *vioapic;
|
||||
struct kvm_pit *vpit;
|
||||
- int vapics_in_nmi_mode;
|
||||
+ atomic_t vapics_in_nmi_mode;
|
||||
struct mutex apic_map_lock;
|
||||
struct kvm_apic_map *apic_map;
|
||||
|
||||
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
|
||||
index 298781d4cfb4..1406ffde3e35 100644
|
||||
--- a/arch/x86/kvm/i8254.c
|
||||
+++ b/arch/x86/kvm/i8254.c
|
||||
@@ -305,7 +305,7 @@ static void pit_do_work(struct kthread_work *work)
|
||||
* LVT0 to NMI delivery. Other PIC interrupts are just sent to
|
||||
* VCPU0, and only if its LVT0 is in EXTINT mode.
|
||||
*/
|
||||
- if (kvm->arch.vapics_in_nmi_mode > 0)
|
||||
+ if (atomic_read(&kvm->arch.vapics_in_nmi_mode) > 0)
|
||||
kvm_for_each_vcpu(i, vcpu, kvm)
|
||||
kvm_apic_nmi_wd_deliver(vcpu);
|
||||
}
|
||||
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
|
||||
index 681e4e251f00..ff280209d7de 100644
|
||||
--- a/arch/x86/kvm/lapic.c
|
||||
+++ b/arch/x86/kvm/lapic.c
|
||||
@@ -1123,10 +1123,10 @@ static void apic_manage_nmi_watchdog(struct kvm_lapic *apic, u32 lvt0_val)
|
||||
if (!nmi_wd_enabled) {
|
||||
apic_debug("Receive NMI setting on APIC_LVT0 "
|
||||
"for cpu %d\n", apic->vcpu->vcpu_id);
|
||||
- apic->vcpu->kvm->arch.vapics_in_nmi_mode++;
|
||||
+ atomic_inc(&apic->vcpu->kvm->arch.vapics_in_nmi_mode);
|
||||
}
|
||||
} else if (nmi_wd_enabled)
|
||||
- apic->vcpu->kvm->arch.vapics_in_nmi_mode--;
|
||||
+ atomic_dec(&apic->vcpu->kvm->arch.vapics_in_nmi_mode);
|
||||
}
|
||||
|
||||
static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
|
||||
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
|
||||
index 3e724256dbee..a3b0265c2ca7 100644
|
||||
--- a/arch/x86/pci/acpi.c
|
||||
+++ b/arch/x86/pci/acpi.c
|
||||
@@ -84,6 +84,17 @@ static const struct dmi_system_id pci_crs_quirks[] __initconst = {
|
||||
DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
|
||||
},
|
||||
},
|
||||
+ /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368 */
|
||||
+ /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299 */
|
||||
+ {
|
||||
+ .callback = set_use_crs,
|
||||
+ .ident = "Foxconn K8M890-8237A",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BOARD_VENDOR, "Foxconn"),
|
||||
+ DMI_MATCH(DMI_BOARD_NAME, "K8M890-8237A"),
|
||||
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
|
||||
+ },
|
||||
+ },
|
||||
|
||||
/* Now for the blacklist.. */
|
||||
|
||||
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
|
||||
index 5b2b5e61e4f9..057d894eee66 100644
|
||||
--- a/drivers/crypto/talitos.c
|
||||
+++ b/drivers/crypto/talitos.c
|
||||
@@ -935,7 +935,8 @@ static int sg_to_link_tbl(struct scatterlist *sg, int sg_count,
|
||||
sg_count--;
|
||||
link_tbl_ptr--;
|
||||
}
|
||||
- be16_add_cpu(&link_tbl_ptr->len, cryptlen);
|
||||
+ link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len)
|
||||
+ + cryptlen);
|
||||
|
||||
/* tag end of link table */
|
||||
link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN;
|
||||
@@ -2621,6 +2622,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
|
||||
break;
|
||||
default:
|
||||
dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type);
|
||||
+ kfree(t_alg);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
diff --git a/fs/inode.c b/fs/inode.c
|
||||
index 1b300a06b8be..17f95b417955 100644
|
||||
--- a/fs/inode.c
|
||||
+++ b/fs/inode.c
|
||||
@@ -1628,8 +1628,8 @@ int file_remove_suid(struct file *file)
|
||||
error = security_inode_killpriv(dentry);
|
||||
if (!error && killsuid)
|
||||
error = __remove_suid(dentry, killsuid);
|
||||
- if (!error && (inode->i_sb->s_flags & MS_NOSEC))
|
||||
- inode->i_flags |= S_NOSEC;
|
||||
+ if (!error)
|
||||
+ inode_has_no_xattr(inode);
|
||||
|
||||
return error;
|
||||
}
|
||||
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
|
||||
index cd8c3a44ab7d..b73eaba85667 100644
|
||||
--- a/net/bridge/br_ioctl.c
|
||||
+++ b/net/bridge/br_ioctl.c
|
||||
@@ -247,9 +247,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- spin_lock_bh(&br->lock);
|
||||
br_stp_set_bridge_priority(br, args[1]);
|
||||
- spin_unlock_bh(&br->lock);
|
||||
return 0;
|
||||
|
||||
case BRCTL_SET_PORT_PRIORITY:
|
||||
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
|
||||
index 49b4a82d3f86..a09ea178348c 100644
|
||||
--- a/net/bridge/br_multicast.c
|
||||
+++ b/net/bridge/br_multicast.c
|
||||
@@ -1026,6 +1026,9 @@ static void br_multicast_add_router(struct net_bridge *br,
|
||||
struct net_bridge_port *p;
|
||||
struct hlist_node *slot = NULL;
|
||||
|
||||
+ if (!hlist_unhashed(&port->rlist))
|
||||
+ return;
|
||||
+
|
||||
hlist_for_each_entry(p, &br->router_list, rlist) {
|
||||
if ((unsigned long) port >= (unsigned long) p)
|
||||
break;
|
||||
@@ -1053,12 +1056,8 @@ static void br_multicast_mark_router(struct net_bridge *br,
|
||||
if (port->multicast_router != 1)
|
||||
return;
|
||||
|
||||
- if (!hlist_unhashed(&port->rlist))
|
||||
- goto timer;
|
||||
-
|
||||
br_multicast_add_router(br, port);
|
||||
|
||||
-timer:
|
||||
mod_timer(&port->multicast_router_timer,
|
||||
now + br->multicast_querier_interval);
|
||||
}
|
||||
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
|
||||
index 656a6f3e40de..886f6d6dc48a 100644
|
||||
--- a/net/bridge/br_stp_if.c
|
||||
+++ b/net/bridge/br_stp_if.c
|
||||
@@ -241,12 +241,13 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br)
|
||||
return true;
|
||||
}
|
||||
|
||||
-/* called under bridge lock */
|
||||
+/* Acquires and releases bridge lock */
|
||||
void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio)
|
||||
{
|
||||
struct net_bridge_port *p;
|
||||
int wasroot;
|
||||
|
||||
+ spin_lock_bh(&br->lock);
|
||||
wasroot = br_is_root_bridge(br);
|
||||
|
||||
list_for_each_entry(p, &br->port_list, list) {
|
||||
@@ -264,6 +265,7 @@ void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio)
|
||||
br_port_state_selection(br);
|
||||
if (br_is_root_bridge(br) && !wasroot)
|
||||
br_become_root_bridge(br);
|
||||
+ spin_unlock_bh(&br->lock);
|
||||
}
|
||||
|
||||
/* called under bridge lock */
|
||||
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
|
||||
index 81b4b816f131..39fa33969b09 100644
|
||||
--- a/net/packet/af_packet.c
|
||||
+++ b/net/packet/af_packet.c
|
||||
@@ -1150,16 +1150,6 @@ static void packet_sock_destruct(struct sock *sk)
|
||||
sk_refcnt_debug_dec(sk);
|
||||
}
|
||||
|
||||
-static int fanout_rr_next(struct packet_fanout *f, unsigned int num)
|
||||
-{
|
||||
- int x = atomic_read(&f->rr_cur) + 1;
|
||||
-
|
||||
- if (x >= num)
|
||||
- x = 0;
|
||||
-
|
||||
- return x;
|
||||
-}
|
||||
-
|
||||
static unsigned int fanout_demux_hash(struct packet_fanout *f,
|
||||
struct sk_buff *skb,
|
||||
unsigned int num)
|
||||
@@ -1171,13 +1161,9 @@ static unsigned int fanout_demux_lb(struct packet_fanout *f,
|
||||
struct sk_buff *skb,
|
||||
unsigned int num)
|
||||
{
|
||||
- int cur, old;
|
||||
+ unsigned int val = atomic_inc_return(&f->rr_cur);
|
||||
|
||||
- cur = atomic_read(&f->rr_cur);
|
||||
- while ((old = atomic_cmpxchg(&f->rr_cur, cur,
|
||||
- fanout_rr_next(f, num))) != cur)
|
||||
- cur = old;
|
||||
- return cur;
|
||||
+ return val % num;
|
||||
}
|
||||
|
||||
static unsigned int fanout_demux_cpu(struct packet_fanout *f,
|
||||
@@ -1217,7 +1203,7 @@ static int packet_rcv_fanout(struct sk_buff *skb, struct net_device *dev,
|
||||
struct packet_type *pt, struct net_device *orig_dev)
|
||||
{
|
||||
struct packet_fanout *f = pt->af_packet_priv;
|
||||
- unsigned int num = f->num_members;
|
||||
+ unsigned int num = ACCESS_ONCE(f->num_members);
|
||||
struct packet_sock *po;
|
||||
unsigned int idx;
|
||||
|
||||
diff --git a/net/sctp/output.c b/net/sctp/output.c
|
||||
index 73b8ca51ba14..2d9689333fe4 100644
|
||||
--- a/net/sctp/output.c
|
||||
+++ b/net/sctp/output.c
|
||||
@@ -618,7 +618,9 @@ out:
|
||||
return err;
|
||||
no_route:
|
||||
kfree_skb(nskb);
|
||||
- IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES);
|
||||
+
|
||||
+ if (asoc)
|
||||
+ IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES);
|
||||
|
||||
/* FIXME: Returning the 'err' will effect all the associations
|
||||
* associated with a socket, although only one of the paths of the
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,578 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 11a7e7bc31f2..25ee724c9089 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 85
|
||||
+SUBLEVEL = 86
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h
|
||||
index 2046a89a57cf..78485493639a 100644
|
||||
--- a/arch/arc/include/asm/ptrace.h
|
||||
+++ b/arch/arc/include/asm/ptrace.h
|
||||
@@ -83,7 +83,7 @@ struct callee_regs {
|
||||
long r13;
|
||||
};
|
||||
|
||||
-#define instruction_pointer(regs) ((regs)->ret)
|
||||
+#define instruction_pointer(regs) (unsigned long)((regs)->ret)
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
|
||||
/* return 1 if user mode or 0 if kernel mode */
|
||||
diff --git a/arch/s390/kernel/sclp.S b/arch/s390/kernel/sclp.S
|
||||
index 29bd7bec4176..1ecd47b5e250 100644
|
||||
--- a/arch/s390/kernel/sclp.S
|
||||
+++ b/arch/s390/kernel/sclp.S
|
||||
@@ -276,6 +276,8 @@ ENTRY(_sclp_print_early)
|
||||
jno .Lesa2
|
||||
ahi %r15,-80
|
||||
stmh %r6,%r15,96(%r15) # store upper register halves
|
||||
+ basr %r13,0
|
||||
+ lmh %r0,%r15,.Lzeroes-.(%r13) # clear upper register halves
|
||||
.Lesa2:
|
||||
#endif
|
||||
lr %r10,%r2 # save string pointer
|
||||
@@ -299,6 +301,8 @@ ENTRY(_sclp_print_early)
|
||||
#endif
|
||||
lm %r6,%r15,120(%r15) # restore registers
|
||||
br %r14
|
||||
+.Lzeroes:
|
||||
+ .fill 64,4,0
|
||||
|
||||
.LwritedataS4:
|
||||
.long 0x00760005 # SCLP command for write data
|
||||
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
|
||||
index 7a5aa1a7864e..5ebe93676201 100644
|
||||
--- a/arch/tile/kernel/setup.c
|
||||
+++ b/arch/tile/kernel/setup.c
|
||||
@@ -1064,7 +1064,7 @@ static void __init load_hv_initrd(void)
|
||||
|
||||
void __init free_initrd_mem(unsigned long begin, unsigned long end)
|
||||
{
|
||||
- free_bootmem(__pa(begin), end - begin);
|
||||
+ free_bootmem_late(__pa(begin), end - begin);
|
||||
}
|
||||
|
||||
#else
|
||||
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
|
||||
index abb988a54c69..3b28eff9b90b 100644
|
||||
--- a/arch/x86/boot/compressed/head_32.S
|
||||
+++ b/arch/x86/boot/compressed/head_32.S
|
||||
@@ -54,7 +54,7 @@ ENTRY(efi_pe_entry)
|
||||
call reloc
|
||||
reloc:
|
||||
popl %ecx
|
||||
- subl reloc, %ecx
|
||||
+ subl $reloc, %ecx
|
||||
movl %ecx, BP_code32_start(%eax)
|
||||
|
||||
sub $0x4, %esp
|
||||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
|
||||
index 1ff8e97f853a..8c4e81ac5e75 100644
|
||||
--- a/block/blk-cgroup.c
|
||||
+++ b/block/blk-cgroup.c
|
||||
@@ -720,8 +720,12 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
|
||||
return -EINVAL;
|
||||
|
||||
disk = get_gendisk(MKDEV(major, minor), &part);
|
||||
- if (!disk || part)
|
||||
+ if (!disk)
|
||||
return -EINVAL;
|
||||
+ if (part) {
|
||||
+ put_disk(disk);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
|
||||
rcu_read_lock();
|
||||
spin_lock_irq(disk->queue->queue_lock);
|
||||
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
|
||||
index 5f87bed05467..20aef5d5a242 100644
|
||||
--- a/drivers/input/touchscreen/usbtouchscreen.c
|
||||
+++ b/drivers/input/touchscreen/usbtouchscreen.c
|
||||
@@ -626,6 +626,9 @@ static int dmc_tsc10_init(struct usbtouch_usb *usbtouch)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
+ /* TSC-25 data sheet specifies a delay after the RESET command */
|
||||
+ msleep(150);
|
||||
+
|
||||
/* set coordinate output rate */
|
||||
buf[0] = buf[1] = 0xFF;
|
||||
ret = usb_control_msg(dev, usb_rcvctrlpipe (dev, 0),
|
||||
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
|
||||
index 86ac4a4ccc01..fa58438b298a 100644
|
||||
--- a/drivers/md/raid1.c
|
||||
+++ b/drivers/md/raid1.c
|
||||
@@ -327,7 +327,7 @@ static void raid1_end_read_request(struct bio *bio, int error)
|
||||
spin_lock_irqsave(&conf->device_lock, flags);
|
||||
if (r1_bio->mddev->degraded == conf->raid_disks ||
|
||||
(r1_bio->mddev->degraded == conf->raid_disks-1 &&
|
||||
- !test_bit(Faulty, &conf->mirrors[mirror].rdev->flags)))
|
||||
+ test_bit(In_sync, &conf->mirrors[mirror].rdev->flags)))
|
||||
uptodate = 1;
|
||||
spin_unlock_irqrestore(&conf->device_lock, flags);
|
||||
}
|
||||
diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci-esdhc.h
|
||||
index d25f9ab9a54d..d33bb9522416 100644
|
||||
--- a/drivers/mmc/host/sdhci-esdhc.h
|
||||
+++ b/drivers/mmc/host/sdhci-esdhc.h
|
||||
@@ -40,7 +40,7 @@
|
||||
#define ESDHC_DMA_SYSCTL 0x40c
|
||||
#define ESDHC_DMA_SNOOP 0x00000040
|
||||
|
||||
-#define ESDHC_HOST_CONTROL_RES 0x05
|
||||
+#define ESDHC_HOST_CONTROL_RES 0x01
|
||||
|
||||
static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
{
|
||||
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
|
||||
index 4edb24bf56f8..c24fbc574cf1 100644
|
||||
--- a/drivers/mmc/host/sdhci-pxav3.c
|
||||
+++ b/drivers/mmc/host/sdhci-pxav3.c
|
||||
@@ -255,5 +255,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
|
||||
mmc_of_parse(host->mmc);
|
||||
sdhci_get_of_property(pdev);
|
||||
pdata = pxav3_get_mmc_pdata(dev);
|
||||
+ pdev->dev.platform_data = pdata;
|
||||
host->caps = sdhci_readl(host, SDHCI_CAPABILITIES);
|
||||
host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
|
||||
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
|
||||
index 2a32036a9404..fa9811200c9d 100644
|
||||
--- a/drivers/scsi/st.c
|
||||
+++ b/drivers/scsi/st.c
|
||||
@@ -1262,9 +1262,9 @@ static int st_open(struct inode *inode, struct file *filp)
|
||||
spin_lock(&st_use_lock);
|
||||
STp->in_use = 0;
|
||||
spin_unlock(&st_use_lock);
|
||||
- scsi_tape_put(STp);
|
||||
if (resumed)
|
||||
scsi_autopm_put_device(STp->device);
|
||||
+ scsi_tape_put(STp);
|
||||
return retval;
|
||||
|
||||
}
|
||||
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
|
||||
index 3c293ad6ae70..efca110342cb 100644
|
||||
--- a/drivers/target/iscsi/iscsi_target.c
|
||||
+++ b/drivers/target/iscsi/iscsi_target.c
|
||||
@@ -4416,7 +4416,18 @@ static void iscsit_logout_post_handler_closesession(
|
||||
struct iscsi_conn *conn)
|
||||
{
|
||||
struct iscsi_session *sess = conn->sess;
|
||||
- int sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
+ int sleep = 1;
|
||||
+ /*
|
||||
+ * Traditional iscsi/tcp will invoke this logic from TX thread
|
||||
+ * context during session logout, so clear tx_thread_active and
|
||||
+ * sleep if iscsit_close_connection() has not already occured.
|
||||
+ *
|
||||
+ * Since iser-target invokes this logic from it's own workqueue,
|
||||
+ * always sleep waiting for RX/TX thread shutdown to complete
|
||||
+ * within iscsit_close_connection().
|
||||
+ */
|
||||
+ if (conn->conn_transport->transport_type == ISCSI_TCP)
|
||||
+ sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
|
||||
atomic_set(&conn->conn_logout_remove, 0);
|
||||
complete(&conn->conn_logout_comp);
|
||||
@@ -4430,7 +4441,10 @@ static void iscsit_logout_post_handler_closesession(
|
||||
static void iscsit_logout_post_handler_samecid(
|
||||
struct iscsi_conn *conn)
|
||||
{
|
||||
- int sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
+ int sleep = 1;
|
||||
+
|
||||
+ if (conn->conn_transport->transport_type == ISCSI_TCP)
|
||||
+ sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
|
||||
atomic_set(&conn->conn_logout_remove, 0);
|
||||
complete(&conn->conn_logout_comp);
|
||||
@@ -4649,6 +4663,7 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
|
||||
struct iscsi_session *sess;
|
||||
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
|
||||
struct se_session *se_sess, *se_sess_tmp;
|
||||
+ LIST_HEAD(free_list);
|
||||
int session_count = 0;
|
||||
|
||||
spin_lock_bh(&se_tpg->session_lock);
|
||||
@@ -4670,14 +4685,17 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
|
||||
}
|
||||
atomic_set(&sess->session_reinstatement, 1);
|
||||
spin_unlock(&sess->conn_lock);
|
||||
- spin_unlock_bh(&se_tpg->session_lock);
|
||||
|
||||
- iscsit_free_session(sess);
|
||||
- spin_lock_bh(&se_tpg->session_lock);
|
||||
+ list_move_tail(&se_sess->sess_list, &free_list);
|
||||
+ }
|
||||
+ spin_unlock_bh(&se_tpg->session_lock);
|
||||
|
||||
+ list_for_each_entry_safe(se_sess, se_sess_tmp, &free_list, sess_list) {
|
||||
+ sess = (struct iscsi_session *)se_sess->fabric_sess_ptr;
|
||||
+
|
||||
+ iscsit_free_session(sess);
|
||||
session_count++;
|
||||
}
|
||||
- spin_unlock_bh(&se_tpg->session_lock);
|
||||
|
||||
pr_debug("Released %d iSCSI Session(s) from Target Portal"
|
||||
" Group: %hu\n", session_count, tpg->tpgt);
|
||||
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
|
||||
index d939376c5dee..0f71c3a22507 100644
|
||||
--- a/drivers/usb/host/xhci-hub.c
|
||||
+++ b/drivers/usb/host/xhci-hub.c
|
||||
@@ -468,10 +468,13 @@ static void xhci_hub_report_link_state(struct xhci_hcd *xhci,
|
||||
u32 pls = status_reg & PORT_PLS_MASK;
|
||||
|
||||
/* resume state is a xHCI internal state.
|
||||
- * Do not report it to usb core.
|
||||
+ * Do not report it to usb core, instead, pretend to be U3,
|
||||
+ * thus usb core knows it's not ready for transfer
|
||||
*/
|
||||
- if (pls == XDEV_RESUME)
|
||||
+ if (pls == XDEV_RESUME) {
|
||||
+ *status |= USB_SS_PORT_LS_U3;
|
||||
return;
|
||||
+ }
|
||||
|
||||
/* When the CAS bit is set then warm reset
|
||||
* should be performed on port
|
||||
@@ -1045,10 +1048,10 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
|
||||
if (hcd->self.root_hub->do_remote_wakeup) {
|
||||
- if (bus_state->resuming_ports) {
|
||||
+ if (bus_state->resuming_ports || /* USB2 */
|
||||
+ bus_state->port_remote_wakeup) { /* USB3 */
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
- xhci_dbg(xhci, "suspend failed because "
|
||||
- "a port is resuming\n");
|
||||
+ xhci_dbg(xhci, "suspend failed because a port is resuming\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
|
||||
index 30533952b4a3..95fe1a432d29 100644
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -1669,6 +1669,9 @@ static void handle_port_status(struct xhci_hcd *xhci,
|
||||
usb_hcd_resume_root_hub(hcd);
|
||||
}
|
||||
|
||||
+ if (hcd->speed == HCD_USB3 && (temp & PORT_PLS_MASK) == XDEV_INACTIVE)
|
||||
+ bus_state->port_remote_wakeup &= ~(1 << faked_port_index);
|
||||
+
|
||||
if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_RESUME) {
|
||||
xhci_dbg(xhci, "port resume event for port %d\n", port_id);
|
||||
|
||||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||||
index 10223f2b18d2..1f901fc25590 100644
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -3356,6 +3356,9 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ if (virt_dev->tt_info)
|
||||
+ old_active_eps = virt_dev->tt_info->active_eps;
|
||||
+
|
||||
if (virt_dev->udev != udev) {
|
||||
/* If the virt_dev and the udev does not match, this virt_dev
|
||||
* may belong to another udev.
|
||||
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
|
||||
index ed8de724b285..deb2537ae75c 100644
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -280,6 +280,7 @@ struct xhci_op_regs {
|
||||
#define XDEV_U0 (0x0 << 5)
|
||||
#define XDEV_U2 (0x2 << 5)
|
||||
#define XDEV_U3 (0x3 << 5)
|
||||
+#define XDEV_INACTIVE (0x6 << 5)
|
||||
#define XDEV_RESUME (0xf << 5)
|
||||
/* true: port has power (see HCC_PPC) */
|
||||
#define PORT_POWER (1 << 9)
|
||||
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
|
||||
index 821e1e2f70f6..da380a99c6b8 100644
|
||||
--- a/drivers/usb/storage/unusual_devs.h
|
||||
+++ b/drivers/usb/storage/unusual_devs.h
|
||||
@@ -2032,6 +2032,18 @@ UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0200,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_READ_DISC_INFO ),
|
||||
|
||||
+/* Reported by Oliver Neukum <oneukum@suse.com>
|
||||
+ * This device morphes spontaneously into another device if the access
|
||||
+ * pattern of Windows isn't followed. Thus writable media would be dirty
|
||||
+ * if the initial instance is used. So the device is limited to its
|
||||
+ * virtual CD.
|
||||
+ * And yes, the concept that BCD goes up to 9 is not heeded */
|
||||
+UNUSUAL_DEV( 0x19d2, 0x1225, 0x0000, 0xffff,
|
||||
+ "ZTE,Incorporated",
|
||||
+ "ZTE WCDMA Technologies MSM",
|
||||
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
+ US_FL_SINGLE_LUN ),
|
||||
+
|
||||
/* Reported by Sven Geggus <sven-usbst@geggus.net>
|
||||
* This encrypted pen drive returns bogus data for the initial READ(10).
|
||||
*/
|
||||
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
|
||||
index 60aa5ad09a2f..3aabc652f1b9 100644
|
||||
--- a/drivers/vhost/vhost.c
|
||||
+++ b/drivers/vhost/vhost.c
|
||||
@@ -855,6 +855,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
|
||||
}
|
||||
if (eventfp != d->log_file) {
|
||||
filep = d->log_file;
|
||||
+ d->log_file = eventfp;
|
||||
ctx = d->log_ctx;
|
||||
d->log_ctx = eventfp ?
|
||||
eventfd_ctx_fileget(eventfp) : NULL;
|
||||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index 38c4a302fab4..90be2809e15a 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -520,6 +520,9 @@ repeat:
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED))
|
||||
+ goto kill_it;
|
||||
+
|
||||
if (dentry->d_flags & DCACHE_OP_DELETE) {
|
||||
if (dentry->d_op->d_delete(dentry))
|
||||
goto kill_it;
|
||||
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
|
||||
index 9065107f083e..7a5237a1bce5 100644
|
||||
--- a/kernel/irq/resend.c
|
||||
+++ b/kernel/irq/resend.c
|
||||
@@ -75,13 +75,21 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
|
||||
!desc->irq_data.chip->irq_retrigger(&desc->irq_data)) {
|
||||
#ifdef CONFIG_HARDIRQS_SW_RESEND
|
||||
/*
|
||||
- * If the interrupt has a parent irq and runs
|
||||
- * in the thread context of the parent irq,
|
||||
- * retrigger the parent.
|
||||
+ * If the interrupt is running in the thread
|
||||
+ * context of the parent irq we need to be
|
||||
+ * careful, because we cannot trigger it
|
||||
+ * directly.
|
||||
*/
|
||||
- if (desc->parent_irq &&
|
||||
- irq_settings_is_nested_thread(desc))
|
||||
+ if (irq_settings_is_nested_thread(desc)) {
|
||||
+ /*
|
||||
+ * If the parent_irq is valid, we
|
||||
+ * retrigger the parent, otherwise we
|
||||
+ * do nothing.
|
||||
+ */
|
||||
+ if (!desc->parent_irq)
|
||||
+ return;
|
||||
irq = desc->parent_irq;
|
||||
+ }
|
||||
/* Set it pending and activate the softirq: */
|
||||
set_bit(irq, irqs_resend);
|
||||
tasklet_schedule(&resend_tasklet);
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index e6b1da3a8924..30bf9cce8c2b 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -3230,6 +3230,10 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
|
||||
pte_unmap(page_table);
|
||||
|
||||
+ /* File mapping without ->vm_ops ? */
|
||||
+ if (vma->vm_flags & VM_SHARED)
|
||||
+ return VM_FAULT_SIGBUS;
|
||||
+
|
||||
/* Check if we need to add a guard page to the stack */
|
||||
if (check_stack_guard_page(vma, address) < 0)
|
||||
return VM_FAULT_SIGSEGV;
|
||||
@@ -3495,6 +3499,9 @@ static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
- vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
|
||||
|
||||
pte_unmap(page_table);
|
||||
+ /* The VMA was not fully populated on mmap() or missing VM_DONTEXPAND */
|
||||
+ if (!vma->vm_ops->fault)
|
||||
+ return VM_FAULT_SIGBUS;
|
||||
return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
|
||||
}
|
||||
|
||||
@@ -3706,11 +3713,9 @@ int handle_pte_fault(struct mm_struct *mm,
|
||||
entry = *pte;
|
||||
if (!pte_present(entry)) {
|
||||
if (pte_none(entry)) {
|
||||
- if (vma->vm_ops) {
|
||||
- if (likely(vma->vm_ops->fault))
|
||||
- return do_linear_fault(mm, vma, address,
|
||||
+ if (vma->vm_ops)
|
||||
+ return do_linear_fault(mm, vma, address,
|
||||
pte, pmd, flags, entry);
|
||||
- }
|
||||
return do_anonymous_page(mm, vma, address,
|
||||
pte, pmd, flags);
|
||||
}
|
||||
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
|
||||
index 2d5b4f65c519..32bafdbdfd66 100644
|
||||
--- a/net/mac80211/debugfs_netdev.c
|
||||
+++ b/net/mac80211/debugfs_netdev.c
|
||||
@@ -697,6 +697,7 @@ void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata)
|
||||
|
||||
debugfs_remove_recursive(sdata->vif.debugfs_dir);
|
||||
sdata->vif.debugfs_dir = NULL;
|
||||
+ sdata->debugfs.subdir_stations = NULL;
|
||||
}
|
||||
|
||||
void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata)
|
||||
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
|
||||
index e8fdb172adbb..a985158d95d5 100644
|
||||
--- a/net/rds/ib_rdma.c
|
||||
+++ b/net/rds/ib_rdma.c
|
||||
@@ -759,8 +759,10 @@ void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents,
|
||||
}
|
||||
|
||||
ibmr = rds_ib_alloc_fmr(rds_ibdev);
|
||||
- if (IS_ERR(ibmr))
|
||||
+ if (IS_ERR(ibmr)) {
|
||||
+ rds_ib_dev_put(rds_ibdev);
|
||||
return ibmr;
|
||||
+ }
|
||||
|
||||
ret = rds_ib_map_fmr(rds_ibdev, ibmr, sg, nents);
|
||||
if (ret == 0)
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index a82d6576fe0f..d30252e7f3e8 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -2204,7 +2204,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF),
|
||||
SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
|
||||
SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
|
||||
- SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
|
||||
+ SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
|
||||
|
||||
SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
|
||||
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
|
||||
index d06fbd9f7cbe..2d17f40fb16d 100644
|
||||
--- a/sound/usb/mixer_maps.c
|
||||
+++ b/sound/usb/mixer_maps.c
|
||||
@@ -330,6 +330,20 @@ static const struct usbmix_name_map scms_usb3318_map[] = {
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
+/* Bose companion 5, the dB conversion factor is 16 instead of 256 */
|
||||
+static struct usbmix_dB_map bose_companion5_dB = {-5006, -6};
|
||||
+static struct usbmix_name_map bose_companion5_map[] = {
|
||||
+ { 3, NULL, .dB = &bose_companion5_dB },
|
||||
+ { 0 } /* terminator */
|
||||
+};
|
||||
+
|
||||
+/* Dragonfly DAC 1.2, the dB conversion factor is 1 instead of 256 */
|
||||
+static struct usbmix_dB_map dragonfly_1_2_dB = {0, 5000};
|
||||
+static struct usbmix_name_map dragonfly_1_2_map[] = {
|
||||
+ { 7, NULL, .dB = &dragonfly_1_2_dB },
|
||||
+ { 0 } /* terminator */
|
||||
+};
|
||||
+
|
||||
/*
|
||||
* Control map entries
|
||||
*/
|
||||
@@ -432,6 +446,16 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
|
||||
.id = USB_ID(0x25c4, 0x0003),
|
||||
.map = scms_usb3318_map,
|
||||
},
|
||||
+ {
|
||||
+ /* Bose Companion 5 */
|
||||
+ .id = USB_ID(0x05a7, 0x1020),
|
||||
+ .map = bose_companion5_map,
|
||||
+ },
|
||||
+ {
|
||||
+ /* Dragonfly DAC 1.2 */
|
||||
+ .id = USB_ID(0x21b4, 0x0081),
|
||||
+ .map = dragonfly_1_2_map,
|
||||
+ },
|
||||
{ 0 } /* terminator */
|
||||
};
|
||||
|
||||
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
|
||||
index d5bed1d25713..45d586b6e8b5 100644
|
||||
--- a/sound/usb/quirks-table.h
|
||||
+++ b/sound/usb/quirks-table.h
|
||||
@@ -2773,6 +2773,74 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||
}
|
||||
},
|
||||
|
||||
+/* Steinberg devices */
|
||||
+{
|
||||
+ /* Steinberg MI2 */
|
||||
+ USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x2040),
|
||||
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||
+ .ifnum = QUIRK_ANY_INTERFACE,
|
||||
+ .type = QUIRK_COMPOSITE,
|
||||
+ .data = & (const struct snd_usb_audio_quirk[]) {
|
||||
+ {
|
||||
+ .ifnum = 0,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 1,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 2,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 3,
|
||||
+ .type = QUIRK_MIDI_FIXED_ENDPOINT,
|
||||
+ .data = &(const struct snd_usb_midi_endpoint_info) {
|
||||
+ .out_cables = 0x0001,
|
||||
+ .in_cables = 0x0001
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = -1
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+},
|
||||
+{
|
||||
+ /* Steinberg MI4 */
|
||||
+ USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x4040),
|
||||
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||
+ .ifnum = QUIRK_ANY_INTERFACE,
|
||||
+ .type = QUIRK_COMPOSITE,
|
||||
+ .data = & (const struct snd_usb_audio_quirk[]) {
|
||||
+ {
|
||||
+ .ifnum = 0,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 1,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 2,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 3,
|
||||
+ .type = QUIRK_MIDI_FIXED_ENDPOINT,
|
||||
+ .data = &(const struct snd_usb_midi_endpoint_info) {
|
||||
+ .out_cables = 0x0001,
|
||||
+ .in_cables = 0x0001
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = -1
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+},
|
||||
+
|
||||
/* TerraTec devices */
|
||||
{
|
||||
USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
|
||||
@ -1,579 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 11a7e7bc31f2..25ee724c9089 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 85
|
||||
+SUBLEVEL = 86
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h
|
||||
index 2046a89a57cf..78485493639a 100644
|
||||
--- a/arch/arc/include/asm/ptrace.h
|
||||
+++ b/arch/arc/include/asm/ptrace.h
|
||||
@@ -83,7 +83,7 @@ struct callee_regs {
|
||||
long r13;
|
||||
};
|
||||
|
||||
-#define instruction_pointer(regs) ((regs)->ret)
|
||||
+#define instruction_pointer(regs) (unsigned long)((regs)->ret)
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
|
||||
/* return 1 if user mode or 0 if kernel mode */
|
||||
diff --git a/arch/s390/kernel/sclp.S b/arch/s390/kernel/sclp.S
|
||||
index 29bd7bec4176..1ecd47b5e250 100644
|
||||
--- a/arch/s390/kernel/sclp.S
|
||||
+++ b/arch/s390/kernel/sclp.S
|
||||
@@ -276,6 +276,8 @@ ENTRY(_sclp_print_early)
|
||||
jno .Lesa2
|
||||
ahi %r15,-80
|
||||
stmh %r6,%r15,96(%r15) # store upper register halves
|
||||
+ basr %r13,0
|
||||
+ lmh %r0,%r15,.Lzeroes-.(%r13) # clear upper register halves
|
||||
.Lesa2:
|
||||
#endif
|
||||
lr %r10,%r2 # save string pointer
|
||||
@@ -299,6 +301,8 @@ ENTRY(_sclp_print_early)
|
||||
#endif
|
||||
lm %r6,%r15,120(%r15) # restore registers
|
||||
br %r14
|
||||
+.Lzeroes:
|
||||
+ .fill 64,4,0
|
||||
|
||||
.LwritedataS4:
|
||||
.long 0x00760005 # SCLP command for write data
|
||||
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
|
||||
index 7a5aa1a7864e..5ebe93676201 100644
|
||||
--- a/arch/tile/kernel/setup.c
|
||||
+++ b/arch/tile/kernel/setup.c
|
||||
@@ -1064,7 +1064,7 @@ static void __init load_hv_initrd(void)
|
||||
|
||||
void __init free_initrd_mem(unsigned long begin, unsigned long end)
|
||||
{
|
||||
- free_bootmem(__pa(begin), end - begin);
|
||||
+ free_bootmem_late(__pa(begin), end - begin);
|
||||
}
|
||||
|
||||
#else
|
||||
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
|
||||
index abb988a54c69..3b28eff9b90b 100644
|
||||
--- a/arch/x86/boot/compressed/head_32.S
|
||||
+++ b/arch/x86/boot/compressed/head_32.S
|
||||
@@ -54,7 +54,7 @@ ENTRY(efi_pe_entry)
|
||||
call reloc
|
||||
reloc:
|
||||
popl %ecx
|
||||
- subl reloc, %ecx
|
||||
+ subl $reloc, %ecx
|
||||
movl %ecx, BP_code32_start(%eax)
|
||||
|
||||
sub $0x4, %esp
|
||||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
|
||||
index 1ff8e97f853a..8c4e81ac5e75 100644
|
||||
--- a/block/blk-cgroup.c
|
||||
+++ b/block/blk-cgroup.c
|
||||
@@ -720,8 +720,12 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
|
||||
return -EINVAL;
|
||||
|
||||
disk = get_gendisk(MKDEV(major, minor), &part);
|
||||
- if (!disk || part)
|
||||
+ if (!disk)
|
||||
return -EINVAL;
|
||||
+ if (part) {
|
||||
+ put_disk(disk);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
|
||||
rcu_read_lock();
|
||||
spin_lock_irq(disk->queue->queue_lock);
|
||||
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
|
||||
index 5f87bed05467..20aef5d5a242 100644
|
||||
--- a/drivers/input/touchscreen/usbtouchscreen.c
|
||||
+++ b/drivers/input/touchscreen/usbtouchscreen.c
|
||||
@@ -626,6 +626,9 @@ static int dmc_tsc10_init(struct usbtouch_usb *usbtouch)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
+ /* TSC-25 data sheet specifies a delay after the RESET command */
|
||||
+ msleep(150);
|
||||
+
|
||||
/* set coordinate output rate */
|
||||
buf[0] = buf[1] = 0xFF;
|
||||
ret = usb_control_msg(dev, usb_rcvctrlpipe (dev, 0),
|
||||
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
|
||||
index 86ac4a4ccc01..fa58438b298a 100644
|
||||
--- a/drivers/md/raid1.c
|
||||
+++ b/drivers/md/raid1.c
|
||||
@@ -327,7 +327,7 @@ static void raid1_end_read_request(struct bio *bio, int error)
|
||||
spin_lock_irqsave(&conf->device_lock, flags);
|
||||
if (r1_bio->mddev->degraded == conf->raid_disks ||
|
||||
(r1_bio->mddev->degraded == conf->raid_disks-1 &&
|
||||
- !test_bit(Faulty, &conf->mirrors[mirror].rdev->flags)))
|
||||
+ test_bit(In_sync, &conf->mirrors[mirror].rdev->flags)))
|
||||
uptodate = 1;
|
||||
spin_unlock_irqrestore(&conf->device_lock, flags);
|
||||
}
|
||||
diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci-esdhc.h
|
||||
index d25f9ab9a54d..d33bb9522416 100644
|
||||
--- a/drivers/mmc/host/sdhci-esdhc.h
|
||||
+++ b/drivers/mmc/host/sdhci-esdhc.h
|
||||
@@ -40,7 +40,7 @@
|
||||
#define ESDHC_DMA_SYSCTL 0x40c
|
||||
#define ESDHC_DMA_SNOOP 0x00000040
|
||||
|
||||
-#define ESDHC_HOST_CONTROL_RES 0x05
|
||||
+#define ESDHC_HOST_CONTROL_RES 0x01
|
||||
|
||||
static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
{
|
||||
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
|
||||
index 4edb24bf56f8..c24fbc574cf1 100644
|
||||
--- a/drivers/mmc/host/sdhci-pxav3.c
|
||||
+++ b/drivers/mmc/host/sdhci-pxav3.c
|
||||
@@ -255,6 +255,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
|
||||
mmc_of_parse(host->mmc);
|
||||
sdhci_get_of_property(pdev);
|
||||
pdata = pxav3_get_mmc_pdata(dev);
|
||||
+ pdev->dev.platform_data = pdata;
|
||||
} else if (pdata) {
|
||||
/* on-chip device */
|
||||
if (pdata->flags & PXA_FLAG_CARD_PERMANENT)
|
||||
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
|
||||
index 2a32036a9404..fa9811200c9d 100644
|
||||
--- a/drivers/scsi/st.c
|
||||
+++ b/drivers/scsi/st.c
|
||||
@@ -1262,9 +1262,9 @@ static int st_open(struct inode *inode, struct file *filp)
|
||||
spin_lock(&st_use_lock);
|
||||
STp->in_use = 0;
|
||||
spin_unlock(&st_use_lock);
|
||||
- scsi_tape_put(STp);
|
||||
if (resumed)
|
||||
scsi_autopm_put_device(STp->device);
|
||||
+ scsi_tape_put(STp);
|
||||
return retval;
|
||||
|
||||
}
|
||||
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
|
||||
index 3c293ad6ae70..efca110342cb 100644
|
||||
--- a/drivers/target/iscsi/iscsi_target.c
|
||||
+++ b/drivers/target/iscsi/iscsi_target.c
|
||||
@@ -4416,7 +4416,18 @@ static void iscsit_logout_post_handler_closesession(
|
||||
struct iscsi_conn *conn)
|
||||
{
|
||||
struct iscsi_session *sess = conn->sess;
|
||||
- int sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
+ int sleep = 1;
|
||||
+ /*
|
||||
+ * Traditional iscsi/tcp will invoke this logic from TX thread
|
||||
+ * context during session logout, so clear tx_thread_active and
|
||||
+ * sleep if iscsit_close_connection() has not already occured.
|
||||
+ *
|
||||
+ * Since iser-target invokes this logic from it's own workqueue,
|
||||
+ * always sleep waiting for RX/TX thread shutdown to complete
|
||||
+ * within iscsit_close_connection().
|
||||
+ */
|
||||
+ if (conn->conn_transport->transport_type == ISCSI_TCP)
|
||||
+ sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
|
||||
atomic_set(&conn->conn_logout_remove, 0);
|
||||
complete(&conn->conn_logout_comp);
|
||||
@@ -4430,7 +4441,10 @@ static void iscsit_logout_post_handler_closesession(
|
||||
static void iscsit_logout_post_handler_samecid(
|
||||
struct iscsi_conn *conn)
|
||||
{
|
||||
- int sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
+ int sleep = 1;
|
||||
+
|
||||
+ if (conn->conn_transport->transport_type == ISCSI_TCP)
|
||||
+ sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
|
||||
atomic_set(&conn->conn_logout_remove, 0);
|
||||
complete(&conn->conn_logout_comp);
|
||||
@@ -4649,6 +4663,7 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
|
||||
struct iscsi_session *sess;
|
||||
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
|
||||
struct se_session *se_sess, *se_sess_tmp;
|
||||
+ LIST_HEAD(free_list);
|
||||
int session_count = 0;
|
||||
|
||||
spin_lock_bh(&se_tpg->session_lock);
|
||||
@@ -4670,14 +4685,17 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
|
||||
}
|
||||
atomic_set(&sess->session_reinstatement, 1);
|
||||
spin_unlock(&sess->conn_lock);
|
||||
- spin_unlock_bh(&se_tpg->session_lock);
|
||||
|
||||
- iscsit_free_session(sess);
|
||||
- spin_lock_bh(&se_tpg->session_lock);
|
||||
+ list_move_tail(&se_sess->sess_list, &free_list);
|
||||
+ }
|
||||
+ spin_unlock_bh(&se_tpg->session_lock);
|
||||
|
||||
+ list_for_each_entry_safe(se_sess, se_sess_tmp, &free_list, sess_list) {
|
||||
+ sess = (struct iscsi_session *)se_sess->fabric_sess_ptr;
|
||||
+
|
||||
+ iscsit_free_session(sess);
|
||||
session_count++;
|
||||
}
|
||||
- spin_unlock_bh(&se_tpg->session_lock);
|
||||
|
||||
pr_debug("Released %d iSCSI Session(s) from Target Portal"
|
||||
" Group: %hu\n", session_count, tpg->tpgt);
|
||||
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
|
||||
index d939376c5dee..0f71c3a22507 100644
|
||||
--- a/drivers/usb/host/xhci-hub.c
|
||||
+++ b/drivers/usb/host/xhci-hub.c
|
||||
@@ -468,10 +468,13 @@ static void xhci_hub_report_link_state(struct xhci_hcd *xhci,
|
||||
u32 pls = status_reg & PORT_PLS_MASK;
|
||||
|
||||
/* resume state is a xHCI internal state.
|
||||
- * Do not report it to usb core.
|
||||
+ * Do not report it to usb core, instead, pretend to be U3,
|
||||
+ * thus usb core knows it's not ready for transfer
|
||||
*/
|
||||
- if (pls == XDEV_RESUME)
|
||||
+ if (pls == XDEV_RESUME) {
|
||||
+ *status |= USB_SS_PORT_LS_U3;
|
||||
return;
|
||||
+ }
|
||||
|
||||
/* When the CAS bit is set then warm reset
|
||||
* should be performed on port
|
||||
@@ -1045,10 +1048,10 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
|
||||
if (hcd->self.root_hub->do_remote_wakeup) {
|
||||
- if (bus_state->resuming_ports) {
|
||||
+ if (bus_state->resuming_ports || /* USB2 */
|
||||
+ bus_state->port_remote_wakeup) { /* USB3 */
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
- xhci_dbg(xhci, "suspend failed because "
|
||||
- "a port is resuming\n");
|
||||
+ xhci_dbg(xhci, "suspend failed because a port is resuming\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
|
||||
index 30533952b4a3..95fe1a432d29 100644
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -1669,6 +1669,9 @@ static void handle_port_status(struct xhci_hcd *xhci,
|
||||
usb_hcd_resume_root_hub(hcd);
|
||||
}
|
||||
|
||||
+ if (hcd->speed == HCD_USB3 && (temp & PORT_PLS_MASK) == XDEV_INACTIVE)
|
||||
+ bus_state->port_remote_wakeup &= ~(1 << faked_port_index);
|
||||
+
|
||||
if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_RESUME) {
|
||||
xhci_dbg(xhci, "port resume event for port %d\n", port_id);
|
||||
|
||||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||||
index 10223f2b18d2..1f901fc25590 100644
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -3356,6 +3356,9 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ if (virt_dev->tt_info)
|
||||
+ old_active_eps = virt_dev->tt_info->active_eps;
|
||||
+
|
||||
if (virt_dev->udev != udev) {
|
||||
/* If the virt_dev and the udev does not match, this virt_dev
|
||||
* may belong to another udev.
|
||||
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
|
||||
index ed8de724b285..deb2537ae75c 100644
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -280,6 +280,7 @@ struct xhci_op_regs {
|
||||
#define XDEV_U0 (0x0 << 5)
|
||||
#define XDEV_U2 (0x2 << 5)
|
||||
#define XDEV_U3 (0x3 << 5)
|
||||
+#define XDEV_INACTIVE (0x6 << 5)
|
||||
#define XDEV_RESUME (0xf << 5)
|
||||
/* true: port has power (see HCC_PPC) */
|
||||
#define PORT_POWER (1 << 9)
|
||||
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
|
||||
index 821e1e2f70f6..da380a99c6b8 100644
|
||||
--- a/drivers/usb/storage/unusual_devs.h
|
||||
+++ b/drivers/usb/storage/unusual_devs.h
|
||||
@@ -2032,6 +2032,18 @@ UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0200,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_READ_DISC_INFO ),
|
||||
|
||||
+/* Reported by Oliver Neukum <oneukum@suse.com>
|
||||
+ * This device morphes spontaneously into another device if the access
|
||||
+ * pattern of Windows isn't followed. Thus writable media would be dirty
|
||||
+ * if the initial instance is used. So the device is limited to its
|
||||
+ * virtual CD.
|
||||
+ * And yes, the concept that BCD goes up to 9 is not heeded */
|
||||
+UNUSUAL_DEV( 0x19d2, 0x1225, 0x0000, 0xffff,
|
||||
+ "ZTE,Incorporated",
|
||||
+ "ZTE WCDMA Technologies MSM",
|
||||
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
+ US_FL_SINGLE_LUN ),
|
||||
+
|
||||
/* Reported by Sven Geggus <sven-usbst@geggus.net>
|
||||
* This encrypted pen drive returns bogus data for the initial READ(10).
|
||||
*/
|
||||
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
|
||||
index 60aa5ad09a2f..3aabc652f1b9 100644
|
||||
--- a/drivers/vhost/vhost.c
|
||||
+++ b/drivers/vhost/vhost.c
|
||||
@@ -855,6 +855,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
|
||||
}
|
||||
if (eventfp != d->log_file) {
|
||||
filep = d->log_file;
|
||||
+ d->log_file = eventfp;
|
||||
ctx = d->log_ctx;
|
||||
d->log_ctx = eventfp ?
|
||||
eventfd_ctx_fileget(eventfp) : NULL;
|
||||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index 38c4a302fab4..90be2809e15a 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -520,6 +520,9 @@ repeat:
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED))
|
||||
+ goto kill_it;
|
||||
+
|
||||
if (dentry->d_flags & DCACHE_OP_DELETE) {
|
||||
if (dentry->d_op->d_delete(dentry))
|
||||
goto kill_it;
|
||||
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
|
||||
index 9065107f083e..7a5237a1bce5 100644
|
||||
--- a/kernel/irq/resend.c
|
||||
+++ b/kernel/irq/resend.c
|
||||
@@ -75,13 +75,21 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
|
||||
!desc->irq_data.chip->irq_retrigger(&desc->irq_data)) {
|
||||
#ifdef CONFIG_HARDIRQS_SW_RESEND
|
||||
/*
|
||||
- * If the interrupt has a parent irq and runs
|
||||
- * in the thread context of the parent irq,
|
||||
- * retrigger the parent.
|
||||
+ * If the interrupt is running in the thread
|
||||
+ * context of the parent irq we need to be
|
||||
+ * careful, because we cannot trigger it
|
||||
+ * directly.
|
||||
*/
|
||||
- if (desc->parent_irq &&
|
||||
- irq_settings_is_nested_thread(desc))
|
||||
+ if (irq_settings_is_nested_thread(desc)) {
|
||||
+ /*
|
||||
+ * If the parent_irq is valid, we
|
||||
+ * retrigger the parent, otherwise we
|
||||
+ * do nothing.
|
||||
+ */
|
||||
+ if (!desc->parent_irq)
|
||||
+ return;
|
||||
irq = desc->parent_irq;
|
||||
+ }
|
||||
/* Set it pending and activate the softirq: */
|
||||
set_bit(irq, irqs_resend);
|
||||
tasklet_schedule(&resend_tasklet);
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index e6b1da3a8924..30bf9cce8c2b 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -3230,6 +3230,10 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
|
||||
pte_unmap(page_table);
|
||||
|
||||
+ /* File mapping without ->vm_ops ? */
|
||||
+ if (vma->vm_flags & VM_SHARED)
|
||||
+ return VM_FAULT_SIGBUS;
|
||||
+
|
||||
/* Check if we need to add a guard page to the stack */
|
||||
if (check_stack_guard_page(vma, address) < 0)
|
||||
return VM_FAULT_SIGSEGV;
|
||||
@@ -3495,6 +3499,9 @@ static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
- vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
|
||||
|
||||
pte_unmap(page_table);
|
||||
+ /* The VMA was not fully populated on mmap() or missing VM_DONTEXPAND */
|
||||
+ if (!vma->vm_ops->fault)
|
||||
+ return VM_FAULT_SIGBUS;
|
||||
return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
|
||||
}
|
||||
|
||||
@@ -3706,11 +3713,9 @@ int handle_pte_fault(struct mm_struct *mm,
|
||||
entry = *pte;
|
||||
if (!pte_present(entry)) {
|
||||
if (pte_none(entry)) {
|
||||
- if (vma->vm_ops) {
|
||||
- if (likely(vma->vm_ops->fault))
|
||||
- return do_linear_fault(mm, vma, address,
|
||||
+ if (vma->vm_ops)
|
||||
+ return do_linear_fault(mm, vma, address,
|
||||
pte, pmd, flags, entry);
|
||||
- }
|
||||
return do_anonymous_page(mm, vma, address,
|
||||
pte, pmd, flags);
|
||||
}
|
||||
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
|
||||
index 2d5b4f65c519..32bafdbdfd66 100644
|
||||
--- a/net/mac80211/debugfs_netdev.c
|
||||
+++ b/net/mac80211/debugfs_netdev.c
|
||||
@@ -697,6 +697,7 @@ void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata)
|
||||
|
||||
debugfs_remove_recursive(sdata->vif.debugfs_dir);
|
||||
sdata->vif.debugfs_dir = NULL;
|
||||
+ sdata->debugfs.subdir_stations = NULL;
|
||||
}
|
||||
|
||||
void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata)
|
||||
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
|
||||
index e8fdb172adbb..a985158d95d5 100644
|
||||
--- a/net/rds/ib_rdma.c
|
||||
+++ b/net/rds/ib_rdma.c
|
||||
@@ -759,8 +759,10 @@ void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents,
|
||||
}
|
||||
|
||||
ibmr = rds_ib_alloc_fmr(rds_ibdev);
|
||||
- if (IS_ERR(ibmr))
|
||||
+ if (IS_ERR(ibmr)) {
|
||||
+ rds_ib_dev_put(rds_ibdev);
|
||||
return ibmr;
|
||||
+ }
|
||||
|
||||
ret = rds_ib_map_fmr(rds_ibdev, ibmr, sg, nents);
|
||||
if (ret == 0)
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index a82d6576fe0f..d30252e7f3e8 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -2204,7 +2204,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF),
|
||||
SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
|
||||
SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
|
||||
- SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
|
||||
+ SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
|
||||
|
||||
SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
|
||||
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
|
||||
index d06fbd9f7cbe..2d17f40fb16d 100644
|
||||
--- a/sound/usb/mixer_maps.c
|
||||
+++ b/sound/usb/mixer_maps.c
|
||||
@@ -330,6 +330,20 @@ static const struct usbmix_name_map scms_usb3318_map[] = {
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
+/* Bose companion 5, the dB conversion factor is 16 instead of 256 */
|
||||
+static struct usbmix_dB_map bose_companion5_dB = {-5006, -6};
|
||||
+static struct usbmix_name_map bose_companion5_map[] = {
|
||||
+ { 3, NULL, .dB = &bose_companion5_dB },
|
||||
+ { 0 } /* terminator */
|
||||
+};
|
||||
+
|
||||
+/* Dragonfly DAC 1.2, the dB conversion factor is 1 instead of 256 */
|
||||
+static struct usbmix_dB_map dragonfly_1_2_dB = {0, 5000};
|
||||
+static struct usbmix_name_map dragonfly_1_2_map[] = {
|
||||
+ { 7, NULL, .dB = &dragonfly_1_2_dB },
|
||||
+ { 0 } /* terminator */
|
||||
+};
|
||||
+
|
||||
/*
|
||||
* Control map entries
|
||||
*/
|
||||
@@ -432,6 +446,16 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
|
||||
.id = USB_ID(0x25c4, 0x0003),
|
||||
.map = scms_usb3318_map,
|
||||
},
|
||||
+ {
|
||||
+ /* Bose Companion 5 */
|
||||
+ .id = USB_ID(0x05a7, 0x1020),
|
||||
+ .map = bose_companion5_map,
|
||||
+ },
|
||||
+ {
|
||||
+ /* Dragonfly DAC 1.2 */
|
||||
+ .id = USB_ID(0x21b4, 0x0081),
|
||||
+ .map = dragonfly_1_2_map,
|
||||
+ },
|
||||
{ 0 } /* terminator */
|
||||
};
|
||||
|
||||
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
|
||||
index d5bed1d25713..45d586b6e8b5 100644
|
||||
--- a/sound/usb/quirks-table.h
|
||||
+++ b/sound/usb/quirks-table.h
|
||||
@@ -2773,6 +2773,74 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||
}
|
||||
},
|
||||
|
||||
+/* Steinberg devices */
|
||||
+{
|
||||
+ /* Steinberg MI2 */
|
||||
+ USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x2040),
|
||||
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||
+ .ifnum = QUIRK_ANY_INTERFACE,
|
||||
+ .type = QUIRK_COMPOSITE,
|
||||
+ .data = & (const struct snd_usb_audio_quirk[]) {
|
||||
+ {
|
||||
+ .ifnum = 0,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 1,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 2,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 3,
|
||||
+ .type = QUIRK_MIDI_FIXED_ENDPOINT,
|
||||
+ .data = &(const struct snd_usb_midi_endpoint_info) {
|
||||
+ .out_cables = 0x0001,
|
||||
+ .in_cables = 0x0001
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = -1
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+},
|
||||
+{
|
||||
+ /* Steinberg MI4 */
|
||||
+ USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x4040),
|
||||
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||
+ .ifnum = QUIRK_ANY_INTERFACE,
|
||||
+ .type = QUIRK_COMPOSITE,
|
||||
+ .data = & (const struct snd_usb_audio_quirk[]) {
|
||||
+ {
|
||||
+ .ifnum = 0,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 1,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 2,
|
||||
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = 3,
|
||||
+ .type = QUIRK_MIDI_FIXED_ENDPOINT,
|
||||
+ .data = &(const struct snd_usb_midi_endpoint_info) {
|
||||
+ .out_cables = 0x0001,
|
||||
+ .in_cables = 0x0001
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ .ifnum = -1
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+},
|
||||
+
|
||||
/* TerraTec devices */
|
||||
{
|
||||
USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,285 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0d4fd6427349..e94ce68ecf87 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 87
|
||||
+SUBLEVEL = 88
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c
|
||||
index 7c7be7855638..8aaf073ee078 100644
|
||||
--- a/arch/arm64/mm/mmap.c
|
||||
+++ b/arch/arm64/mm/mmap.c
|
||||
@@ -47,22 +47,14 @@ static int mmap_is_legacy(void)
|
||||
return sysctl_legacy_va_layout;
|
||||
}
|
||||
|
||||
-/*
|
||||
- * Since get_random_int() returns the same value within a 1 jiffy window, we
|
||||
- * will almost always get the same randomisation for the stack and mmap
|
||||
- * region. This will mean the relative distance between stack and mmap will be
|
||||
- * the same.
|
||||
- *
|
||||
- * To avoid this we can shift the randomness by 1 bit.
|
||||
- */
|
||||
static unsigned long mmap_rnd(void)
|
||||
{
|
||||
unsigned long rnd = 0;
|
||||
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
- rnd = (long)get_random_int() & (STACK_RND_MASK >> 1);
|
||||
+ rnd = (long)get_random_int() & STACK_RND_MASK;
|
||||
|
||||
- return rnd << (PAGE_SHIFT + 1);
|
||||
+ return rnd << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static unsigned long mmap_base(void)
|
||||
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
|
||||
index 84573b4d6f92..dda43cc4b6cd 100644
|
||||
--- a/drivers/crypto/caam/caamhash.c
|
||||
+++ b/drivers/crypto/caam/caamhash.c
|
||||
@@ -895,13 +895,14 @@ static int ahash_final_ctx(struct ahash_request *req)
|
||||
state->buflen_1;
|
||||
u32 *sh_desc = ctx->sh_desc_fin, *desc;
|
||||
dma_addr_t ptr = ctx->sh_desc_fin_dma;
|
||||
- int sec4_sg_bytes;
|
||||
+ int sec4_sg_bytes, sec4_sg_src_index;
|
||||
int digestsize = crypto_ahash_digestsize(ahash);
|
||||
struct ahash_edesc *edesc;
|
||||
int ret = 0;
|
||||
int sh_len;
|
||||
|
||||
- sec4_sg_bytes = (1 + (buflen ? 1 : 0)) * sizeof(struct sec4_sg_entry);
|
||||
+ sec4_sg_src_index = 1 + (buflen ? 1 : 0);
|
||||
+ sec4_sg_bytes = sec4_sg_src_index * sizeof(struct sec4_sg_entry);
|
||||
|
||||
/* allocate space for base edesc and hw desc commands, link tables */
|
||||
edesc = kmalloc(sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN +
|
||||
@@ -928,7 +929,7 @@ static int ahash_final_ctx(struct ahash_request *req)
|
||||
state->buf_dma = try_buf_map_to_sec4_sg(jrdev, edesc->sec4_sg + 1,
|
||||
buf, state->buf_dma, buflen,
|
||||
last_buflen);
|
||||
- (edesc->sec4_sg + sec4_sg_bytes - 1)->len |= SEC4_SG_LEN_FIN;
|
||||
+ (edesc->sec4_sg + sec4_sg_src_index - 1)->len |= SEC4_SG_LEN_FIN;
|
||||
|
||||
append_seq_in_ptr(desc, edesc->sec4_sg_dma, ctx->ctx_len + buflen,
|
||||
LDST_SGF);
|
||||
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
|
||||
index ef6b7e08f485..5c361f3c66aa 100644
|
||||
--- a/drivers/edac/ppc4xx_edac.c
|
||||
+++ b/drivers/edac/ppc4xx_edac.c
|
||||
@@ -921,7 +921,7 @@ static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
|
||||
*/
|
||||
|
||||
for (row = 0; row < mci->nr_csrows; row++) {
|
||||
- struct csrow_info *csi = &mci->csrows[row];
|
||||
+ struct csrow_info *csi = mci->csrows[row];
|
||||
|
||||
/*
|
||||
* Get the configuration settings for this
|
||||
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
|
||||
index 3b1503dc1f13..43f6250baadd 100644
|
||||
--- a/drivers/md/dm-thin-metadata.c
|
||||
+++ b/drivers/md/dm-thin-metadata.c
|
||||
@@ -1281,8 +1281,8 @@ static int __release_metadata_snap(struct dm_pool_metadata *pmd)
|
||||
return r;
|
||||
|
||||
disk_super = dm_block_data(copy);
|
||||
- dm_sm_dec_block(pmd->metadata_sm, le64_to_cpu(disk_super->data_mapping_root));
|
||||
- dm_sm_dec_block(pmd->metadata_sm, le64_to_cpu(disk_super->device_details_root));
|
||||
+ dm_btree_del(&pmd->info, le64_to_cpu(disk_super->data_mapping_root));
|
||||
+ dm_btree_del(&pmd->details_info, le64_to_cpu(disk_super->device_details_root));
|
||||
dm_sm_dec_block(pmd->metadata_sm, held_root);
|
||||
|
||||
return dm_tm_unlock(pmd->tm, copy);
|
||||
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
|
||||
index 09c81b2f2169..42c46dc19537 100644
|
||||
--- a/drivers/scsi/libfc/fc_fcp.c
|
||||
+++ b/drivers/scsi/libfc/fc_fcp.c
|
||||
@@ -1039,11 +1039,26 @@ restart:
|
||||
fc_fcp_pkt_hold(fsp);
|
||||
spin_unlock_irqrestore(&si->scsi_queue_lock, flags);
|
||||
|
||||
- if (!fc_fcp_lock_pkt(fsp)) {
|
||||
+ spin_lock_bh(&fsp->scsi_pkt_lock);
|
||||
+ if (!(fsp->state & FC_SRB_COMPL)) {
|
||||
+ fsp->state |= FC_SRB_COMPL;
|
||||
+ /*
|
||||
+ * TODO: dropping scsi_pkt_lock and then reacquiring
|
||||
+ * again around fc_fcp_cleanup_cmd() is required,
|
||||
+ * since fc_fcp_cleanup_cmd() calls into
|
||||
+ * fc_seq_set_resp() and that func preempts cpu using
|
||||
+ * schedule. May be schedule and related code should be
|
||||
+ * removed instead of unlocking here to avoid scheduling
|
||||
+ * while atomic bug.
|
||||
+ */
|
||||
+ spin_unlock_bh(&fsp->scsi_pkt_lock);
|
||||
+
|
||||
fc_fcp_cleanup_cmd(fsp, error);
|
||||
+
|
||||
+ spin_lock_bh(&fsp->scsi_pkt_lock);
|
||||
fc_io_compl(fsp);
|
||||
- fc_fcp_unlock_pkt(fsp);
|
||||
}
|
||||
+ spin_unlock_bh(&fsp->scsi_pkt_lock);
|
||||
|
||||
fc_fcp_pkt_release(fsp);
|
||||
spin_lock_irqsave(&si->scsi_queue_lock, flags);
|
||||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
|
||||
index d7b717090f2f..2b5c3bc3b081 100644
|
||||
--- a/include/drm/drm_pciids.h
|
||||
+++ b/include/drm/drm_pciids.h
|
||||
@@ -150,6 +150,7 @@
|
||||
{0x1002, 0x6610, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6611, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6613, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \
|
||||
+ {0x1002, 0x6617, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6620, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6621, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
{0x1002, 0x6623, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
||||
diff --git a/ipc/sem.c b/ipc/sem.c
|
||||
index db9d241af133..47a15192b8b8 100644
|
||||
--- a/ipc/sem.c
|
||||
+++ b/ipc/sem.c
|
||||
@@ -253,6 +253,16 @@ static void sem_rcu_free(struct rcu_head *head)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * spin_unlock_wait() and !spin_is_locked() are not memory barriers, they
|
||||
+ * are only control barriers.
|
||||
+ * The code must pair with spin_unlock(&sem->lock) or
|
||||
+ * spin_unlock(&sem_perm.lock), thus just the control barrier is insufficient.
|
||||
+ *
|
||||
+ * smp_rmb() is sufficient, as writes cannot pass the control barrier.
|
||||
+ */
|
||||
+#define ipc_smp_acquire__after_spin_is_unlocked() smp_rmb()
|
||||
+
|
||||
+/*
|
||||
* Wait until all currently ongoing simple ops have completed.
|
||||
* Caller must own sem_perm.lock.
|
||||
* New simple ops cannot start, because simple ops first check
|
||||
@@ -275,6 +285,7 @@ static void sem_wait_array(struct sem_array *sma)
|
||||
sem = sma->sem_base + i;
|
||||
spin_unlock_wait(&sem->lock);
|
||||
}
|
||||
+ ipc_smp_acquire__after_spin_is_unlocked();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -326,8 +337,13 @@ static inline int sem_lock(struct sem_array *sma, struct sembuf *sops,
|
||||
|
||||
/* Then check that the global lock is free */
|
||||
if (!spin_is_locked(&sma->sem_perm.lock)) {
|
||||
- /* spin_is_locked() is not a memory barrier */
|
||||
- smp_mb();
|
||||
+ /*
|
||||
+ * We need a memory barrier with acquire semantics,
|
||||
+ * otherwise we can race with another thread that does:
|
||||
+ * complex_count++;
|
||||
+ * spin_unlock(sem_perm.lock);
|
||||
+ */
|
||||
+ ipc_smp_acquire__after_spin_is_unlocked();
|
||||
|
||||
/* Now repeat the test of complex_count:
|
||||
* It can't change anymore until we drop sem->lock.
|
||||
@@ -2049,17 +2065,28 @@ void exit_sem(struct task_struct *tsk)
|
||||
rcu_read_lock();
|
||||
un = list_entry_rcu(ulp->list_proc.next,
|
||||
struct sem_undo, list_proc);
|
||||
- if (&un->list_proc == &ulp->list_proc)
|
||||
- semid = -1;
|
||||
- else
|
||||
- semid = un->semid;
|
||||
+ if (&un->list_proc == &ulp->list_proc) {
|
||||
+ /*
|
||||
+ * We must wait for freeary() before freeing this ulp,
|
||||
+ * in case we raced with last sem_undo. There is a small
|
||||
+ * possibility where we exit while freeary() didn't
|
||||
+ * finish unlocking sem_undo_list.
|
||||
+ */
|
||||
+ spin_unlock_wait(&ulp->lock);
|
||||
+ rcu_read_unlock();
|
||||
+ break;
|
||||
+ }
|
||||
+ spin_lock(&ulp->lock);
|
||||
+ semid = un->semid;
|
||||
+ spin_unlock(&ulp->lock);
|
||||
|
||||
+ /* exit_sem raced with IPC_RMID, nothing to do */
|
||||
if (semid == -1) {
|
||||
rcu_read_unlock();
|
||||
- break;
|
||||
+ continue;
|
||||
}
|
||||
|
||||
- sma = sem_obtain_object_check(tsk->nsproxy->ipc_ns, un->semid);
|
||||
+ sma = sem_obtain_object_check(tsk->nsproxy->ipc_ns, semid);
|
||||
/* exit_sem raced with IPC_RMID, nothing to do */
|
||||
if (IS_ERR(sma)) {
|
||||
rcu_read_unlock();
|
||||
diff --git a/kernel/events/core.c b/kernel/events/core.c
|
||||
index 7daf52c340cd..d9b0aad17dbf 100644
|
||||
--- a/kernel/events/core.c
|
||||
+++ b/kernel/events/core.c
|
||||
@@ -3993,12 +3993,20 @@ static const struct file_operations perf_fops = {
|
||||
* to user-space before waking everybody up.
|
||||
*/
|
||||
|
||||
+static inline struct fasync_struct **perf_event_fasync(struct perf_event *event)
|
||||
+{
|
||||
+ /* only the parent has fasync state */
|
||||
+ if (event->parent)
|
||||
+ event = event->parent;
|
||||
+ return &event->fasync;
|
||||
+}
|
||||
+
|
||||
void perf_event_wakeup(struct perf_event *event)
|
||||
{
|
||||
ring_buffer_wakeup(event);
|
||||
|
||||
if (event->pending_kill) {
|
||||
- kill_fasync(&event->fasync, SIGIO, event->pending_kill);
|
||||
+ kill_fasync(perf_event_fasync(event), SIGIO, event->pending_kill);
|
||||
event->pending_kill = 0;
|
||||
}
|
||||
}
|
||||
@@ -5153,7 +5161,7 @@ static int __perf_event_overflow(struct perf_event *event,
|
||||
else
|
||||
perf_event_output(event, data, regs);
|
||||
|
||||
- if (event->fasync && event->pending_kill) {
|
||||
+ if (*perf_event_fasync(event) && event->pending_kill) {
|
||||
event->pending_wakeup = 1;
|
||||
irq_work_queue(&event->pending);
|
||||
}
|
||||
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
|
||||
index ca96f411b034..f97d709594e6 100644
|
||||
--- a/mm/memory-failure.c
|
||||
+++ b/mm/memory-failure.c
|
||||
@@ -1473,6 +1473,8 @@ static int get_any_page(struct page *page, unsigned long pfn, int flags)
|
||||
*/
|
||||
ret = __get_any_page(page, pfn, 0);
|
||||
if (!PageLRU(page)) {
|
||||
+ /* Drop page reference which is from __get_any_page() */
|
||||
+ put_page(page);
|
||||
pr_info("soft_offline: %#lx: unknown non LRU page type %lx\n",
|
||||
pfn, page->flags);
|
||||
return -EIO;
|
||||
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
|
||||
index 4606cdfb859d..7dd7c391b4d8 100644
|
||||
--- a/scripts/kconfig/streamline_config.pl
|
||||
+++ b/scripts/kconfig/streamline_config.pl
|
||||
@@ -137,7 +137,7 @@ my $ksource = ($ARGV[0] ? $ARGV[0] : '.');
|
||||
my $kconfig = $ARGV[1];
|
||||
my $lsmod_file = $ENV{'LSMOD'};
|
||||
|
||||
-my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
|
||||
+my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`;
|
||||
chomp @makefiles;
|
||||
|
||||
my %depends;
|
||||
@ -1,661 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index e94ce68ecf87..ca82393e1eea 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 88
|
||||
+SUBLEVEL = 89
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/x86/crypto/ghash-clmulni-intel_glue.c b/arch/x86/crypto/ghash-clmulni-intel_glue.c
|
||||
index a8d6f69f92a3..4bcf841e4701 100644
|
||||
--- a/arch/x86/crypto/ghash-clmulni-intel_glue.c
|
||||
+++ b/arch/x86/crypto/ghash-clmulni-intel_glue.c
|
||||
@@ -291,6 +291,7 @@ static struct ahash_alg ghash_async_alg = {
|
||||
.cra_name = "ghash",
|
||||
.cra_driver_name = "ghash-clmulni",
|
||||
.cra_priority = 400,
|
||||
+ .cra_ctxsize = sizeof(struct ghash_async_ctx),
|
||||
.cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = GHASH_BLOCK_SIZE,
|
||||
.cra_type = &crypto_ahash_type,
|
||||
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
|
||||
index 136224b74d4f..81250ece3062 100644
|
||||
--- a/arch/xtensa/Makefile
|
||||
+++ b/arch/xtensa/Makefile
|
||||
@@ -55,10 +55,10 @@ ifneq ($(CONFIG_LD_NO_RELAX),)
|
||||
LDFLAGS := --no-relax
|
||||
endif
|
||||
|
||||
-ifeq ($(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1)
|
||||
+ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1)
|
||||
CHECKFLAGS += -D__XTENSA_EB__
|
||||
endif
|
||||
-ifeq ($(shell echo -e __XTENSA_EL__ | $(CC) -E - | grep -v "\#"),1)
|
||||
+ifeq ($(shell echo __XTENSA_EL__ | $(CC) -E - | grep -v "\#"),1)
|
||||
CHECKFLAGS += -D__XTENSA_EL__
|
||||
endif
|
||||
|
||||
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
|
||||
index 64ffc4b53df6..ca20a892021b 100644
|
||||
--- a/arch/xtensa/boot/Makefile
|
||||
+++ b/arch/xtensa/boot/Makefile
|
||||
@@ -12,7 +12,7 @@
|
||||
KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
|
||||
HOSTFLAGS += -Iarch/$(ARCH)/boot/include
|
||||
|
||||
-BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
|
||||
+BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
|
||||
|
||||
export ccflags-y
|
||||
export BIG_ENDIAN
|
||||
diff --git a/arch/xtensa/include/asm/traps.h b/arch/xtensa/include/asm/traps.h
|
||||
index f2faa58f9a43..03d02df47b9a 100644
|
||||
--- a/arch/xtensa/include/asm/traps.h
|
||||
+++ b/arch/xtensa/include/asm/traps.h
|
||||
@@ -24,30 +24,39 @@ static inline void spill_registers(void)
|
||||
{
|
||||
#if XCHAL_NUM_AREGS > 16
|
||||
__asm__ __volatile__ (
|
||||
- " call12 1f\n"
|
||||
+ " call8 1f\n"
|
||||
" _j 2f\n"
|
||||
" retw\n"
|
||||
" .align 4\n"
|
||||
"1:\n"
|
||||
+#if XCHAL_NUM_AREGS == 32
|
||||
+ " _entry a1, 32\n"
|
||||
+ " addi a8, a0, 3\n"
|
||||
+ " _entry a1, 16\n"
|
||||
+ " mov a12, a12\n"
|
||||
+ " retw\n"
|
||||
+#else
|
||||
" _entry a1, 48\n"
|
||||
- " addi a12, a0, 3\n"
|
||||
-#if XCHAL_NUM_AREGS > 32
|
||||
- " .rept (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n"
|
||||
+ " call12 1f\n"
|
||||
+ " retw\n"
|
||||
+ " .align 4\n"
|
||||
+ "1:\n"
|
||||
+ " .rept (" __stringify(XCHAL_NUM_AREGS) " - 16) / 12\n"
|
||||
" _entry a1, 48\n"
|
||||
" mov a12, a0\n"
|
||||
" .endr\n"
|
||||
-#endif
|
||||
- " _entry a1, 48\n"
|
||||
+ " _entry a1, 16\n"
|
||||
#if XCHAL_NUM_AREGS % 12 == 0
|
||||
- " mov a8, a8\n"
|
||||
-#elif XCHAL_NUM_AREGS % 12 == 4
|
||||
" mov a12, a12\n"
|
||||
-#elif XCHAL_NUM_AREGS % 12 == 8
|
||||
+#elif XCHAL_NUM_AREGS % 12 == 4
|
||||
" mov a4, a4\n"
|
||||
+#elif XCHAL_NUM_AREGS % 12 == 8
|
||||
+ " mov a8, a8\n"
|
||||
#endif
|
||||
" retw\n"
|
||||
+#endif
|
||||
"2:\n"
|
||||
- : : : "a12", "a13", "memory");
|
||||
+ : : : "a8", "a9", "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
" mov a12, a12\n"
|
||||
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
|
||||
index 6e53174f8556..b268d3cc01d1 100644
|
||||
--- a/arch/xtensa/kernel/entry.S
|
||||
+++ b/arch/xtensa/kernel/entry.S
|
||||
@@ -549,12 +549,13 @@ user_exception_exit:
|
||||
* (if we have restored WSBITS-1 frames).
|
||||
*/
|
||||
|
||||
+2:
|
||||
#if XCHAL_HAVE_THREADPTR
|
||||
l32i a3, a1, PT_THREADPTR
|
||||
wur a3, threadptr
|
||||
#endif
|
||||
|
||||
-2: j common_exception_exit
|
||||
+ j common_exception_exit
|
||||
|
||||
/* This is the kernel exception exit.
|
||||
* We avoided to do a MOVSP when we entered the exception, but we
|
||||
@@ -1933,7 +1934,7 @@ ENDPROC(system_call)
|
||||
mov a12, a0
|
||||
.endr
|
||||
#endif
|
||||
- _entry a1, 48
|
||||
+ _entry a1, 16
|
||||
#if XCHAL_NUM_AREGS % 12 == 0
|
||||
mov a8, a8
|
||||
#elif XCHAL_NUM_AREGS % 12 == 4
|
||||
@@ -1957,7 +1958,7 @@ ENDPROC(system_call)
|
||||
|
||||
ENTRY(_switch_to)
|
||||
|
||||
- entry a1, 16
|
||||
+ entry a1, 48
|
||||
|
||||
mov a11, a3 # and 'next' (a3)
|
||||
|
||||
diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c
|
||||
index 5b93852392b8..0d752851a1ee 100644
|
||||
--- a/drivers/auxdisplay/ks0108.c
|
||||
+++ b/drivers/auxdisplay/ks0108.c
|
||||
@@ -139,6 +139,7 @@ static int __init ks0108_init(void)
|
||||
|
||||
ks0108_pardevice = parport_register_device(ks0108_parport, KS0108_NAME,
|
||||
NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);
|
||||
+ parport_put_port(ks0108_parport);
|
||||
if (ks0108_pardevice == NULL) {
|
||||
printk(KERN_ERR KS0108_NAME ": ERROR: "
|
||||
"parport didn't register new device\n");
|
||||
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
|
||||
index 507379e7b763..4e2fb405da87 100644
|
||||
--- a/drivers/base/devres.c
|
||||
+++ b/drivers/base/devres.c
|
||||
@@ -296,10 +296,10 @@ void * devres_get(struct device *dev, void *new_res,
|
||||
if (!dr) {
|
||||
add_dr(dev, &new_dr->node);
|
||||
dr = new_dr;
|
||||
- new_dr = NULL;
|
||||
+ new_res = NULL;
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->devres_lock, flags);
|
||||
- devres_free(new_dr);
|
||||
+ devres_free(new_res);
|
||||
|
||||
return dr->data;
|
||||
}
|
||||
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
|
||||
index 9eda84246ffd..8717be5093a2 100644
|
||||
--- a/drivers/base/platform.c
|
||||
+++ b/drivers/base/platform.c
|
||||
@@ -347,9 +347,7 @@ int platform_device_add(struct platform_device *pdev)
|
||||
|
||||
while (--i >= 0) {
|
||||
struct resource *r = &pdev->resource[i];
|
||||
- unsigned long type = resource_type(r);
|
||||
-
|
||||
- if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
|
||||
+ if (r->parent)
|
||||
release_resource(r);
|
||||
}
|
||||
|
||||
@@ -380,9 +378,7 @@ void platform_device_del(struct platform_device *pdev)
|
||||
|
||||
for (i = 0; i < pdev->num_resources; i++) {
|
||||
struct resource *r = &pdev->resource[i];
|
||||
- unsigned long type = resource_type(r);
|
||||
-
|
||||
- if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
|
||||
+ if (r->parent)
|
||||
release_resource(r);
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
|
||||
index bf9b15a585e1..b9e05bde0c06 100644
|
||||
--- a/drivers/clk/versatile/clk-sp810.c
|
||||
+++ b/drivers/clk/versatile/clk-sp810.c
|
||||
@@ -128,8 +128,8 @@ struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec,
|
||||
{
|
||||
struct clk_sp810 *sp810 = data;
|
||||
|
||||
- if (WARN_ON(clkspec->args_count != 1 || clkspec->args[0] >
|
||||
- ARRAY_SIZE(sp810->timerclken)))
|
||||
+ if (WARN_ON(clkspec->args_count != 1 ||
|
||||
+ clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken)))
|
||||
return NULL;
|
||||
|
||||
return sp810->timerclken[clkspec->args[0]].clk;
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
index fc604fc75797..1fbd38b371d4 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
|
||||
@@ -78,6 +78,11 @@ void radeon_connector_hotplug(struct drm_connector *connector)
|
||||
if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
|
||||
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
|
||||
} else if (radeon_dp_needs_link_train(radeon_connector)) {
|
||||
+ /* Don't try to start link training before we
|
||||
+ * have the dpcd */
|
||||
+ if (!radeon_dp_getdpcd(radeon_connector))
|
||||
+ return;
|
||||
+
|
||||
/* set it to OFF so that drm_helper_connector_dpms()
|
||||
* won't return immediately since the current state
|
||||
* is ON at this point.
|
||||
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
|
||||
index ada164e1b3a1..de904e6a4ab7 100644
|
||||
--- a/drivers/hid/usbhid/hid-core.c
|
||||
+++ b/drivers/hid/usbhid/hid-core.c
|
||||
@@ -180,7 +180,7 @@ static void hid_io_error(struct hid_device *hid)
|
||||
if (time_after(jiffies, usbhid->stop_retry)) {
|
||||
|
||||
/* Retries failed, so do a port reset unless we lack bandwidth*/
|
||||
- if (test_bit(HID_NO_BANDWIDTH, &usbhid->iofl)
|
||||
+ if (!test_bit(HID_NO_BANDWIDTH, &usbhid->iofl)
|
||||
&& !test_and_set_bit(HID_RESET_PENDING, &usbhid->iofl)) {
|
||||
|
||||
schedule_work(&usbhid->reset_work);
|
||||
diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig
|
||||
index 107cafcb89da..953a0621c6fe 100644
|
||||
--- a/drivers/iio/gyro/Kconfig
|
||||
+++ b/drivers/iio/gyro/Kconfig
|
||||
@@ -73,7 +73,8 @@ config IIO_ST_GYRO_SPI_3AXIS
|
||||
config ITG3200
|
||||
tristate "InvenSense ITG3200 Digital 3-Axis Gyroscope I2C driver"
|
||||
depends on I2C
|
||||
- select IIO_TRIGGERED_BUFFER if IIO_BUFFER
|
||||
+ select IIO_BUFFER
|
||||
+ select IIO_TRIGGERED_BUFFER
|
||||
help
|
||||
Say yes here to add support for the InvenSense ITG3200 digital
|
||||
3-axis gyroscope sensor.
|
||||
diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
|
||||
index b7db38376295..b0d05e88087c 100644
|
||||
--- a/drivers/iio/imu/adis16480.c
|
||||
+++ b/drivers/iio/imu/adis16480.c
|
||||
@@ -110,6 +110,10 @@
|
||||
struct adis16480_chip_info {
|
||||
unsigned int num_channels;
|
||||
const struct iio_chan_spec *channels;
|
||||
+ unsigned int gyro_max_val;
|
||||
+ unsigned int gyro_max_scale;
|
||||
+ unsigned int accel_max_val;
|
||||
+ unsigned int accel_max_scale;
|
||||
};
|
||||
|
||||
struct adis16480 {
|
||||
@@ -533,19 +537,21 @@ static int adis16480_set_filter_freq(struct iio_dev *indio_dev,
|
||||
static int adis16480_read_raw(struct iio_dev *indio_dev,
|
||||
const struct iio_chan_spec *chan, int *val, int *val2, long info)
|
||||
{
|
||||
+ struct adis16480 *st = iio_priv(indio_dev);
|
||||
+
|
||||
switch (info) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
return adis_single_conversion(indio_dev, chan, 0, val);
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
switch (chan->type) {
|
||||
case IIO_ANGL_VEL:
|
||||
- *val = 0;
|
||||
- *val2 = IIO_DEGREE_TO_RAD(20000); /* 0.02 degree/sec */
|
||||
- return IIO_VAL_INT_PLUS_MICRO;
|
||||
+ *val = st->chip_info->gyro_max_scale;
|
||||
+ *val2 = st->chip_info->gyro_max_val;
|
||||
+ return IIO_VAL_FRACTIONAL;
|
||||
case IIO_ACCEL:
|
||||
- *val = 0;
|
||||
- *val2 = IIO_G_TO_M_S_2(800); /* 0.8 mg */
|
||||
- return IIO_VAL_INT_PLUS_MICRO;
|
||||
+ *val = st->chip_info->accel_max_scale;
|
||||
+ *val2 = st->chip_info->accel_max_val;
|
||||
+ return IIO_VAL_FRACTIONAL;
|
||||
case IIO_MAGN:
|
||||
*val = 0;
|
||||
*val2 = 100; /* 0.0001 gauss */
|
||||
@@ -702,18 +708,39 @@ static const struct adis16480_chip_info adis16480_chip_info[] = {
|
||||
[ADIS16375] = {
|
||||
.channels = adis16485_channels,
|
||||
.num_channels = ARRAY_SIZE(adis16485_channels),
|
||||
+ /*
|
||||
+ * storing the value in rad/degree and the scale in degree
|
||||
+ * gives us the result in rad and better precession than
|
||||
+ * storing the scale directly in rad.
|
||||
+ */
|
||||
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22887),
|
||||
+ .gyro_max_scale = 300,
|
||||
+ .accel_max_val = IIO_M_S_2_TO_G(21973),
|
||||
+ .accel_max_scale = 18,
|
||||
},
|
||||
[ADIS16480] = {
|
||||
.channels = adis16480_channels,
|
||||
.num_channels = ARRAY_SIZE(adis16480_channels),
|
||||
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
|
||||
+ .gyro_max_scale = 450,
|
||||
+ .accel_max_val = IIO_M_S_2_TO_G(12500),
|
||||
+ .accel_max_scale = 5,
|
||||
},
|
||||
[ADIS16485] = {
|
||||
.channels = adis16485_channels,
|
||||
.num_channels = ARRAY_SIZE(adis16485_channels),
|
||||
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
|
||||
+ .gyro_max_scale = 450,
|
||||
+ .accel_max_val = IIO_M_S_2_TO_G(20000),
|
||||
+ .accel_max_scale = 5,
|
||||
},
|
||||
[ADIS16488] = {
|
||||
.channels = adis16480_channels,
|
||||
.num_channels = ARRAY_SIZE(adis16480_channels),
|
||||
+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
|
||||
+ .gyro_max_scale = 450,
|
||||
+ .accel_max_val = IIO_M_S_2_TO_G(22500),
|
||||
+ .accel_max_scale = 18,
|
||||
},
|
||||
};
|
||||
|
||||
diff --git a/drivers/of/address.c b/drivers/of/address.c
|
||||
index 8fb2b5769733..9ceff3c86d74 100644
|
||||
--- a/drivers/of/address.c
|
||||
+++ b/drivers/of/address.c
|
||||
@@ -629,10 +629,10 @@ struct device_node *of_find_matching_node_by_address(struct device_node *from,
|
||||
struct resource res;
|
||||
|
||||
while (dn) {
|
||||
- if (of_address_to_resource(dn, 0, &res))
|
||||
- continue;
|
||||
- if (res.start == base_address)
|
||||
+ if (!of_address_to_resource(dn, 0, &res) &&
|
||||
+ res.start == base_address)
|
||||
return dn;
|
||||
+
|
||||
dn = of_find_matching_node(dn, matches);
|
||||
}
|
||||
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index 910339c0791f..390e4094e4d5 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -2796,12 +2796,15 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
|
||||
|
||||
static void fixup_ti816x_class(struct pci_dev *dev)
|
||||
{
|
||||
+ u32 class = dev->class;
|
||||
+
|
||||
/* TI 816x devices do not have class code set when in PCIe boot mode */
|
||||
- dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
|
||||
- dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
|
||||
+ dev->class = PCI_CLASS_MULTIMEDIA_VIDEO << 8;
|
||||
+ dev_info(&dev->dev, "PCI class overridden (%#08x -> %#08x)\n",
|
||||
+ class, dev->class);
|
||||
}
|
||||
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800,
|
||||
- PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
|
||||
+ PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
|
||||
|
||||
/* Some PCIe devices do not work reliably with the claimed maximum
|
||||
* payload size supported.
|
||||
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
|
||||
index 35d9ab95c5cb..91b14202b90b 100644
|
||||
--- a/drivers/tty/serial/8250/8250_pnp.c
|
||||
+++ b/drivers/tty/serial/8250/8250_pnp.c
|
||||
@@ -365,6 +365,11 @@ static const struct pnp_device_id pnp_dev_table[] = {
|
||||
/* Winbond CIR port, should not be probed. We should keep track
|
||||
of it to prevent the legacy serial driver from probing it */
|
||||
{ "WEC1022", CIR_PORT },
|
||||
+ /*
|
||||
+ * SMSC IrCC SIR/FIR port, should not be probed by serial driver
|
||||
+ * as well so its own driver can bind to it.
|
||||
+ */
|
||||
+ { "SMCF010", CIR_PORT },
|
||||
{ "", 0 }
|
||||
};
|
||||
|
||||
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
|
||||
index 57d7ec6c8090..27040a6314d4 100644
|
||||
--- a/drivers/usb/dwc3/ep0.c
|
||||
+++ b/drivers/usb/dwc3/ep0.c
|
||||
@@ -804,6 +804,11 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
|
||||
unsigned maxp = ep0->endpoint.maxpacket;
|
||||
|
||||
transfer_size += (maxp - (transfer_size % maxp));
|
||||
+
|
||||
+ /* Maximum of DWC3_EP0_BOUNCE_SIZE can only be received */
|
||||
+ if (transfer_size > DWC3_EP0_BOUNCE_SIZE)
|
||||
+ transfer_size = DWC3_EP0_BOUNCE_SIZE;
|
||||
+
|
||||
transferred = min_t(u32, ur->length,
|
||||
transfer_size - length);
|
||||
memcpy(ur->buf, dwc->ep0_bounce, transferred);
|
||||
@@ -916,11 +921,14 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
|
||||
return;
|
||||
}
|
||||
|
||||
- WARN_ON(req->request.length > DWC3_EP0_BOUNCE_SIZE);
|
||||
-
|
||||
maxpacket = dep->endpoint.maxpacket;
|
||||
transfer_size = roundup(req->request.length, maxpacket);
|
||||
|
||||
+ if (transfer_size > DWC3_EP0_BOUNCE_SIZE) {
|
||||
+ dev_WARN(dwc->dev, "bounce buf can't handle req len\n");
|
||||
+ transfer_size = DWC3_EP0_BOUNCE_SIZE;
|
||||
+ }
|
||||
+
|
||||
dwc->ep0_bounced = true;
|
||||
|
||||
/*
|
||||
diff --git a/drivers/usb/host/ehci-sysfs.c b/drivers/usb/host/ehci-sysfs.c
|
||||
index 14ced00ba220..0659024290af 100644
|
||||
--- a/drivers/usb/host/ehci-sysfs.c
|
||||
+++ b/drivers/usb/host/ehci-sysfs.c
|
||||
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,
|
||||
int count = PAGE_SIZE;
|
||||
char *ptr = buf;
|
||||
|
||||
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
||||
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
||||
nports = HCS_N_PORTS(ehci->hcs_params);
|
||||
|
||||
for (index = 0; index < nports; ++index) {
|
||||
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,
|
||||
struct ehci_hcd *ehci;
|
||||
int portnum, new_owner;
|
||||
|
||||
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
||||
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
||||
new_owner = PORT_OWNER; /* Owned by companion */
|
||||
if (sscanf(buf, "%d", &portnum) != 1)
|
||||
return -EINVAL;
|
||||
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,
|
||||
struct ehci_hcd *ehci;
|
||||
int n;
|
||||
|
||||
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
||||
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
||||
n = scnprintf(buf, PAGE_SIZE, "%d\n", ehci->uframe_periodic_max);
|
||||
return n;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,
|
||||
unsigned long flags;
|
||||
ssize_t ret;
|
||||
|
||||
- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
|
||||
+ ehci = hcd_to_ehci(dev_get_drvdata(dev));
|
||||
if (kstrtouint(buf, 0, &uframe_periodic_max) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
|
||||
index b55e5f3a311d..514f3117ee2b 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio.c
|
||||
+++ b/drivers/usb/serial/ftdi_sio.c
|
||||
@@ -621,6 +621,10 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) },
|
||||
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) },
|
||||
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) },
|
||||
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2WI_PID) },
|
||||
+ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX3_PID) },
|
||||
/*
|
||||
* ELV devices:
|
||||
*/
|
||||
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
index 99316d7cfc03..bfb0ecd98808 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio_ids.h
|
||||
+++ b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
@@ -568,6 +568,14 @@
|
||||
*/
|
||||
#define FTDI_SYNAPSE_SS200_PID 0x9090 /* SS200 - SNAP Stick 200 */
|
||||
|
||||
+/*
|
||||
+ * CustomWare / ShipModul NMEA multiplexers product ids (FTDI_VID)
|
||||
+ */
|
||||
+#define FTDI_CUSTOMWARE_MINIPLEX_PID 0xfd48 /* MiniPlex first generation NMEA Multiplexer */
|
||||
+#define FTDI_CUSTOMWARE_MINIPLEX2_PID 0xfd49 /* MiniPlex-USB and MiniPlex-2 series */
|
||||
+#define FTDI_CUSTOMWARE_MINIPLEX2WI_PID 0xfd4a /* MiniPlex-2Wi */
|
||||
+#define FTDI_CUSTOMWARE_MINIPLEX3_PID 0xfd4b /* MiniPlex-3 series */
|
||||
+
|
||||
|
||||
/********************************/
|
||||
/** third-party VID/PID combos **/
|
||||
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
|
||||
index 9b1648945e7a..1e2d86d4f539 100644
|
||||
--- a/drivers/usb/serial/symbolserial.c
|
||||
+++ b/drivers/usb/serial/symbolserial.c
|
||||
@@ -97,7 +97,7 @@ exit:
|
||||
|
||||
static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
{
|
||||
- struct symbol_private *priv = usb_get_serial_data(port->serial);
|
||||
+ struct symbol_private *priv = usb_get_serial_port_data(port);
|
||||
unsigned long flags;
|
||||
int result = 0;
|
||||
|
||||
@@ -123,7 +123,7 @@ static void symbol_close(struct usb_serial_port *port)
|
||||
static void symbol_throttle(struct tty_struct *tty)
|
||||
{
|
||||
struct usb_serial_port *port = tty->driver_data;
|
||||
- struct symbol_private *priv = usb_get_serial_data(port->serial);
|
||||
+ struct symbol_private *priv = usb_get_serial_port_data(port);
|
||||
|
||||
spin_lock_irq(&priv->lock);
|
||||
priv->throttled = true;
|
||||
@@ -133,7 +133,7 @@ static void symbol_throttle(struct tty_struct *tty)
|
||||
static void symbol_unthrottle(struct tty_struct *tty)
|
||||
{
|
||||
struct usb_serial_port *port = tty->driver_data;
|
||||
- struct symbol_private *priv = usb_get_serial_data(port->serial);
|
||||
+ struct symbol_private *priv = usb_get_serial_port_data(port);
|
||||
int result;
|
||||
bool was_throttled;
|
||||
|
||||
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
|
||||
index 345713d2f8f3..6b42789ae799 100644
|
||||
--- a/fs/hpfs/namei.c
|
||||
+++ b/fs/hpfs/namei.c
|
||||
@@ -8,6 +8,17 @@
|
||||
#include <linux/sched.h>
|
||||
#include "hpfs_fn.h"
|
||||
|
||||
+static void hpfs_update_directory_times(struct inode *dir)
|
||||
+{
|
||||
+ time_t t = get_seconds();
|
||||
+ if (t == dir->i_mtime.tv_sec &&
|
||||
+ t == dir->i_ctime.tv_sec)
|
||||
+ return;
|
||||
+ dir->i_mtime.tv_sec = dir->i_ctime.tv_sec = t;
|
||||
+ dir->i_mtime.tv_nsec = dir->i_ctime.tv_nsec = 0;
|
||||
+ hpfs_write_inode_nolock(dir);
|
||||
+}
|
||||
+
|
||||
static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
const unsigned char *name = dentry->d_name.name;
|
||||
@@ -99,6 +110,7 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
result->i_mode = mode | S_IFDIR;
|
||||
hpfs_write_inode_nolock(result);
|
||||
}
|
||||
+ hpfs_update_directory_times(dir);
|
||||
d_instantiate(dentry, result);
|
||||
hpfs_unlock(dir->i_sb);
|
||||
return 0;
|
||||
@@ -187,6 +199,7 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, b
|
||||
result->i_mode = mode | S_IFREG;
|
||||
hpfs_write_inode_nolock(result);
|
||||
}
|
||||
+ hpfs_update_directory_times(dir);
|
||||
d_instantiate(dentry, result);
|
||||
hpfs_unlock(dir->i_sb);
|
||||
return 0;
|
||||
@@ -262,6 +275,7 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de
|
||||
insert_inode_hash(result);
|
||||
|
||||
hpfs_write_inode_nolock(result);
|
||||
+ hpfs_update_directory_times(dir);
|
||||
d_instantiate(dentry, result);
|
||||
brelse(bh);
|
||||
hpfs_unlock(dir->i_sb);
|
||||
@@ -340,6 +354,7 @@ static int hpfs_symlink(struct inode *dir, struct dentry *dentry, const char *sy
|
||||
insert_inode_hash(result);
|
||||
|
||||
hpfs_write_inode_nolock(result);
|
||||
+ hpfs_update_directory_times(dir);
|
||||
d_instantiate(dentry, result);
|
||||
hpfs_unlock(dir->i_sb);
|
||||
return 0;
|
||||
@@ -423,6 +438,8 @@ again:
|
||||
out1:
|
||||
hpfs_brelse4(&qbh);
|
||||
out:
|
||||
+ if (!err)
|
||||
+ hpfs_update_directory_times(dir);
|
||||
hpfs_unlock(dir->i_sb);
|
||||
return err;
|
||||
}
|
||||
@@ -477,6 +494,8 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
out1:
|
||||
hpfs_brelse4(&qbh);
|
||||
out:
|
||||
+ if (!err)
|
||||
+ hpfs_update_directory_times(dir);
|
||||
hpfs_unlock(dir->i_sb);
|
||||
return err;
|
||||
}
|
||||
@@ -595,7 +614,7 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
goto end1;
|
||||
}
|
||||
|
||||
- end:
|
||||
+end:
|
||||
hpfs_i(i)->i_parent_dir = new_dir->i_ino;
|
||||
if (S_ISDIR(i->i_mode)) {
|
||||
inc_nlink(new_dir);
|
||||
@@ -610,6 +629,10 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
brelse(bh);
|
||||
}
|
||||
end1:
|
||||
+ if (!err) {
|
||||
+ hpfs_update_directory_times(old_dir);
|
||||
+ hpfs_update_directory_times(new_dir);
|
||||
+ }
|
||||
hpfs_unlock(i->i_sb);
|
||||
return err;
|
||||
}
|
||||
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
|
||||
index 3d35b7023591..683911167953 100644
|
||||
--- a/include/linux/iio/iio.h
|
||||
+++ b/include/linux/iio/iio.h
|
||||
@@ -569,6 +569,15 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
|
||||
#define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL)
|
||||
|
||||
/**
|
||||
+ * IIO_RAD_TO_DEGREE() - Convert rad to degree
|
||||
+ * @rad: A value in rad
|
||||
+ *
|
||||
+ * Returns the given value converted from rad to degree
|
||||
+ */
|
||||
+#define IIO_RAD_TO_DEGREE(rad) \
|
||||
+ (((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL)
|
||||
+
|
||||
+/**
|
||||
* IIO_G_TO_M_S_2() - Convert g to meter / second**2
|
||||
* @g: A value in g
|
||||
*
|
||||
@@ -576,4 +585,12 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
|
||||
*/
|
||||
#define IIO_G_TO_M_S_2(g) ((g) * 980665ULL / 100000ULL)
|
||||
|
||||
+/**
|
||||
+ * IIO_M_S_2_TO_G() - Convert meter / second**2 to g
|
||||
+ * @ms2: A value in meter / second**2
|
||||
+ *
|
||||
+ * Returns the given value converted from meter / second**2 to g
|
||||
+ */
|
||||
+#define IIO_M_S_2_TO_G(ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL)
|
||||
+
|
||||
#endif /* _INDUSTRIAL_IO_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,413 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ba6a94cf354b..25701b67bb6d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 91
|
||||
+SUBLEVEL = 92
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/m68k/include/asm/uaccess_mm.h b/arch/m68k/include/asm/uaccess_mm.h
|
||||
index 472c891a4aee..15901db435b9 100644
|
||||
--- a/arch/m68k/include/asm/uaccess_mm.h
|
||||
+++ b/arch/m68k/include/asm/uaccess_mm.h
|
||||
@@ -90,7 +90,7 @@ asm volatile ("\n" \
|
||||
__put_user_asm(__pu_err, __pu_val, ptr, b, d, -EFAULT); \
|
||||
break; \
|
||||
case 2: \
|
||||
- __put_user_asm(__pu_err, __pu_val, ptr, w, d, -EFAULT); \
|
||||
+ __put_user_asm(__pu_err, __pu_val, ptr, w, r, -EFAULT); \
|
||||
break; \
|
||||
case 4: \
|
||||
__put_user_asm(__pu_err, __pu_val, ptr, l, r, -EFAULT); \
|
||||
@@ -158,7 +158,7 @@ asm volatile ("\n" \
|
||||
__get_user_asm(__gu_err, x, ptr, u8, b, d, -EFAULT); \
|
||||
break; \
|
||||
case 2: \
|
||||
- __get_user_asm(__gu_err, x, ptr, u16, w, d, -EFAULT); \
|
||||
+ __get_user_asm(__gu_err, x, ptr, u16, w, r, -EFAULT); \
|
||||
break; \
|
||||
case 4: \
|
||||
__get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT); \
|
||||
@@ -245,7 +245,7 @@ __constant_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
__get_user_asm(res, *(u8 *)to, (u8 __user *)from, u8, b, d, 1);
|
||||
break;
|
||||
case 2:
|
||||
- __get_user_asm(res, *(u16 *)to, (u16 __user *)from, u16, w, d, 2);
|
||||
+ __get_user_asm(res, *(u16 *)to, (u16 __user *)from, u16, w, r, 2);
|
||||
break;
|
||||
case 3:
|
||||
__constant_copy_from_user_asm(res, to, from, tmp, 3, w, b,);
|
||||
@@ -326,7 +326,7 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
__put_user_asm(res, *(u8 *)from, (u8 __user *)to, b, d, 1);
|
||||
break;
|
||||
case 2:
|
||||
- __put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, d, 2);
|
||||
+ __put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, r, 2);
|
||||
break;
|
||||
case 3:
|
||||
__constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,);
|
||||
diff --git a/arch/m68k/lib/uaccess.c b/arch/m68k/lib/uaccess.c
|
||||
index 5e97f2ee7c11..35d1442dee89 100644
|
||||
--- a/arch/m68k/lib/uaccess.c
|
||||
+++ b/arch/m68k/lib/uaccess.c
|
||||
@@ -52,7 +52,7 @@ unsigned long __generic_copy_from_user(void *to, const void __user *from,
|
||||
" .long 3b,30b\n"
|
||||
" .long 5b,50b\n"
|
||||
" .previous"
|
||||
- : "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp)
|
||||
+ : "=d" (res), "+a" (from), "+a" (to), "=&d" (tmp)
|
||||
: "0" (n / 4), "d" (n & 3));
|
||||
|
||||
return res;
|
||||
@@ -96,7 +96,7 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,
|
||||
" .long 7b,50b\n"
|
||||
" .long 8b,50b\n"
|
||||
" .previous"
|
||||
- : "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp)
|
||||
+ : "=d" (res), "+a" (from), "+a" (to), "=&d" (tmp)
|
||||
: "0" (n / 4), "d" (n & 3));
|
||||
|
||||
return res;
|
||||
@@ -141,7 +141,7 @@ unsigned long __clear_user(void __user *to, unsigned long n)
|
||||
" .long 7b,40b\n"
|
||||
" .previous"
|
||||
: "=d" (res), "+a" (to)
|
||||
- : "r" (0), "0" (n / 4), "d" (n & 3));
|
||||
+ : "d" (0), "0" (n / 4), "d" (n & 3));
|
||||
|
||||
return res;
|
||||
}
|
||||
diff --git a/arch/sparc/crypto/aes_glue.c b/arch/sparc/crypto/aes_glue.c
|
||||
index ded4cee35318..dc78cdd43e0a 100644
|
||||
--- a/arch/sparc/crypto/aes_glue.c
|
||||
+++ b/arch/sparc/crypto/aes_glue.c
|
||||
@@ -433,6 +433,7 @@ static struct crypto_alg algs[] = { {
|
||||
.blkcipher = {
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
+ .ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = aes_set_key,
|
||||
.encrypt = cbc_encrypt,
|
||||
.decrypt = cbc_decrypt,
|
||||
@@ -452,6 +453,7 @@ static struct crypto_alg algs[] = { {
|
||||
.blkcipher = {
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
+ .ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = aes_set_key,
|
||||
.encrypt = ctr_crypt,
|
||||
.decrypt = ctr_crypt,
|
||||
diff --git a/arch/sparc/crypto/camellia_glue.c b/arch/sparc/crypto/camellia_glue.c
|
||||
index 641f55cb61c3..eb87d6dd86b1 100644
|
||||
--- a/arch/sparc/crypto/camellia_glue.c
|
||||
+++ b/arch/sparc/crypto/camellia_glue.c
|
||||
@@ -274,6 +274,7 @@ static struct crypto_alg algs[] = { {
|
||||
.blkcipher = {
|
||||
.min_keysize = CAMELLIA_MIN_KEY_SIZE,
|
||||
.max_keysize = CAMELLIA_MAX_KEY_SIZE,
|
||||
+ .ivsize = CAMELLIA_BLOCK_SIZE,
|
||||
.setkey = camellia_set_key,
|
||||
.encrypt = cbc_encrypt,
|
||||
.decrypt = cbc_decrypt,
|
||||
diff --git a/arch/sparc/crypto/des_glue.c b/arch/sparc/crypto/des_glue.c
|
||||
index d11500972994..1359bfc544e4 100644
|
||||
--- a/arch/sparc/crypto/des_glue.c
|
||||
+++ b/arch/sparc/crypto/des_glue.c
|
||||
@@ -429,6 +429,7 @@ static struct crypto_alg algs[] = { {
|
||||
.blkcipher = {
|
||||
.min_keysize = DES_KEY_SIZE,
|
||||
.max_keysize = DES_KEY_SIZE,
|
||||
+ .ivsize = DES_BLOCK_SIZE,
|
||||
.setkey = des_set_key,
|
||||
.encrypt = cbc_encrypt,
|
||||
.decrypt = cbc_decrypt,
|
||||
@@ -485,6 +486,7 @@ static struct crypto_alg algs[] = { {
|
||||
.blkcipher = {
|
||||
.min_keysize = DES3_EDE_KEY_SIZE,
|
||||
.max_keysize = DES3_EDE_KEY_SIZE,
|
||||
+ .ivsize = DES3_EDE_BLOCK_SIZE,
|
||||
.setkey = des3_ede_set_key,
|
||||
.encrypt = cbc3_encrypt,
|
||||
.decrypt = cbc3_decrypt,
|
||||
diff --git a/crypto/ahash.c b/crypto/ahash.c
|
||||
index 793a27f2493e..857ae2b2a2a2 100644
|
||||
--- a/crypto/ahash.c
|
||||
+++ b/crypto/ahash.c
|
||||
@@ -462,7 +462,8 @@ static int ahash_prepare_alg(struct ahash_alg *alg)
|
||||
struct crypto_alg *base = &alg->halg.base;
|
||||
|
||||
if (alg->halg.digestsize > PAGE_SIZE / 8 ||
|
||||
- alg->halg.statesize > PAGE_SIZE / 8)
|
||||
+ alg->halg.statesize > PAGE_SIZE / 8 ||
|
||||
+ alg->halg.statesize == 0)
|
||||
return -EINVAL;
|
||||
|
||||
base->cra_type = &crypto_ahash_type;
|
||||
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
|
||||
index 01677543248d..2fa22c24fa5d 100644
|
||||
--- a/drivers/block/rbd.c
|
||||
+++ b/drivers/block/rbd.c
|
||||
@@ -4860,7 +4860,6 @@ static int rbd_dev_probe_parent(struct rbd_device *rbd_dev)
|
||||
out_err:
|
||||
if (parent) {
|
||||
rbd_dev_unparent(rbd_dev);
|
||||
- kfree(rbd_dev->header_name);
|
||||
rbd_dev_destroy(parent);
|
||||
} else {
|
||||
rbd_put_client(rbdc);
|
||||
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
|
||||
index 8a806f5c40cf..3f2dbd1ce6a3 100644
|
||||
--- a/drivers/i2c/busses/i2c-rcar.c
|
||||
+++ b/drivers/i2c/busses/i2c-rcar.c
|
||||
@@ -673,15 +673,16 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ pm_runtime_enable(dev);
|
||||
+ platform_set_drvdata(pdev, priv);
|
||||
+
|
||||
ret = i2c_add_numbered_adapter(adap);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "reg adap failed: %d\n", ret);
|
||||
+ pm_runtime_disable(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
- pm_runtime_enable(dev);
|
||||
- platform_set_drvdata(pdev, priv);
|
||||
-
|
||||
dev_info(dev, "probed\n");
|
||||
|
||||
return 0;
|
||||
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
|
||||
index 39996ca58ce6..ec56072c6326 100644
|
||||
--- a/drivers/md/dm-thin.c
|
||||
+++ b/drivers/md/dm-thin.c
|
||||
@@ -2109,7 +2109,7 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
metadata_low_callback,
|
||||
pool);
|
||||
if (r)
|
||||
- goto out_free_pt;
|
||||
+ goto out_flags_changed;
|
||||
|
||||
pt->callbacks.congested_fn = pool_is_congested;
|
||||
dm_table_add_target_callbacks(ti->table, &pt->callbacks);
|
||||
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
|
||||
index becfa3ef7fdc..eda9f3d87746 100644
|
||||
--- a/drivers/net/ppp/pppoe.c
|
||||
+++ b/drivers/net/ppp/pppoe.c
|
||||
@@ -313,7 +313,6 @@ static void pppoe_flush_dev(struct net_device *dev)
|
||||
if (po->pppoe_dev == dev &&
|
||||
sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
|
||||
pppox_unbind_sock(sk);
|
||||
- sk->sk_state = PPPOX_ZOMBIE;
|
||||
sk->sk_state_change(sk);
|
||||
po->pppoe_dev = NULL;
|
||||
dev_put(dev);
|
||||
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
|
||||
index 97b5de7aebdb..05e8bd7b3e0f 100644
|
||||
--- a/drivers/net/usb/asix_devices.c
|
||||
+++ b/drivers/net/usb/asix_devices.c
|
||||
@@ -466,19 +466,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- ret = asix_sw_reset(dev, AX_SWRESET_IPPD | AX_SWRESET_PRL);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
-
|
||||
- msleep(150);
|
||||
-
|
||||
- ret = asix_sw_reset(dev, AX_SWRESET_CLEAR);
|
||||
- if (ret < 0)
|
||||
- return ret;
|
||||
-
|
||||
- msleep(150);
|
||||
-
|
||||
- ret = asix_sw_reset(dev, embd_phy ? AX_SWRESET_IPRL : AX_SWRESET_PRTE);
|
||||
+ ax88772_reset(dev);
|
||||
|
||||
/* Read PHYID register *AFTER* the PHY was reset properly */
|
||||
phyid = asix_get_phyid(dev);
|
||||
@@ -888,7 +876,7 @@ static const struct driver_info ax88772_info = {
|
||||
.unbind = ax88772_unbind,
|
||||
.status = asix_status,
|
||||
.link_reset = ax88772_link_reset,
|
||||
- .reset = ax88772_reset,
|
||||
+ .reset = ax88772_link_reset,
|
||||
.flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | FLAG_MULTI_PACKET,
|
||||
.rx_fixup = asix_rx_fixup_common,
|
||||
.tx_fixup = asix_tx_fixup,
|
||||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
|
||||
index 478120ae34e5..993e34774bb1 100644
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -2363,6 +2363,9 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb,
|
||||
{
|
||||
if (skb->ip_summed == CHECKSUM_COMPLETE)
|
||||
skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
|
||||
+ else if (skb->ip_summed == CHECKSUM_PARTIAL &&
|
||||
+ skb_checksum_start_offset(skb) < 0)
|
||||
+ skb->ip_summed = CHECKSUM_NONE;
|
||||
}
|
||||
|
||||
unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
|
||||
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
|
||||
index dbdfd2b0f3b3..e927d3e80b61 100644
|
||||
--- a/include/net/af_unix.h
|
||||
+++ b/include/net/af_unix.h
|
||||
@@ -63,7 +63,11 @@ struct unix_sock {
|
||||
#define UNIX_GC_MAYBE_CYCLE 1
|
||||
struct socket_wq peer_wq;
|
||||
};
|
||||
-#define unix_sk(__sk) ((struct unix_sock *)__sk)
|
||||
+
|
||||
+static inline struct unix_sock *unix_sk(struct sock *sk)
|
||||
+{
|
||||
+ return (struct unix_sock *)sk;
|
||||
+}
|
||||
|
||||
#define peer_wait peer_wq.wait
|
||||
|
||||
diff --git a/include/net/sock.h b/include/net/sock.h
|
||||
index c0aad07160ef..95dc0c8a9dac 100644
|
||||
--- a/include/net/sock.h
|
||||
+++ b/include/net/sock.h
|
||||
@@ -782,6 +782,14 @@ static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *s
|
||||
if (sk_rcvqueues_full(sk, skb, limit))
|
||||
return -ENOBUFS;
|
||||
|
||||
+ /*
|
||||
+ * If the skb was allocated from pfmemalloc reserves, only
|
||||
+ * allow SOCK_MEMALLOC sockets to use it as this socket is
|
||||
+ * helping free memory
|
||||
+ */
|
||||
+ if (skb_pfmemalloc(skb) && !sock_flag(sk, SOCK_MEMALLOC))
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
__sk_add_backlog(sk, skb);
|
||||
sk->sk_backlog.len += skb->truesize;
|
||||
return 0;
|
||||
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
|
||||
index fe7c4b91d2e7..fa927fd5778d 100644
|
||||
--- a/kernel/workqueue.c
|
||||
+++ b/kernel/workqueue.c
|
||||
@@ -1450,13 +1450,13 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
|
||||
timer_stats_timer_set_start_info(&dwork->timer);
|
||||
|
||||
dwork->wq = wq;
|
||||
+ /* timer isn't guaranteed to run in this cpu, record earlier */
|
||||
+ if (cpu == WORK_CPU_UNBOUND)
|
||||
+ cpu = raw_smp_processor_id();
|
||||
dwork->cpu = cpu;
|
||||
timer->expires = jiffies + delay;
|
||||
|
||||
- if (unlikely(cpu != WORK_CPU_UNBOUND))
|
||||
- add_timer_on(timer, cpu);
|
||||
- else
|
||||
- add_timer(timer);
|
||||
+ add_timer_on(timer, cpu);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
|
||||
index ce91766eeca9..213b61255140 100644
|
||||
--- a/net/core/ethtool.c
|
||||
+++ b/net/core/ethtool.c
|
||||
@@ -1066,7 +1066,7 @@ static int ethtool_get_strings(struct net_device *dev, void __user *useraddr)
|
||||
|
||||
gstrings.len = ret;
|
||||
|
||||
- data = kmalloc(gstrings.len * ETH_GSTRING_LEN, GFP_USER);
|
||||
+ data = kcalloc(gstrings.len, ETH_GSTRING_LEN, GFP_USER);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
|
||||
index 6148716884ae..05195b8c8718 100644
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -2711,11 +2711,12 @@ EXPORT_SYMBOL(skb_append_datato_frags);
|
||||
*/
|
||||
unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
+ unsigned char *data = skb->data;
|
||||
+
|
||||
BUG_ON(len > skb->len);
|
||||
- skb->len -= len;
|
||||
- BUG_ON(skb->len < skb->data_len);
|
||||
- skb_postpull_rcsum(skb, skb->data, len);
|
||||
- return skb->data += len;
|
||||
+ __skb_pull(skb, len);
|
||||
+ skb_postpull_rcsum(skb, data, len);
|
||||
+ return skb->data;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(skb_pull_rcsum);
|
||||
|
||||
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
|
||||
index 8c27de2b4d5a..797ff373e486 100644
|
||||
--- a/net/l2tp/l2tp_core.c
|
||||
+++ b/net/l2tp/l2tp_core.c
|
||||
@@ -1381,7 +1381,7 @@ static void l2tp_tunnel_del_work(struct work_struct *work)
|
||||
tunnel = container_of(work, struct l2tp_tunnel, del_work);
|
||||
sk = l2tp_tunnel_sock_lookup(tunnel);
|
||||
if (!sk)
|
||||
- return;
|
||||
+ goto out;
|
||||
|
||||
sock = sk->sk_socket;
|
||||
|
||||
@@ -1402,6 +1402,8 @@ static void l2tp_tunnel_del_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
l2tp_tunnel_sock_put(sk);
|
||||
+out:
|
||||
+ l2tp_tunnel_dec_refcount(tunnel);
|
||||
}
|
||||
|
||||
/* Create a socket for the tunnel, if one isn't set up by
|
||||
@@ -1731,8 +1733,13 @@ EXPORT_SYMBOL_GPL(l2tp_tunnel_create);
|
||||
*/
|
||||
int l2tp_tunnel_delete(struct l2tp_tunnel *tunnel)
|
||||
{
|
||||
+ l2tp_tunnel_inc_refcount(tunnel);
|
||||
l2tp_tunnel_closeall(tunnel);
|
||||
- return (false == queue_work(l2tp_wq, &tunnel->del_work));
|
||||
+ if (false == queue_work(l2tp_wq, &tunnel->del_work)) {
|
||||
+ l2tp_tunnel_dec_refcount(tunnel);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(l2tp_tunnel_delete);
|
||||
|
||||
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
|
||||
index 123c16419cbe..825c029bf092 100644
|
||||
--- a/net/unix/af_unix.c
|
||||
+++ b/net/unix/af_unix.c
|
||||
@@ -2063,8 +2063,20 @@ again:
|
||||
if (UNIXCB(skb).fp)
|
||||
siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
|
||||
|
||||
- sk_peek_offset_fwd(sk, chunk);
|
||||
+ if (skip) {
|
||||
+ sk_peek_offset_fwd(sk, chunk);
|
||||
+ skip -= chunk;
|
||||
+ }
|
||||
+
|
||||
+ if (UNIXCB(skb).fp)
|
||||
+ break;
|
||||
|
||||
+ last = skb;
|
||||
+ unix_state_lock(sk);
|
||||
+ skb = skb_peek_next(skb, &sk->sk_receive_queue);
|
||||
+ if (skb)
|
||||
+ goto again;
|
||||
+ unix_state_unlock(sk);
|
||||
break;
|
||||
}
|
||||
} while (size);
|
||||
@ -1,645 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 25701b67bb6d..6944160a5631 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 92
|
||||
+SUBLEVEL = 93
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
|
||||
index 048334bb2651..d25459ff57fc 100644
|
||||
--- a/arch/arm64/kernel/stacktrace.c
|
||||
+++ b/arch/arm64/kernel/stacktrace.c
|
||||
@@ -48,11 +48,7 @@ int unwind_frame(struct stackframe *frame)
|
||||
|
||||
frame->sp = fp + 0x10;
|
||||
frame->fp = *(unsigned long *)(fp);
|
||||
- /*
|
||||
- * -4 here because we care about the PC at time of bl,
|
||||
- * not where the return will go.
|
||||
- */
|
||||
- frame->pc = *(unsigned long *)(fp + 8) - 4;
|
||||
+ frame->pc = *(unsigned long *)(fp + 8);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
|
||||
index f956a2f84a15..8d3722af6187 100644
|
||||
--- a/arch/powerpc/kernel/rtas.c
|
||||
+++ b/arch/powerpc/kernel/rtas.c
|
||||
@@ -1041,6 +1041,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
+ if (!rtas.entry)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
|
||||
return -EFAULT;
|
||||
|
||||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
|
||||
index 511630db00a8..91cbe75a91d5 100644
|
||||
--- a/arch/x86/xen/enlighten.c
|
||||
+++ b/arch/x86/xen/enlighten.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/edd.h>
|
||||
|
||||
-#ifdef CONFIG_KEXEC_CORE
|
||||
+#ifdef CONFIG_KEXEC
|
||||
#include <linux/kexec.h>
|
||||
#endif
|
||||
|
||||
@@ -1748,7 +1748,7 @@ static struct notifier_block xen_hvm_cpu_notifier __cpuinitdata = {
|
||||
.notifier_call = xen_hvm_cpu_notify,
|
||||
};
|
||||
|
||||
-#ifdef CONFIG_KEXEC_CORE
|
||||
+#ifdef CONFIG_KEXEC
|
||||
static void xen_hvm_shutdown(void)
|
||||
{
|
||||
native_machine_shutdown();
|
||||
@@ -1777,7 +1777,7 @@ static void __init xen_hvm_guest_init(void)
|
||||
x86_init.irqs.intr_init = xen_init_IRQ;
|
||||
xen_hvm_init_time_ops();
|
||||
xen_hvm_init_mmu_ops();
|
||||
-#ifdef CONFIG_KEXEC_CORE
|
||||
+#ifdef CONFIG_KEXEC
|
||||
machine_ops.shutdown = xen_hvm_shutdown;
|
||||
machine_ops.crash_shutdown = xen_hvm_crash_shutdown;
|
||||
#endif
|
||||
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
|
||||
index 7d4a8d28277e..ebcec7439a1a 100644
|
||||
--- a/crypto/ablkcipher.c
|
||||
+++ b/crypto/ablkcipher.c
|
||||
@@ -700,7 +700,7 @@ struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name,
|
||||
err:
|
||||
if (err != -EAGAIN)
|
||||
break;
|
||||
- if (signal_pending(current)) {
|
||||
+ if (fatal_signal_pending(current)) {
|
||||
err = -EINTR;
|
||||
break;
|
||||
}
|
||||
diff --git a/crypto/algapi.c b/crypto/algapi.c
|
||||
index 00d8d939733b..daf2f653b131 100644
|
||||
--- a/crypto/algapi.c
|
||||
+++ b/crypto/algapi.c
|
||||
@@ -325,7 +325,7 @@ static void crypto_wait_for_test(struct crypto_larval *larval)
|
||||
crypto_alg_tested(larval->alg.cra_driver_name, 0);
|
||||
}
|
||||
|
||||
- err = wait_for_completion_interruptible(&larval->completion);
|
||||
+ err = wait_for_completion_killable(&larval->completion);
|
||||
WARN_ON(err);
|
||||
|
||||
out:
|
||||
diff --git a/crypto/api.c b/crypto/api.c
|
||||
index 335abea14f19..36a0d4602eba 100644
|
||||
--- a/crypto/api.c
|
||||
+++ b/crypto/api.c
|
||||
@@ -172,7 +172,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg)
|
||||
struct crypto_larval *larval = (void *)alg;
|
||||
long timeout;
|
||||
|
||||
- timeout = wait_for_completion_interruptible_timeout(
|
||||
+ timeout = wait_for_completion_killable_timeout(
|
||||
&larval->completion, 60 * HZ);
|
||||
|
||||
alg = larval->adult;
|
||||
@@ -435,7 +435,7 @@ struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask)
|
||||
err:
|
||||
if (err != -EAGAIN)
|
||||
break;
|
||||
- if (signal_pending(current)) {
|
||||
+ if (fatal_signal_pending(current)) {
|
||||
err = -EINTR;
|
||||
break;
|
||||
}
|
||||
@@ -552,7 +552,7 @@ void *crypto_alloc_tfm(const char *alg_name,
|
||||
err:
|
||||
if (err != -EAGAIN)
|
||||
break;
|
||||
- if (signal_pending(current)) {
|
||||
+ if (fatal_signal_pending(current)) {
|
||||
err = -EINTR;
|
||||
break;
|
||||
}
|
||||
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
|
||||
index 43665d0d0905..c7666f401381 100644
|
||||
--- a/crypto/crypto_user.c
|
||||
+++ b/crypto/crypto_user.c
|
||||
@@ -361,7 +361,7 @@ static struct crypto_alg *crypto_user_aead_alg(const char *name, u32 type,
|
||||
err = PTR_ERR(alg);
|
||||
if (err != -EAGAIN)
|
||||
break;
|
||||
- if (signal_pending(current)) {
|
||||
+ if (fatal_signal_pending(current)) {
|
||||
err = -EINTR;
|
||||
break;
|
||||
}
|
||||
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
|
||||
index 2fa22c24fa5d..85b31ba9d503 100644
|
||||
--- a/drivers/block/rbd.c
|
||||
+++ b/drivers/block/rbd.c
|
||||
@@ -93,6 +93,8 @@ static int atomic_dec_return_safe(atomic_t *v)
|
||||
|
||||
#define RBD_MINORS_PER_MAJOR 256 /* max minors per blkdev */
|
||||
|
||||
+#define RBD_MAX_PARENT_CHAIN_LEN 16
|
||||
+
|
||||
#define RBD_SNAP_DEV_NAME_PREFIX "snap_"
|
||||
#define RBD_MAX_SNAP_NAME_LEN \
|
||||
(NAME_MAX - (sizeof (RBD_SNAP_DEV_NAME_PREFIX) - 1))
|
||||
@@ -394,7 +396,7 @@ static ssize_t rbd_add(struct bus_type *bus, const char *buf,
|
||||
size_t count);
|
||||
static ssize_t rbd_remove(struct bus_type *bus, const char *buf,
|
||||
size_t count);
|
||||
-static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping);
|
||||
+static int rbd_dev_image_probe(struct rbd_device *rbd_dev, int depth);
|
||||
static void rbd_spec_put(struct rbd_spec *spec);
|
||||
|
||||
static struct bus_attribute rbd_bus_attrs[] = {
|
||||
@@ -3453,6 +3455,9 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
|
||||
blk_queue_io_opt(q, segment_size);
|
||||
|
||||
blk_queue_merge_bvec(q, rbd_merge_bvec);
|
||||
+ if (!ceph_test_opt(rbd_dev->rbd_client->client, NOCRC))
|
||||
+ q->backing_dev_info.capabilities |= BDI_CAP_STABLE_WRITES;
|
||||
+
|
||||
disk->queue = q;
|
||||
|
||||
q->queuedata = rbd_dev;
|
||||
@@ -4828,44 +4833,50 @@ out_err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int rbd_dev_probe_parent(struct rbd_device *rbd_dev)
|
||||
+/*
|
||||
+ * @depth is rbd_dev_image_probe() -> rbd_dev_probe_parent() ->
|
||||
+ * rbd_dev_image_probe() recursion depth, which means it's also the
|
||||
+ * length of the already discovered part of the parent chain.
|
||||
+ */
|
||||
+static int rbd_dev_probe_parent(struct rbd_device *rbd_dev, int depth)
|
||||
{
|
||||
struct rbd_device *parent = NULL;
|
||||
- struct rbd_spec *parent_spec;
|
||||
- struct rbd_client *rbdc;
|
||||
int ret;
|
||||
|
||||
if (!rbd_dev->parent_spec)
|
||||
return 0;
|
||||
- /*
|
||||
- * We need to pass a reference to the client and the parent
|
||||
- * spec when creating the parent rbd_dev. Images related by
|
||||
- * parent/child relationships always share both.
|
||||
- */
|
||||
- parent_spec = rbd_spec_get(rbd_dev->parent_spec);
|
||||
- rbdc = __rbd_get_client(rbd_dev->rbd_client);
|
||||
|
||||
- ret = -ENOMEM;
|
||||
- parent = rbd_dev_create(rbdc, parent_spec);
|
||||
- if (!parent)
|
||||
+ if (++depth > RBD_MAX_PARENT_CHAIN_LEN) {
|
||||
+ pr_info("parent chain is too long (%d)\n", depth);
|
||||
+ ret = -EINVAL;
|
||||
goto out_err;
|
||||
+ }
|
||||
|
||||
- ret = rbd_dev_image_probe(parent, false);
|
||||
+ parent = rbd_dev_create(rbd_dev->rbd_client, rbd_dev->parent_spec);
|
||||
+ if (!parent) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Images related by parent/child relationships always share
|
||||
+ * rbd_client and spec/parent_spec, so bump their refcounts.
|
||||
+ */
|
||||
+ __rbd_get_client(rbd_dev->rbd_client);
|
||||
+ rbd_spec_get(rbd_dev->parent_spec);
|
||||
+
|
||||
+ ret = rbd_dev_image_probe(parent, depth);
|
||||
if (ret < 0)
|
||||
goto out_err;
|
||||
+
|
||||
rbd_dev->parent = parent;
|
||||
atomic_set(&rbd_dev->parent_ref, 1);
|
||||
-
|
||||
return 0;
|
||||
+
|
||||
out_err:
|
||||
- if (parent) {
|
||||
- rbd_dev_unparent(rbd_dev);
|
||||
+ rbd_dev_unparent(rbd_dev);
|
||||
+ if (parent)
|
||||
rbd_dev_destroy(parent);
|
||||
- } else {
|
||||
- rbd_put_client(rbdc);
|
||||
- rbd_spec_put(parent_spec);
|
||||
- }
|
||||
-
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4971,7 +4982,7 @@ static void rbd_dev_image_release(struct rbd_device *rbd_dev)
|
||||
* parent), initiate a watch on its header object before using that
|
||||
* object to get detailed information about the rbd image.
|
||||
*/
|
||||
-static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping)
|
||||
+static int rbd_dev_image_probe(struct rbd_device *rbd_dev, int depth)
|
||||
{
|
||||
int ret;
|
||||
int tmp;
|
||||
@@ -4992,7 +5003,7 @@ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping)
|
||||
if (ret)
|
||||
goto err_out_format;
|
||||
|
||||
- if (mapping) {
|
||||
+ if (!depth) {
|
||||
ret = rbd_dev_header_watch_sync(rbd_dev, true);
|
||||
if (ret)
|
||||
goto out_header_name;
|
||||
@@ -5009,7 +5020,7 @@ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping)
|
||||
if (ret)
|
||||
goto err_out_probe;
|
||||
|
||||
- ret = rbd_dev_probe_parent(rbd_dev);
|
||||
+ ret = rbd_dev_probe_parent(rbd_dev, depth);
|
||||
if (ret)
|
||||
goto err_out_probe;
|
||||
|
||||
@@ -5020,7 +5031,7 @@ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping)
|
||||
err_out_probe:
|
||||
rbd_dev_unprobe(rbd_dev);
|
||||
err_out_watch:
|
||||
- if (mapping) {
|
||||
+ if (!depth) {
|
||||
tmp = rbd_dev_header_watch_sync(rbd_dev, false);
|
||||
if (tmp)
|
||||
rbd_warn(rbd_dev, "unable to tear down "
|
||||
@@ -5091,7 +5102,7 @@ static ssize_t rbd_add(struct bus_type *bus,
|
||||
rbdc = NULL; /* rbd_dev now owns this */
|
||||
spec = NULL; /* rbd_dev now owns this */
|
||||
|
||||
- rc = rbd_dev_image_probe(rbd_dev, true);
|
||||
+ rc = rbd_dev_image_probe(rbd_dev, 0);
|
||||
if (rc < 0)
|
||||
goto err_out_rbd_dev;
|
||||
|
||||
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
|
||||
index ddd9a098bc67..ea7ed8600a7c 100644
|
||||
--- a/drivers/block/xen-blkfront.c
|
||||
+++ b/drivers/block/xen-blkfront.c
|
||||
@@ -1590,7 +1590,8 @@ static void blkback_changed(struct xenbus_device *dev,
|
||||
break;
|
||||
/* Missed the backend's Closing state -- fallthrough */
|
||||
case XenbusStateClosing:
|
||||
- blkfront_closing(info);
|
||||
+ if (info)
|
||||
+ blkfront_closing(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
|
||||
index 5bccf31cc974..4d41739fb50a 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
|
||||
@@ -177,11 +177,12 @@ nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem,
|
||||
struct nouveau_bo *nvbo = nouveau_gem_object(gem);
|
||||
struct nouveau_vma *vma;
|
||||
|
||||
- if (nvbo->bo.mem.mem_type == TTM_PL_TT)
|
||||
+ if (is_power_of_2(nvbo->valid_domains))
|
||||
+ rep->domain = nvbo->valid_domains;
|
||||
+ else if (nvbo->bo.mem.mem_type == TTM_PL_TT)
|
||||
rep->domain = NOUVEAU_GEM_DOMAIN_GART;
|
||||
else
|
||||
rep->domain = NOUVEAU_GEM_DOMAIN_VRAM;
|
||||
-
|
||||
rep->offset = nvbo->bo.offset;
|
||||
if (cli->base.vm) {
|
||||
vma = nouveau_bo_vma_find(nvbo, cli->base.vm);
|
||||
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
|
||||
index 784b97cb05b0..c410217fbe89 100644
|
||||
--- a/drivers/infiniband/core/cm.c
|
||||
+++ b/drivers/infiniband/core/cm.c
|
||||
@@ -857,6 +857,11 @@ retest:
|
||||
case IB_CM_SIDR_REQ_RCVD:
|
||||
spin_unlock_irq(&cm_id_priv->lock);
|
||||
cm_reject_sidr_req(cm_id_priv, IB_SIDR_REJECT);
|
||||
+ spin_lock_irq(&cm.lock);
|
||||
+ if (!RB_EMPTY_NODE(&cm_id_priv->sidr_id_node))
|
||||
+ rb_erase(&cm_id_priv->sidr_id_node,
|
||||
+ &cm.remote_sidr_table);
|
||||
+ spin_unlock_irq(&cm.lock);
|
||||
break;
|
||||
case IB_CM_REQ_SENT:
|
||||
ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
|
||||
@@ -3093,7 +3098,10 @@ int ib_send_cm_sidr_rep(struct ib_cm_id *cm_id,
|
||||
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
|
||||
|
||||
spin_lock_irqsave(&cm.lock, flags);
|
||||
- rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
|
||||
+ if (!RB_EMPTY_NODE(&cm_id_priv->sidr_id_node)) {
|
||||
+ rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
|
||||
+ RB_CLEAR_NODE(&cm_id_priv->sidr_id_node);
|
||||
+ }
|
||||
spin_unlock_irqrestore(&cm.lock, flags);
|
||||
return 0;
|
||||
|
||||
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
|
||||
index dfb401cba733..6bde2a124c72 100644
|
||||
--- a/drivers/iommu/amd_iommu.c
|
||||
+++ b/drivers/iommu/amd_iommu.c
|
||||
@@ -2106,8 +2106,8 @@ static void set_dte_entry(u16 devid, struct protection_domain *domain, bool ats)
|
||||
static void clear_dte_entry(u16 devid)
|
||||
{
|
||||
/* remove entry from the device table seen by the hardware */
|
||||
- amd_iommu_dev_table[devid].data[0] = IOMMU_PTE_P | IOMMU_PTE_TV;
|
||||
- amd_iommu_dev_table[devid].data[1] = 0;
|
||||
+ amd_iommu_dev_table[devid].data[0] = IOMMU_PTE_P | IOMMU_PTE_TV;
|
||||
+ amd_iommu_dev_table[devid].data[1] &= DTE_FLAG_MASK;
|
||||
|
||||
amd_iommu_apply_erratum_63(devid);
|
||||
}
|
||||
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
|
||||
index 0285a215df16..7570f45fce8d 100644
|
||||
--- a/drivers/iommu/amd_iommu_types.h
|
||||
+++ b/drivers/iommu/amd_iommu_types.h
|
||||
@@ -282,6 +282,7 @@
|
||||
#define IOMMU_PTE_IR (1ULL << 61)
|
||||
#define IOMMU_PTE_IW (1ULL << 62)
|
||||
|
||||
+#define DTE_FLAG_MASK (0x3ffULL << 32)
|
||||
#define DTE_FLAG_IOTLB (0x01UL << 32)
|
||||
#define DTE_FLAG_GV (0x01ULL << 55)
|
||||
#define DTE_GLX_SHIFT (56)
|
||||
diff --git a/drivers/md/persistent-data/dm-btree-remove.c b/drivers/md/persistent-data/dm-btree-remove.c
|
||||
index 7c0d75547ccf..92cd09f3c69b 100644
|
||||
--- a/drivers/md/persistent-data/dm-btree-remove.c
|
||||
+++ b/drivers/md/persistent-data/dm-btree-remove.c
|
||||
@@ -301,11 +301,16 @@ static void redistribute3(struct dm_btree_info *info, struct btree_node *parent,
|
||||
{
|
||||
int s;
|
||||
uint32_t max_entries = le32_to_cpu(left->header.max_entries);
|
||||
- unsigned target = (nr_left + nr_center + nr_right) / 3;
|
||||
- BUG_ON(target > max_entries);
|
||||
+ unsigned total = nr_left + nr_center + nr_right;
|
||||
+ unsigned target_right = total / 3;
|
||||
+ unsigned remainder = (target_right * 3) != total;
|
||||
+ unsigned target_left = target_right + remainder;
|
||||
+
|
||||
+ BUG_ON(target_left > max_entries);
|
||||
+ BUG_ON(target_right > max_entries);
|
||||
|
||||
if (nr_left < nr_right) {
|
||||
- s = nr_left - target;
|
||||
+ s = nr_left - target_left;
|
||||
|
||||
if (s < 0 && nr_center < -s) {
|
||||
/* not enough in central node */
|
||||
@@ -316,10 +321,10 @@ static void redistribute3(struct dm_btree_info *info, struct btree_node *parent,
|
||||
} else
|
||||
shift(left, center, s);
|
||||
|
||||
- shift(center, right, target - nr_right);
|
||||
+ shift(center, right, target_right - nr_right);
|
||||
|
||||
} else {
|
||||
- s = target - nr_right;
|
||||
+ s = target_right - nr_right;
|
||||
if (s > 0 && nr_center < s) {
|
||||
/* not enough in central node */
|
||||
shift(center, right, nr_center);
|
||||
@@ -329,7 +334,7 @@ static void redistribute3(struct dm_btree_info *info, struct btree_node *parent,
|
||||
} else
|
||||
shift(center, right, s);
|
||||
|
||||
- shift(left, center, nr_left - target);
|
||||
+ shift(left, center, nr_left - target_left);
|
||||
}
|
||||
|
||||
*key_ptr(parent, c->index) = center->keys[0];
|
||||
diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c
|
||||
index 79233b051da0..b53669404cb5 100644
|
||||
--- a/drivers/md/persistent-data/dm-btree.c
|
||||
+++ b/drivers/md/persistent-data/dm-btree.c
|
||||
@@ -507,7 +507,7 @@ static int btree_split_beneath(struct shadow_spine *s, uint64_t key)
|
||||
|
||||
r = new_block(s->info, &right);
|
||||
if (r < 0) {
|
||||
- /* FIXME: put left */
|
||||
+ unlock_block(s->info, left);
|
||||
return r;
|
||||
}
|
||||
|
||||
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
|
||||
index 72141ee60705..63d42ae56a1c 100644
|
||||
--- a/drivers/md/raid1.c
|
||||
+++ b/drivers/md/raid1.c
|
||||
@@ -2147,7 +2147,7 @@ static int narrow_write_error(struct r1bio *r1_bio, int i)
|
||||
md_trim_bio(wbio, sector - r1_bio->sector, sectors);
|
||||
wbio->bi_sector += rdev->data_offset;
|
||||
wbio->bi_bdev = rdev->bdev;
|
||||
- if (submit_bio_wait(WRITE, wbio) == 0)
|
||||
+ if (submit_bio_wait(WRITE, wbio) < 0)
|
||||
/* failure! */
|
||||
ok = rdev_set_badblocks(rdev, sector,
|
||||
sectors, 0)
|
||||
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
|
||||
index 5b2a1eaea34d..f53f4f895502 100644
|
||||
--- a/drivers/md/raid10.c
|
||||
+++ b/drivers/md/raid10.c
|
||||
@@ -2597,7 +2597,7 @@ static int narrow_write_error(struct r10bio *r10_bio, int i)
|
||||
choose_data_offset(r10_bio, rdev) +
|
||||
(sector - r10_bio->sector));
|
||||
wbio->bi_bdev = rdev->bdev;
|
||||
- if (submit_bio_wait(WRITE, wbio) == 0)
|
||||
+ if (submit_bio_wait(WRITE, wbio) < 0)
|
||||
/* Failure! */
|
||||
ok = rdev_set_badblocks(rdev, sector,
|
||||
sectors, 0)
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
|
||||
index bd126c25a727..3f37e464a599 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -819,6 +819,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
hw->max_rate_tries = 10;
|
||||
hw->sta_data_size = sizeof(struct ath_node);
|
||||
hw->vif_data_size = sizeof(struct ath_vif);
|
||||
+ hw->extra_tx_headroom = 4;
|
||||
|
||||
hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1;
|
||||
hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1;
|
||||
diff --git a/drivers/net/wireless/iwlwifi/dvm/lib.c b/drivers/net/wireless/iwlwifi/dvm/lib.c
|
||||
index 54f553380aa8..54308dfde13d 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/dvm/lib.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/dvm/lib.c
|
||||
@@ -1023,7 +1023,7 @@ static void iwlagn_wowlan_program_keys(struct ieee80211_hw *hw,
|
||||
u8 *pn = seq.ccmp.pn;
|
||||
|
||||
ieee80211_get_key_rx_seq(key, i, &seq);
|
||||
- aes_sc->pn = cpu_to_le64(
|
||||
+ aes_sc[i].pn = cpu_to_le64(
|
||||
(u64)pn[5] |
|
||||
((u64)pn[4] << 8) |
|
||||
((u64)pn[3] << 16) |
|
||||
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
|
||||
index 16bbdcc8627a..2e95b419a109 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
|
||||
@@ -295,12 +295,12 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
|
||||
u8 *pn = seq.ccmp.pn;
|
||||
|
||||
ieee80211_get_key_rx_seq(key, i, &seq);
|
||||
- aes_sc->pn = cpu_to_le64((u64)pn[5] |
|
||||
- ((u64)pn[4] << 8) |
|
||||
- ((u64)pn[3] << 16) |
|
||||
- ((u64)pn[2] << 24) |
|
||||
- ((u64)pn[1] << 32) |
|
||||
- ((u64)pn[0] << 40));
|
||||
+ aes_sc[i].pn = cpu_to_le64((u64)pn[5] |
|
||||
+ ((u64)pn[4] << 8) |
|
||||
+ ((u64)pn[3] << 16) |
|
||||
+ ((u64)pn[2] << 24) |
|
||||
+ ((u64)pn[1] << 32) |
|
||||
+ ((u64)pn[0] << 40));
|
||||
}
|
||||
data->use_rsc_tsc = true;
|
||||
break;
|
||||
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
|
||||
index fa50c7dc3d3e..2da1959ff2f6 100644
|
||||
--- a/drivers/scsi/mvsas/mv_sas.c
|
||||
+++ b/drivers/scsi/mvsas/mv_sas.c
|
||||
@@ -987,6 +987,8 @@ static void mvs_slot_free(struct mvs_info *mvi, u32 rx_desc)
|
||||
static void mvs_slot_task_free(struct mvs_info *mvi, struct sas_task *task,
|
||||
struct mvs_slot_info *slot, u32 slot_idx)
|
||||
{
|
||||
+ if (!slot)
|
||||
+ return;
|
||||
if (!slot->task)
|
||||
return;
|
||||
if (!sas_protocol_ata(task->task_proto))
|
||||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
|
||||
index 4ba6974dd4b6..98e3b20c6058 100644
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -2348,6 +2348,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
|
||||
u32 trb_comp_code;
|
||||
int ret = 0;
|
||||
int td_num = 0;
|
||||
+ bool handling_skipped_tds = false;
|
||||
|
||||
slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));
|
||||
xdev = xhci->devs[slot_id];
|
||||
@@ -2481,6 +2482,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
|
||||
ep->skip = true;
|
||||
xhci_dbg(xhci, "Miss service interval error, set skip flag\n");
|
||||
goto cleanup;
|
||||
+ case COMP_PING_ERR:
|
||||
+ ep->skip = true;
|
||||
+ xhci_dbg(xhci, "No Ping response error, Skip one Isoc TD\n");
|
||||
+ goto cleanup;
|
||||
default:
|
||||
if (xhci_is_vendor_info_code(xhci, trb_comp_code)) {
|
||||
status = 0;
|
||||
@@ -2612,13 +2617,18 @@ static int handle_tx_event(struct xhci_hcd *xhci,
|
||||
ep, &status);
|
||||
|
||||
cleanup:
|
||||
+
|
||||
+
|
||||
+ handling_skipped_tds = ep->skip &&
|
||||
+ trb_comp_code != COMP_MISSED_INT &&
|
||||
+ trb_comp_code != COMP_PING_ERR;
|
||||
+
|
||||
/*
|
||||
- * Do not update event ring dequeue pointer if ep->skip is set.
|
||||
- * Will roll back to continue process missed tds.
|
||||
+ * Do not update event ring dequeue pointer if we're in a loop
|
||||
+ * processing missed tds.
|
||||
*/
|
||||
- if (trb_comp_code == COMP_MISSED_INT || !ep->skip) {
|
||||
+ if (!handling_skipped_tds)
|
||||
inc_deq(xhci, xhci->event_ring);
|
||||
- }
|
||||
|
||||
if (ret) {
|
||||
urb = td->urb;
|
||||
@@ -2662,7 +2672,7 @@ cleanup:
|
||||
* Process them as short transfer until reach the td pointed by
|
||||
* the event.
|
||||
*/
|
||||
- } while (ep->skip && trb_comp_code != COMP_MISSED_INT);
|
||||
+ } while (handling_skipped_tds);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/include/sound/wm8904.h b/include/sound/wm8904.h
|
||||
index 898be3a8db9a..6d8f8fba3341 100644
|
||||
--- a/include/sound/wm8904.h
|
||||
+++ b/include/sound/wm8904.h
|
||||
@@ -119,7 +119,7 @@
|
||||
#define WM8904_MIC_REGS 2
|
||||
#define WM8904_GPIO_REGS 4
|
||||
#define WM8904_DRC_REGS 4
|
||||
-#define WM8904_EQ_REGS 25
|
||||
+#define WM8904_EQ_REGS 24
|
||||
|
||||
/**
|
||||
* DRC configurations are specified with a label and a set of register
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index 61fb677211cb..fd2afdf48a89 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -942,11 +942,15 @@ void symbol_put_addr(void *addr)
|
||||
if (core_kernel_text(a))
|
||||
return;
|
||||
|
||||
- /* module_text_address is safe here: we're supposed to have reference
|
||||
- * to module from symbol_get, so it can't go away. */
|
||||
+ /*
|
||||
+ * Even though we hold a reference on the module; we still need to
|
||||
+ * disable preemption in order to safely traverse the data structure.
|
||||
+ */
|
||||
+ preempt_disable();
|
||||
modaddr = __module_text_address(a);
|
||||
BUG_ON(!modaddr);
|
||||
module_put(modaddr);
|
||||
+ preempt_enable();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(symbol_put_addr);
|
||||
|
||||
diff --git a/mm/filemap.c b/mm/filemap.c
|
||||
index 7905fe721aa8..725a10043244 100644
|
||||
--- a/mm/filemap.c
|
||||
+++ b/mm/filemap.c
|
||||
@@ -2340,6 +2340,11 @@ again:
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (fatal_signal_pending(current)) {
|
||||
+ status = -EINTR;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
status = a_ops->write_begin(file, mapping, pos, bytes, flags,
|
||||
&page, &fsdata);
|
||||
if (unlikely(status))
|
||||
@@ -2380,10 +2385,6 @@ again:
|
||||
written += copied;
|
||||
|
||||
balance_dirty_pages_ratelimited(mapping);
|
||||
- if (fatal_signal_pending(current)) {
|
||||
- status = -EINTR;
|
||||
- break;
|
||||
- }
|
||||
} while (iov_iter_count(i));
|
||||
|
||||
return written ? written : status;
|
||||
@ -1,724 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6944160a5631..f73ae0748cbc 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 93
|
||||
+SUBLEVEL = 94
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index 8ca636cf8618..1a00c33a5b7e 100644
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -1355,12 +1355,19 @@ static int arm_iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
|
||||
unsigned long uaddr = vma->vm_start;
|
||||
unsigned long usize = vma->vm_end - vma->vm_start;
|
||||
struct page **pages = __iommu_get_pages(cpu_addr, attrs);
|
||||
+ unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
|
||||
+ unsigned long off = vma->vm_pgoff;
|
||||
|
||||
vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot);
|
||||
|
||||
if (!pages)
|
||||
return -ENXIO;
|
||||
|
||||
+ if (off >= nr_pages || (usize >> PAGE_SHIFT) > nr_pages - off)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
+ pages += off;
|
||||
+
|
||||
do {
|
||||
int ret = vm_insert_page(vma, uaddr, *pages++);
|
||||
if (ret) {
|
||||
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
|
||||
index c019b7aaf776..553e00a432ec 100644
|
||||
--- a/arch/arm/plat-orion/common.c
|
||||
+++ b/arch/arm/plat-orion/common.c
|
||||
@@ -498,7 +498,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq)
|
||||
|
||||
d->netdev = &orion_ge00.dev;
|
||||
for (i = 0; i < d->nr_chips; i++)
|
||||
- d->chip[i].mii_bus = &orion_ge00_shared.dev;
|
||||
+ d->chip[i].mii_bus = &orion_ge_mvmdio.dev;
|
||||
orion_switch_device.dev.platform_data = d;
|
||||
|
||||
platform_device_register(&orion_switch_device);
|
||||
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
|
||||
index 41a71ee4c3df..7257c364eb99 100644
|
||||
--- a/arch/arm64/include/asm/ptrace.h
|
||||
+++ b/arch/arm64/include/asm/ptrace.h
|
||||
@@ -70,14 +70,14 @@
|
||||
#define compat_sp regs[13]
|
||||
#define compat_lr regs[14]
|
||||
#define compat_sp_hyp regs[15]
|
||||
-#define compat_sp_irq regs[16]
|
||||
-#define compat_lr_irq regs[17]
|
||||
-#define compat_sp_svc regs[18]
|
||||
-#define compat_lr_svc regs[19]
|
||||
-#define compat_sp_abt regs[20]
|
||||
-#define compat_lr_abt regs[21]
|
||||
-#define compat_sp_und regs[22]
|
||||
-#define compat_lr_und regs[23]
|
||||
+#define compat_lr_irq regs[16]
|
||||
+#define compat_sp_irq regs[17]
|
||||
+#define compat_lr_svc regs[18]
|
||||
+#define compat_sp_svc regs[19]
|
||||
+#define compat_lr_abt regs[20]
|
||||
+#define compat_sp_abt regs[21]
|
||||
+#define compat_lr_und regs[22]
|
||||
+#define compat_sp_und regs[23]
|
||||
#define compat_r8_fiq regs[24]
|
||||
#define compat_r9_fiq regs[25]
|
||||
#define compat_r10_fiq regs[26]
|
||||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
|
||||
index 564140155c36..81e0fe48b9b0 100644
|
||||
--- a/arch/x86/kernel/cpu/common.c
|
||||
+++ b/arch/x86/kernel/cpu/common.c
|
||||
@@ -280,10 +280,9 @@ __setup("nosmap", setup_disable_smap);
|
||||
|
||||
static __always_inline void setup_smap(struct cpuinfo_x86 *c)
|
||||
{
|
||||
- unsigned long eflags;
|
||||
+ unsigned long eflags = native_save_fl();
|
||||
|
||||
/* This should have been cleared long ago */
|
||||
- raw_local_save_flags(eflags);
|
||||
BUG_ON(eflags & X86_EFLAGS_AC);
|
||||
|
||||
if (cpu_has(c, X86_FEATURE_SMAP)) {
|
||||
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
|
||||
index f2a9a2aa98f3..3280489905a8 100644
|
||||
--- a/arch/x86/kernel/head_64.S
|
||||
+++ b/arch/x86/kernel/head_64.S
|
||||
@@ -65,6 +65,9 @@ startup_64:
|
||||
* tables and then reload them.
|
||||
*/
|
||||
|
||||
+ /* Sanitize CPU configuration */
|
||||
+ call verify_cpu
|
||||
+
|
||||
/*
|
||||
* Compute the delta between the address I am compiled to run at and the
|
||||
* address I am actually running at.
|
||||
@@ -174,6 +177,9 @@ ENTRY(secondary_startup_64)
|
||||
* after the boot processor executes this code.
|
||||
*/
|
||||
|
||||
+ /* Sanitize CPU configuration */
|
||||
+ call verify_cpu
|
||||
+
|
||||
movq $(init_level4_pgt - __START_KERNEL_map), %rax
|
||||
1:
|
||||
|
||||
@@ -288,6 +294,8 @@ ENTRY(secondary_startup_64)
|
||||
pushq %rax # target address in negative space
|
||||
lretq
|
||||
|
||||
+#include "verify_cpu.S"
|
||||
+
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
/*
|
||||
* Boot CPU0 entry point. It's called from play_dead(). Everything has been set
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index 91964c663f0d..935aff397fcc 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1156,6 +1156,14 @@ void __init setup_arch(char **cmdline_p)
|
||||
clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY,
|
||||
swapper_pg_dir + KERNEL_PGD_BOUNDARY,
|
||||
KERNEL_PGD_PTRS);
|
||||
+
|
||||
+ /*
|
||||
+ * sync back low identity map too. It is used for example
|
||||
+ * in the 32-bit EFI stub.
|
||||
+ */
|
||||
+ clone_pgd_range(initial_page_table,
|
||||
+ swapper_pg_dir + KERNEL_PGD_BOUNDARY,
|
||||
+ min(KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
|
||||
#endif
|
||||
|
||||
tboot_probe();
|
||||
diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S
|
||||
index b9242bacbe59..4cf401f581e7 100644
|
||||
--- a/arch/x86/kernel/verify_cpu.S
|
||||
+++ b/arch/x86/kernel/verify_cpu.S
|
||||
@@ -34,10 +34,11 @@
|
||||
#include <asm/msr-index.h>
|
||||
|
||||
verify_cpu:
|
||||
- pushfl # Save caller passed flags
|
||||
- pushl $0 # Kill any dangerous flags
|
||||
- popfl
|
||||
+ pushf # Save caller passed flags
|
||||
+ push $0 # Kill any dangerous flags
|
||||
+ popf
|
||||
|
||||
+#ifndef __x86_64__
|
||||
pushfl # standard way to check for cpuid
|
||||
popl %eax
|
||||
movl %eax,%ebx
|
||||
@@ -48,6 +49,7 @@ verify_cpu:
|
||||
popl %eax
|
||||
cmpl %eax,%ebx
|
||||
jz verify_cpu_no_longmode # cpu has no cpuid
|
||||
+#endif
|
||||
|
||||
movl $0x0,%eax # See if cpuid 1 is implemented
|
||||
cpuid
|
||||
@@ -130,10 +132,10 @@ verify_cpu_sse_test:
|
||||
jmp verify_cpu_sse_test # try again
|
||||
|
||||
verify_cpu_no_longmode:
|
||||
- popfl # Restore caller passed flags
|
||||
+ popf # Restore caller passed flags
|
||||
movl $1,%eax
|
||||
ret
|
||||
verify_cpu_sse_ok:
|
||||
- popfl # Restore caller passed flags
|
||||
+ popf # Restore caller passed flags
|
||||
xorl %eax, %eax
|
||||
ret
|
||||
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
|
||||
index f17c3018b7c7..c2d0559115d3 100644
|
||||
--- a/drivers/net/can/sja1000/sja1000.c
|
||||
+++ b/drivers/net/can/sja1000/sja1000.c
|
||||
@@ -184,6 +184,9 @@ static void sja1000_start(struct net_device *dev)
|
||||
priv->write_reg(priv, SJA1000_RXERR, 0x0);
|
||||
priv->read_reg(priv, SJA1000_ECC);
|
||||
|
||||
+ /* clear interrupt flags */
|
||||
+ priv->read_reg(priv, SJA1000_IR);
|
||||
+
|
||||
/* leave reset mode */
|
||||
set_normal_mode(dev);
|
||||
}
|
||||
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
|
||||
index 8b6c9237eda4..d5643c143bb8 100644
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -910,7 +910,7 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
|
||||
/* Set CPU queue access map - all CPUs have access to all RX
|
||||
* queues and to all TX queues
|
||||
*/
|
||||
- for (cpu = 0; cpu < CONFIG_NR_CPUS; cpu++)
|
||||
+ for_each_present_cpu(cpu)
|
||||
mvreg_write(pp, MVNETA_CPU_MAP(cpu),
|
||||
(MVNETA_CPU_RXQ_ACCESS_ALL_MASK |
|
||||
MVNETA_CPU_TXQ_ACCESS_ALL_MASK));
|
||||
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
|
||||
index 28d706bd12eb..d64050fcafc3 100644
|
||||
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
|
||||
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
|
||||
@@ -1836,7 +1836,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
|
||||
spin_lock_init(&s_state->lock);
|
||||
}
|
||||
|
||||
- memset(&priv->mfunc.master.cmd_eqe, 0, dev->caps.eqe_size);
|
||||
+ memset(&priv->mfunc.master.cmd_eqe, 0, sizeof(struct mlx4_eqe));
|
||||
priv->mfunc.master.cmd_eqe.type = MLX4_EVENT_TYPE_CMD;
|
||||
INIT_WORK(&priv->mfunc.master.comm_work,
|
||||
mlx4_master_comm_channel);
|
||||
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
|
||||
index 6000342f9725..16a1ccc269f1 100644
|
||||
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
|
||||
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
|
||||
@@ -183,7 +183,7 @@ static void slave_event(struct mlx4_dev *dev, u8 slave, struct mlx4_eqe *eqe)
|
||||
return;
|
||||
}
|
||||
|
||||
- memcpy(s_eqe, eqe, dev->caps.eqe_size - 1);
|
||||
+ memcpy(s_eqe, eqe, sizeof(struct mlx4_eqe) - 1);
|
||||
s_eqe->slave_id = slave;
|
||||
/* ensure all information is written before setting the ownersip bit */
|
||||
wmb();
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
index c5f9cb85c8ef..ff08be535a4d 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
@@ -731,10 +731,13 @@ static int stmmac_get_ts_info(struct net_device *dev,
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
|
||||
- if ((priv->hwts_tx_en) && (priv->hwts_rx_en)) {
|
||||
+ if ((priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp)) {
|
||||
|
||||
- info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
|
||||
+ info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
|
||||
+ SOF_TIMESTAMPING_TX_HARDWARE |
|
||||
+ SOF_TIMESTAMPING_RX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_RX_HARDWARE |
|
||||
+ SOF_TIMESTAMPING_SOFTWARE |
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE;
|
||||
|
||||
if (priv->ptp_clock)
|
||||
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
|
||||
index eda9f3d87746..2840cf608312 100644
|
||||
--- a/drivers/net/ppp/pppoe.c
|
||||
+++ b/drivers/net/ppp/pppoe.c
|
||||
@@ -569,7 +569,7 @@ static int pppoe_release(struct socket *sock)
|
||||
|
||||
po = pppox_sk(sk);
|
||||
|
||||
- if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
|
||||
+ if (po->pppoe_dev) {
|
||||
dev_put(po->pppoe_dev);
|
||||
po->pppoe_dev = NULL;
|
||||
}
|
||||
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
|
||||
index 2835bfe151b1..b5d11529a39b 100644
|
||||
--- a/drivers/net/virtio_net.c
|
||||
+++ b/drivers/net/virtio_net.c
|
||||
@@ -1545,9 +1545,9 @@ static int virtnet_probe(struct virtio_device *vdev)
|
||||
/* Do we support "hardware" checksums? */
|
||||
if (virtio_has_feature(vdev, VIRTIO_NET_F_CSUM)) {
|
||||
/* This opens up the world of extra features. */
|
||||
- dev->hw_features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
|
||||
+ dev->hw_features |= NETIF_F_HW_CSUM | NETIF_F_SG;
|
||||
if (csum)
|
||||
- dev->features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
|
||||
+ dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
|
||||
|
||||
if (virtio_has_feature(vdev, VIRTIO_NET_F_GSO)) {
|
||||
dev->hw_features |= NETIF_F_TSO | NETIF_F_UFO
|
||||
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c
|
||||
index a5f9875cfd6e..f84e5d7e8bbe 100644
|
||||
--- a/drivers/net/wireless/mwifiex/debugfs.c
|
||||
+++ b/drivers/net/wireless/mwifiex/debugfs.c
|
||||
@@ -637,7 +637,7 @@ mwifiex_rdeeprom_read(struct file *file, char __user *ubuf,
|
||||
(struct mwifiex_private *) file->private_data;
|
||||
unsigned long addr = get_zeroed_page(GFP_KERNEL);
|
||||
char *buf = (char *) addr;
|
||||
- int pos = 0, ret = 0, i;
|
||||
+ int pos, ret, i;
|
||||
u8 value[MAX_EEPROM_DATA];
|
||||
|
||||
if (!buf)
|
||||
@@ -645,7 +645,7 @@ mwifiex_rdeeprom_read(struct file *file, char __user *ubuf,
|
||||
|
||||
if (saved_offset == -1) {
|
||||
/* No command has been given */
|
||||
- pos += snprintf(buf, PAGE_SIZE, "0");
|
||||
+ pos = snprintf(buf, PAGE_SIZE, "0");
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -654,17 +654,17 @@ mwifiex_rdeeprom_read(struct file *file, char __user *ubuf,
|
||||
(u16) saved_bytes, value);
|
||||
if (ret) {
|
||||
ret = -EINVAL;
|
||||
- goto done;
|
||||
+ goto out_free;
|
||||
}
|
||||
|
||||
- pos += snprintf(buf, PAGE_SIZE, "%d %d ", saved_offset, saved_bytes);
|
||||
+ pos = snprintf(buf, PAGE_SIZE, "%d %d ", saved_offset, saved_bytes);
|
||||
|
||||
for (i = 0; i < saved_bytes; i++)
|
||||
- pos += snprintf(buf + strlen(buf), PAGE_SIZE, "%d ", value[i]);
|
||||
-
|
||||
- ret = simple_read_from_buffer(ubuf, count, ppos, buf, pos);
|
||||
+ pos += scnprintf(buf + pos, PAGE_SIZE - pos, "%d ", value[i]);
|
||||
|
||||
done:
|
||||
+ ret = simple_read_from_buffer(ubuf, count, ppos, buf, pos);
|
||||
+out_free:
|
||||
free_page(addr);
|
||||
return ret;
|
||||
}
|
||||
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
|
||||
index e3a005da776b..1d9ab22d9a25 100644
|
||||
--- a/drivers/staging/rtl8712/usb_intf.c
|
||||
+++ b/drivers/staging/rtl8712/usb_intf.c
|
||||
@@ -144,6 +144,7 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = {
|
||||
{USB_DEVICE(0x0DF6, 0x0058)},
|
||||
{USB_DEVICE(0x0DF6, 0x0049)},
|
||||
{USB_DEVICE(0x0DF6, 0x004C)},
|
||||
+ {USB_DEVICE(0x0DF6, 0x006C)},
|
||||
{USB_DEVICE(0x0DF6, 0x0064)},
|
||||
/* Skyworth */
|
||||
{USB_DEVICE(0x14b2, 0x3300)},
|
||||
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
|
||||
index d4c47d5d7625..7ac5fac8600b 100644
|
||||
--- a/drivers/usb/class/usblp.c
|
||||
+++ b/drivers/usb/class/usblp.c
|
||||
@@ -870,11 +870,11 @@ static int usblp_wwait(struct usblp *usblp, int nonblock)
|
||||
|
||||
add_wait_queue(&usblp->wwait, &waita);
|
||||
for (;;) {
|
||||
- set_current_state(TASK_INTERRUPTIBLE);
|
||||
if (mutex_lock_interruptible(&usblp->mut)) {
|
||||
rc = -EINTR;
|
||||
break;
|
||||
}
|
||||
+ set_current_state(TASK_INTERRUPTIBLE);
|
||||
rc = usblp_wtest(usblp, nonblock);
|
||||
mutex_unlock(&usblp->mut);
|
||||
if (rc <= 0)
|
||||
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
|
||||
index da0caf3f4b27..462a7d57c095 100644
|
||||
--- a/drivers/usb/musb/musb_core.c
|
||||
+++ b/drivers/usb/musb/musb_core.c
|
||||
@@ -133,7 +133,7 @@ static inline struct musb *dev_to_musb(struct device *dev)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef CONFIG_BLACKFIN
|
||||
-static int musb_ulpi_read(struct usb_phy *phy, u32 offset)
|
||||
+static int musb_ulpi_read(struct usb_phy *phy, u32 reg)
|
||||
{
|
||||
void __iomem *addr = phy->io_priv;
|
||||
int i = 0;
|
||||
@@ -152,7 +152,7 @@ static int musb_ulpi_read(struct usb_phy *phy, u32 offset)
|
||||
* ULPICarKitControlDisableUTMI after clearing POWER_SUSPENDM.
|
||||
*/
|
||||
|
||||
- musb_writeb(addr, MUSB_ULPI_REG_ADDR, (u8)offset);
|
||||
+ musb_writeb(addr, MUSB_ULPI_REG_ADDR, (u8)reg);
|
||||
musb_writeb(addr, MUSB_ULPI_REG_CONTROL,
|
||||
MUSB_ULPI_REG_REQ | MUSB_ULPI_RDN_WR);
|
||||
|
||||
@@ -177,7 +177,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int musb_ulpi_write(struct usb_phy *phy, u32 offset, u32 data)
|
||||
+static int musb_ulpi_write(struct usb_phy *phy, u32 val, u32 reg)
|
||||
{
|
||||
void __iomem *addr = phy->io_priv;
|
||||
int i = 0;
|
||||
@@ -192,8 +192,8 @@ static int musb_ulpi_write(struct usb_phy *phy, u32 offset, u32 data)
|
||||
power &= ~MUSB_POWER_SUSPENDM;
|
||||
musb_writeb(addr, MUSB_POWER, power);
|
||||
|
||||
- musb_writeb(addr, MUSB_ULPI_REG_ADDR, (u8)offset);
|
||||
- musb_writeb(addr, MUSB_ULPI_REG_DATA, (u8)data);
|
||||
+ musb_writeb(addr, MUSB_ULPI_REG_ADDR, (u8)reg);
|
||||
+ musb_writeb(addr, MUSB_ULPI_REG_DATA, (u8)val);
|
||||
musb_writeb(addr, MUSB_ULPI_REG_CONTROL, MUSB_ULPI_REG_REQ);
|
||||
|
||||
while (!(musb_readb(addr, MUSB_ULPI_REG_CONTROL)
|
||||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
|
||||
index c918075e5eae..bdbe642e6569 100644
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -162,6 +162,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001
|
||||
#define NOVATELWIRELESS_PRODUCT_E362 0x9010
|
||||
#define NOVATELWIRELESS_PRODUCT_E371 0x9011
|
||||
+#define NOVATELWIRELESS_PRODUCT_U620L 0x9022
|
||||
#define NOVATELWIRELESS_PRODUCT_G2 0xA010
|
||||
#define NOVATELWIRELESS_PRODUCT_MC551 0xB001
|
||||
|
||||
@@ -354,6 +355,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
/* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick *
|
||||
* It seems to contain a Qualcomm QSC6240/6290 chipset */
|
||||
#define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603
|
||||
+#define FOUR_G_SYSTEMS_PRODUCT_W100 0x9b01
|
||||
|
||||
/* iBall 3.5G connect wireless modem */
|
||||
#define IBALL_3_5G_CONNECT 0x9605
|
||||
@@ -527,6 +529,11 @@ static const struct option_blacklist_info four_g_w14_blacklist = {
|
||||
.sendsetup = BIT(0) | BIT(1),
|
||||
};
|
||||
|
||||
+static const struct option_blacklist_info four_g_w100_blacklist = {
|
||||
+ .sendsetup = BIT(1) | BIT(2),
|
||||
+ .reserved = BIT(3),
|
||||
+};
|
||||
+
|
||||
static const struct option_blacklist_info alcatel_x200_blacklist = {
|
||||
.sendsetup = BIT(0) | BIT(1),
|
||||
.reserved = BIT(4),
|
||||
@@ -1060,6 +1067,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E371, 0xff, 0xff, 0xff) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U620L, 0xff, 0x00, 0x00) },
|
||||
|
||||
{ USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
|
||||
{ USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
|
||||
@@ -1641,6 +1649,9 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
|
||||
.driver_info = (kernel_ulong_t)&four_g_w14_blacklist
|
||||
},
|
||||
+ { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W100),
|
||||
+ .driver_info = (kernel_ulong_t)&four_g_w100_blacklist
|
||||
+ },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, SPEEDUP_PRODUCT_SU9800, 0xff) },
|
||||
{ USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
|
||||
{ USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
|
||||
diff --git a/include/net/inet_common.h b/include/net/inet_common.h
|
||||
index 234008782c8c..102fc42c7fb1 100644
|
||||
--- a/include/net/inet_common.h
|
||||
+++ b/include/net/inet_common.h
|
||||
@@ -40,7 +40,8 @@ extern int inet_ctl_sock_create(struct sock **sk, unsigned short family,
|
||||
|
||||
static inline void inet_ctl_sock_destroy(struct sock *sk)
|
||||
{
|
||||
- sk_release_kernel(sk);
|
||||
+ if (sk)
|
||||
+ sk_release_kernel(sk);
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
|
||||
index de030f50f72b..c60563394cd1 100644
|
||||
--- a/net/bluetooth/hidp/core.c
|
||||
+++ b/net/bluetooth/hidp/core.c
|
||||
@@ -396,6 +396,20 @@ static void hidp_idle_timeout(unsigned long arg)
|
||||
{
|
||||
struct hidp_session *session = (struct hidp_session *) arg;
|
||||
|
||||
+ /* The HIDP user-space API only contains calls to add and remove
|
||||
+ * devices. There is no way to forward events of any kind. Therefore,
|
||||
+ * we have to forcefully disconnect a device on idle-timeouts. This is
|
||||
+ * unfortunate and weird API design, but it is spec-compliant and
|
||||
+ * required for backwards-compatibility. Hence, on idle-timeout, we
|
||||
+ * signal driver-detach events, so poll() will be woken up with an
|
||||
+ * error-condition on both sockets.
|
||||
+ */
|
||||
+
|
||||
+ session->intr_sock->sk->sk_err = EUNATCH;
|
||||
+ session->ctrl_sock->sk->sk_err = EUNATCH;
|
||||
+ wake_up_interruptible(sk_sleep(session->intr_sock->sk));
|
||||
+ wake_up_interruptible(sk_sleep(session->ctrl_sock->sk));
|
||||
+
|
||||
hidp_session_terminate(session);
|
||||
}
|
||||
|
||||
diff --git a/net/core/dst.c b/net/core/dst.c
|
||||
index c0e021871df8..01f9980af86e 100644
|
||||
--- a/net/core/dst.c
|
||||
+++ b/net/core/dst.c
|
||||
@@ -283,7 +283,7 @@ void dst_release(struct dst_entry *dst)
|
||||
|
||||
newrefcnt = atomic_dec_return(&dst->__refcnt);
|
||||
WARN_ON(newrefcnt < 0);
|
||||
- if (unlikely(dst->flags & DST_NOCACHE) && !newrefcnt)
|
||||
+ if (!newrefcnt && unlikely(dst->flags & DST_NOCACHE))
|
||||
call_rcu(&dst->rcu_head, dst_destroy_rcu);
|
||||
}
|
||||
}
|
||||
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
|
||||
index 56d079b63ad3..6f5f943ff395 100644
|
||||
--- a/net/ipv4/ipmr.c
|
||||
+++ b/net/ipv4/ipmr.c
|
||||
@@ -1672,8 +1672,8 @@ static inline int ipmr_forward_finish(struct sk_buff *skb)
|
||||
{
|
||||
struct ip_options *opt = &(IPCB(skb)->opt);
|
||||
|
||||
- IP_INC_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS);
|
||||
- IP_ADD_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTOCTETS, skb->len);
|
||||
+ IP_INC_STATS(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS);
|
||||
+ IP_ADD_STATS(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTOCTETS, skb->len);
|
||||
|
||||
if (unlikely(opt->optlen))
|
||||
ip_forward_options(skb);
|
||||
@@ -1735,7 +1735,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
|
||||
* to blackhole.
|
||||
*/
|
||||
|
||||
- IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_FRAGFAILS);
|
||||
+ IP_INC_STATS(dev_net(dev), IPSTATS_MIB_FRAGFAILS);
|
||||
ip_rt_put(rt);
|
||||
goto out_free;
|
||||
}
|
||||
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
|
||||
index 98ad6ec4bd3c..8ad149478e19 100644
|
||||
--- a/net/irda/irlmp.c
|
||||
+++ b/net/irda/irlmp.c
|
||||
@@ -1876,7 +1876,7 @@ static void *irlmp_seq_hb_idx(struct irlmp_iter_state *iter, loff_t *off)
|
||||
for (element = hashbin_get_first(iter->hashbin);
|
||||
element != NULL;
|
||||
element = hashbin_get_next(iter->hashbin)) {
|
||||
- if (!off || *off-- == 0) {
|
||||
+ if (!off || (*off)-- == 0) {
|
||||
/* NB: hashbin left locked */
|
||||
return element;
|
||||
}
|
||||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
|
||||
index e606e4a113e1..952cb336d704 100644
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -3074,7 +3074,7 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
|
||||
|
||||
if (ifmgd->rssi_min_thold != ifmgd->rssi_max_thold &&
|
||||
ifmgd->count_beacon_signal >= IEEE80211_SIGNAL_AVE_MIN_COUNT) {
|
||||
- int sig = ifmgd->ave_beacon_signal;
|
||||
+ int sig = ifmgd->ave_beacon_signal / 16;
|
||||
int last_sig = ifmgd->last_ave_beacon_signal;
|
||||
|
||||
/*
|
||||
diff --git a/net/rds/connection.c b/net/rds/connection.c
|
||||
index 642ad42c416b..e88bf3976e54 100644
|
||||
--- a/net/rds/connection.c
|
||||
+++ b/net/rds/connection.c
|
||||
@@ -177,6 +177,12 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr,
|
||||
}
|
||||
}
|
||||
|
||||
+ if (trans == NULL) {
|
||||
+ kmem_cache_free(rds_conn_slab, conn);
|
||||
+ conn = ERR_PTR(-ENODEV);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
conn->c_trans = trans;
|
||||
|
||||
ret = trans->conn_alloc(conn, gfp);
|
||||
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
|
||||
index 4fac4f2bb9dc..8b33d9967b56 100644
|
||||
--- a/net/rds/tcp_recv.c
|
||||
+++ b/net/rds/tcp_recv.c
|
||||
@@ -234,8 +234,15 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
|
||||
}
|
||||
|
||||
to_copy = min(tc->t_tinc_data_rem, left);
|
||||
- pskb_pull(clone, offset);
|
||||
- pskb_trim(clone, to_copy);
|
||||
+ if (!pskb_pull(clone, offset) ||
|
||||
+ pskb_trim(clone, to_copy)) {
|
||||
+ pr_warn("rds_tcp_data_recv: pull/trim failed "
|
||||
+ "left %zu data_rem %zu skb_len %d\n",
|
||||
+ left, tc->t_tinc_data_rem, skb->len);
|
||||
+ kfree_skb(clone);
|
||||
+ desc->error = -ENOMEM;
|
||||
+ goto out;
|
||||
+ }
|
||||
skb_queue_tail(&tinc->ti_skb_list, clone);
|
||||
|
||||
rdsdebug("skb %p data %p len %d off %u to_copy %zu -> "
|
||||
diff --git a/sound/usb/midi.c b/sound/usb/midi.c
|
||||
index 93249133aeec..dabbe05d17f5 100644
|
||||
--- a/sound/usb/midi.c
|
||||
+++ b/sound/usb/midi.c
|
||||
@@ -174,6 +174,8 @@ struct snd_usb_midi_in_endpoint {
|
||||
u8 running_status_length;
|
||||
} ports[0x10];
|
||||
u8 seen_f5;
|
||||
+ bool in_sysex;
|
||||
+ u8 last_cin;
|
||||
u8 error_resubmit;
|
||||
int current_port;
|
||||
};
|
||||
@@ -465,6 +467,39 @@ static void snd_usbmidi_maudio_broken_running_status_input(
|
||||
}
|
||||
|
||||
/*
|
||||
+ * QinHeng CH345 is buggy: every second packet inside a SysEx has not CIN 4
|
||||
+ * but the previously seen CIN, but still with three data bytes.
|
||||
+ */
|
||||
+static void ch345_broken_sysex_input(struct snd_usb_midi_in_endpoint *ep,
|
||||
+ uint8_t *buffer, int buffer_length)
|
||||
+{
|
||||
+ unsigned int i, cin, length;
|
||||
+
|
||||
+ for (i = 0; i + 3 < buffer_length; i += 4) {
|
||||
+ if (buffer[i] == 0 && i > 0)
|
||||
+ break;
|
||||
+ cin = buffer[i] & 0x0f;
|
||||
+ if (ep->in_sysex &&
|
||||
+ cin == ep->last_cin &&
|
||||
+ (buffer[i + 1 + (cin == 0x6)] & 0x80) == 0)
|
||||
+ cin = 0x4;
|
||||
+#if 0
|
||||
+ if (buffer[i + 1] == 0x90) {
|
||||
+ /*
|
||||
+ * Either a corrupted running status or a real note-on
|
||||
+ * message; impossible to detect reliably.
|
||||
+ */
|
||||
+ }
|
||||
+#endif
|
||||
+ length = snd_usbmidi_cin_length[cin];
|
||||
+ snd_usbmidi_input_data(ep, 0, &buffer[i + 1], length);
|
||||
+ ep->in_sysex = cin == 0x4;
|
||||
+ if (!ep->in_sysex)
|
||||
+ ep->last_cin = cin;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* CME protocol: like the standard protocol, but SysEx commands are sent as a
|
||||
* single USB packet preceded by a 0x0F byte.
|
||||
*/
|
||||
@@ -650,6 +685,12 @@ static struct usb_protocol_ops snd_usbmidi_cme_ops = {
|
||||
.output_packet = snd_usbmidi_output_standard_packet,
|
||||
};
|
||||
|
||||
+static struct usb_protocol_ops snd_usbmidi_ch345_broken_sysex_ops = {
|
||||
+ .input = ch345_broken_sysex_input,
|
||||
+ .output = snd_usbmidi_standard_output,
|
||||
+ .output_packet = snd_usbmidi_output_standard_packet,
|
||||
+};
|
||||
+
|
||||
/*
|
||||
* AKAI MPD16 protocol:
|
||||
*
|
||||
@@ -1326,6 +1367,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
|
||||
* Various chips declare a packet size larger than 4 bytes, but
|
||||
* do not actually work with larger packets:
|
||||
*/
|
||||
+ case USB_ID(0x0a67, 0x5011): /* Medeli DD305 */
|
||||
case USB_ID(0x0a92, 0x1020): /* ESI M4U */
|
||||
case USB_ID(0x1430, 0x474b): /* RedOctane GH MIDI INTERFACE */
|
||||
case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */
|
||||
@@ -2216,6 +2258,10 @@ int snd_usbmidi_create(struct snd_card *card,
|
||||
|
||||
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
|
||||
break;
|
||||
+ case QUIRK_MIDI_CH345:
|
||||
+ umidi->usb_protocol_ops = &snd_usbmidi_ch345_broken_sysex_ops;
|
||||
+ err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
|
||||
+ break;
|
||||
default:
|
||||
snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
|
||||
err = -ENXIO;
|
||||
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
|
||||
index 45d586b6e8b5..9ec5ce4e35fb 100644
|
||||
--- a/sound/usb/quirks-table.h
|
||||
+++ b/sound/usb/quirks-table.h
|
||||
@@ -3041,6 +3041,17 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||
.idProduct = 0x1020,
|
||||
},
|
||||
|
||||
+/* QinHeng devices */
|
||||
+{
|
||||
+ USB_DEVICE(0x1a86, 0x752d),
|
||||
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
|
||||
+ .vendor_name = "QinHeng",
|
||||
+ .product_name = "CH345",
|
||||
+ .ifnum = 1,
|
||||
+ .type = QUIRK_MIDI_CH345
|
||||
+ }
|
||||
+},
|
||||
+
|
||||
/* KeithMcMillen Stringport */
|
||||
{
|
||||
USB_DEVICE(0x1f38, 0x0001),
|
||||
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
|
||||
index 734c6579b194..94cd28c2bd8d 100644
|
||||
--- a/sound/usb/quirks.c
|
||||
+++ b/sound/usb/quirks.c
|
||||
@@ -313,6 +313,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
|
||||
[QUIRK_MIDI_CME] = create_any_midi_quirk,
|
||||
[QUIRK_MIDI_AKAI] = create_any_midi_quirk,
|
||||
[QUIRK_MIDI_FTDI] = create_any_midi_quirk,
|
||||
+ [QUIRK_MIDI_CH345] = create_any_midi_quirk,
|
||||
[QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk,
|
||||
[QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk,
|
||||
[QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk,
|
||||
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
|
||||
index bc43bcaddf4d..d6f3fefc882f 100644
|
||||
--- a/sound/usb/usbaudio.h
|
||||
+++ b/sound/usb/usbaudio.h
|
||||
@@ -83,6 +83,7 @@ enum quirk_type {
|
||||
QUIRK_MIDI_AKAI,
|
||||
QUIRK_MIDI_US122L,
|
||||
QUIRK_MIDI_FTDI,
|
||||
+ QUIRK_MIDI_CH345,
|
||||
QUIRK_AUDIO_STANDARD_INTERFACE,
|
||||
QUIRK_AUDIO_FIXED_ENDPOINT,
|
||||
QUIRK_AUDIO_EDIROL_UAXX,
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,478 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index d3cb458b295a..f6a2cbd438a1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 103
|
||||
+SUBLEVEL = 104
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/mips/kvm/kvm_tlb.c b/arch/mips/kvm/kvm_tlb.c
|
||||
index 4bee4397dca8..8a47bd96cee3 100644
|
||||
--- a/arch/mips/kvm/kvm_tlb.c
|
||||
+++ b/arch/mips/kvm/kvm_tlb.c
|
||||
@@ -182,7 +182,7 @@ static int kvm_mips_map_page(struct kvm *kvm, gfn_t gfn)
|
||||
srcu_idx = srcu_read_lock(&kvm->srcu);
|
||||
pfn = kvm_mips_gfn_to_pfn(kvm, gfn);
|
||||
|
||||
- if (kvm_mips_is_error_pfn(pfn)) {
|
||||
+ if (is_error_noslot_pfn(pfn)) {
|
||||
kvm_err("Couldn't get pfn for gfn %#" PRIx64 "!\n", gfn);
|
||||
err = -EFAULT;
|
||||
goto out;
|
||||
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
|
||||
index a5e339806589..d55357ee9028 100644
|
||||
--- a/arch/powerpc/kernel/process.c
|
||||
+++ b/arch/powerpc/kernel/process.c
|
||||
@@ -1088,16 +1088,6 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
|
||||
current->thread.regs = regs - 1;
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||
- /*
|
||||
- * Clear any transactional state, we're exec()ing. The cause is
|
||||
- * not important as there will never be a recheckpoint so it's not
|
||||
- * user visible.
|
||||
- */
|
||||
- if (MSR_TM_SUSPENDED(mfmsr()))
|
||||
- tm_reclaim_current(0);
|
||||
-#endif
|
||||
-
|
||||
memset(regs->gpr, 0, sizeof(regs->gpr));
|
||||
regs->ctr = 0;
|
||||
regs->link = 0;
|
||||
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
|
||||
index fcae5fa2e1b3..95b6371e1fe7 100644
|
||||
--- a/drivers/acpi/sysfs.c
|
||||
+++ b/drivers/acpi/sysfs.c
|
||||
@@ -492,23 +492,22 @@ static void acpi_global_event_handler(u32 event_type, acpi_handle device,
|
||||
static int get_status(u32 index, acpi_event_status *status,
|
||||
acpi_handle *handle)
|
||||
{
|
||||
- int result = 0;
|
||||
+ int result;
|
||||
|
||||
if (index >= num_gpes + ACPI_NUM_FIXED_EVENTS)
|
||||
- goto end;
|
||||
+ return -EINVAL;
|
||||
|
||||
if (index < num_gpes) {
|
||||
result = acpi_get_gpe_device(index, handle);
|
||||
if (result) {
|
||||
ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
|
||||
"Invalid GPE 0x%x", index));
|
||||
- goto end;
|
||||
+ return result;
|
||||
}
|
||||
result = acpi_get_gpe_status(*handle, index, status);
|
||||
} else if (index < (num_gpes + ACPI_NUM_FIXED_EVENTS))
|
||||
result = acpi_get_event_status(index - num_gpes, status);
|
||||
|
||||
-end:
|
||||
return result;
|
||||
}
|
||||
|
||||
diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c
|
||||
index bbdab6e5ccf0..fe689643a5ad 100644
|
||||
--- a/drivers/crypto/nx/nx.c
|
||||
+++ b/drivers/crypto/nx/nx.c
|
||||
@@ -309,7 +309,7 @@ static void nx_of_update_msc(struct device *dev,
|
||||
((bytes_so_far + sizeof(struct msc_triplet)) <= lenp) &&
|
||||
i < msc->triplets;
|
||||
i++) {
|
||||
- if (msc->fc > NX_MAX_FC || msc->mode > NX_MAX_MODE) {
|
||||
+ if (msc->fc >= NX_MAX_FC || msc->mode >= NX_MAX_MODE) {
|
||||
dev_err(dev, "unknown function code/mode "
|
||||
"combo: %d/%d (ignored)\n", msc->fc,
|
||||
msc->mode);
|
||||
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
|
||||
index f2faa779e3fe..dd6b7c362813 100644
|
||||
--- a/drivers/net/xen-netback/common.h
|
||||
+++ b/drivers/net/xen-netback/common.h
|
||||
@@ -66,6 +66,8 @@ struct xenvif {
|
||||
/* The shared rings and indexes. */
|
||||
struct xen_netif_tx_back_ring tx;
|
||||
struct xen_netif_rx_back_ring rx;
|
||||
+ atomic_t ring_refcnt;
|
||||
+ wait_queue_head_t waiting_to_unmap;
|
||||
|
||||
/* Frontend feature information. */
|
||||
u8 can_sg:1;
|
||||
@@ -120,6 +122,8 @@ void xenvif_free(struct xenvif *vif);
|
||||
|
||||
void xenvif_get(struct xenvif *vif);
|
||||
void xenvif_put(struct xenvif *vif);
|
||||
+void xenvif_get_rings(struct xenvif *vif);
|
||||
+void xenvif_put_rings(struct xenvif *vif);
|
||||
|
||||
int xenvif_xenbus_init(void);
|
||||
|
||||
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
|
||||
index 540a796593a3..7e3817a55e77 100644
|
||||
--- a/drivers/net/xen-netback/interface.c
|
||||
+++ b/drivers/net/xen-netback/interface.c
|
||||
@@ -44,12 +44,23 @@ void xenvif_get(struct xenvif *vif)
|
||||
atomic_inc(&vif->refcnt);
|
||||
}
|
||||
|
||||
+void xenvif_get_rings(struct xenvif *vif)
|
||||
+{
|
||||
+ atomic_inc(&vif->ring_refcnt);
|
||||
+}
|
||||
+
|
||||
void xenvif_put(struct xenvif *vif)
|
||||
{
|
||||
if (atomic_dec_and_test(&vif->refcnt))
|
||||
wake_up(&vif->waiting_to_free);
|
||||
}
|
||||
|
||||
+void xenvif_put_rings(struct xenvif *vif)
|
||||
+{
|
||||
+ if (atomic_dec_and_test(&vif->ring_refcnt))
|
||||
+ wake_up(&vif->waiting_to_unmap);
|
||||
+}
|
||||
+
|
||||
int xenvif_schedulable(struct xenvif *vif)
|
||||
{
|
||||
return netif_running(vif->dev) && netif_carrier_ok(vif->dev);
|
||||
@@ -91,6 +102,7 @@ static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
/* Reserve ring slots for the worst-case number of fragments. */
|
||||
vif->rx_req_cons_peek += xen_netbk_count_skb_slots(vif, skb);
|
||||
xenvif_get(vif);
|
||||
+ xenvif_get_rings(vif);
|
||||
|
||||
if (vif->can_queue && xen_netbk_must_stop_queue(vif))
|
||||
netif_stop_queue(dev);
|
||||
@@ -271,6 +283,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
|
||||
vif->dev = dev;
|
||||
INIT_LIST_HEAD(&vif->schedule_list);
|
||||
INIT_LIST_HEAD(&vif->notify_list);
|
||||
+ init_waitqueue_head(&vif->waiting_to_unmap);
|
||||
|
||||
vif->credit_bytes = vif->remaining_credit = ~0UL;
|
||||
vif->credit_usec = 0UL;
|
||||
@@ -365,12 +378,12 @@ void xenvif_disconnect(struct xenvif *vif)
|
||||
if (netif_carrier_ok(vif->dev))
|
||||
xenvif_carrier_off(vif);
|
||||
|
||||
+ disable_irq(vif->irq);
|
||||
+ xen_netbk_unmap_frontend_rings(vif);
|
||||
if (vif->irq) {
|
||||
unbind_from_irqhandler(vif->irq, vif);
|
||||
vif->irq = 0;
|
||||
}
|
||||
-
|
||||
- xen_netbk_unmap_frontend_rings(vif);
|
||||
}
|
||||
|
||||
void xenvif_free(struct xenvif *vif)
|
||||
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
|
||||
index 70b830f6c4bf..1595f818b8c0 100644
|
||||
--- a/drivers/net/xen-netback/netback.c
|
||||
+++ b/drivers/net/xen-netback/netback.c
|
||||
@@ -814,6 +814,7 @@ static void xen_netbk_rx_action(struct xen_netbk *netbk)
|
||||
xenvif_put(vif);
|
||||
npo.meta_cons += sco->meta_slots_used;
|
||||
dev_kfree_skb(skb);
|
||||
+ xenvif_put_rings(vif);
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(vif, tmp, ¬ify, notify_list) {
|
||||
@@ -1864,6 +1865,9 @@ static int xen_netbk_kthread(void *data)
|
||||
|
||||
void xen_netbk_unmap_frontend_rings(struct xenvif *vif)
|
||||
{
|
||||
+ atomic_dec(&vif->ring_refcnt);
|
||||
+ wait_event(vif->waiting_to_unmap, atomic_read(&vif->ring_refcnt) == 0);
|
||||
+
|
||||
if (vif->tx.sring)
|
||||
xenbus_unmap_ring_vfree(xenvif_to_xenbus_device(vif),
|
||||
vif->tx.sring);
|
||||
@@ -1882,6 +1886,8 @@ int xen_netbk_map_frontend_rings(struct xenvif *vif,
|
||||
|
||||
int err = -ENOMEM;
|
||||
|
||||
+ atomic_set(&vif->ring_refcnt, 1);
|
||||
+
|
||||
err = xenbus_map_ring_valloc(xenvif_to_xenbus_device(vif),
|
||||
tx_ring_ref, &addr);
|
||||
if (err)
|
||||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
|
||||
index 689f3c87ee5c..aee15ce8cfce 100644
|
||||
--- a/drivers/pci/pci-sysfs.c
|
||||
+++ b/drivers/pci/pci-sysfs.c
|
||||
@@ -1308,10 +1308,10 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev)
|
||||
if (!sysfs_initialized)
|
||||
return -EACCES;
|
||||
|
||||
- if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE)
|
||||
- retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr);
|
||||
- else
|
||||
+ if (pdev->cfg_size > PCI_CFG_SPACE_SIZE)
|
||||
retval = sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr);
|
||||
+ else
|
||||
+ retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr);
|
||||
if (retval)
|
||||
goto err;
|
||||
|
||||
@@ -1368,10 +1368,10 @@ err_rom_file:
|
||||
err_resource_files:
|
||||
pci_remove_resource_files(pdev);
|
||||
err_config_file:
|
||||
- if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE)
|
||||
- sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
|
||||
- else
|
||||
+ if (pdev->cfg_size > PCI_CFG_SPACE_SIZE)
|
||||
sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr);
|
||||
+ else
|
||||
+ sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
|
||||
err:
|
||||
return retval;
|
||||
}
|
||||
@@ -1405,10 +1405,10 @@ void pci_remove_sysfs_dev_files(struct pci_dev *pdev)
|
||||
|
||||
pci_remove_capabilities_sysfs(pdev);
|
||||
|
||||
- if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE)
|
||||
- sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
|
||||
- else
|
||||
+ if (pdev->cfg_size > PCI_CFG_SPACE_SIZE)
|
||||
sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr);
|
||||
+ else
|
||||
+ sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
|
||||
|
||||
pci_remove_resource_files(pdev);
|
||||
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index 390e4094e4d5..a6637158d078 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -292,6 +292,18 @@ static void quirk_citrine(struct pci_dev *dev)
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, quirk_citrine);
|
||||
|
||||
+/*
|
||||
+ * This chip can cause bus lockups if config addresses above 0x600
|
||||
+ * are read or written.
|
||||
+ */
|
||||
+static void quirk_nfp6000(struct pci_dev *dev)
|
||||
+{
|
||||
+ dev->cfg_size = 0x600;
|
||||
+}
|
||||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP4000, quirk_nfp6000);
|
||||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP6000, quirk_nfp6000);
|
||||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP6000_VF, quirk_nfp6000);
|
||||
+
|
||||
/* On IBM Crocodile ipr SAS adapters, expand BAR to system page size */
|
||||
static void quirk_extend_bar_to_page(struct pci_dev *dev)
|
||||
{
|
||||
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
|
||||
index ee6caddd978c..d6fcadd7de2c 100644
|
||||
--- a/drivers/scsi/aacraid/commctrl.c
|
||||
+++ b/drivers/scsi/aacraid/commctrl.c
|
||||
@@ -63,7 +63,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
|
||||
struct fib *fibptr;
|
||||
struct hw_fib * hw_fib = (struct hw_fib *)0;
|
||||
dma_addr_t hw_fib_pa = (dma_addr_t)0LL;
|
||||
- unsigned size;
|
||||
+ unsigned int size, osize;
|
||||
int retval;
|
||||
|
||||
if (dev->in_reset) {
|
||||
@@ -87,7 +87,8 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
|
||||
* will not overrun the buffer when we copy the memory. Return
|
||||
* an error if we would.
|
||||
*/
|
||||
- size = le16_to_cpu(kfib->header.Size) + sizeof(struct aac_fibhdr);
|
||||
+ osize = size = le16_to_cpu(kfib->header.Size) +
|
||||
+ sizeof(struct aac_fibhdr);
|
||||
if (size < le16_to_cpu(kfib->header.SenderSize))
|
||||
size = le16_to_cpu(kfib->header.SenderSize);
|
||||
if (size > dev->max_fib_size) {
|
||||
@@ -118,6 +119,14 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+ /* Sanity check the second copy */
|
||||
+ if ((osize != le16_to_cpu(kfib->header.Size) +
|
||||
+ sizeof(struct aac_fibhdr))
|
||||
+ || (size < le16_to_cpu(kfib->header.SenderSize))) {
|
||||
+ retval = -EINVAL;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
if (kfib->header.Command == cpu_to_le16(TakeABreakPt)) {
|
||||
aac_adapter_interrupt(dev);
|
||||
/*
|
||||
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
index e6dfa8108301..6ced6a398d60 100644
|
||||
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
@@ -3470,7 +3470,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
|
||||
/* Find first memory bar */
|
||||
bar_list = pci_select_bars(instance->pdev, IORESOURCE_MEM);
|
||||
instance->bar = find_first_bit(&bar_list, sizeof(unsigned long));
|
||||
- if (pci_request_selected_regions(instance->pdev, instance->bar,
|
||||
+ if (pci_request_selected_regions(instance->pdev, 1<<instance->bar,
|
||||
"megasas: LSI")) {
|
||||
printk(KERN_DEBUG "megasas: IO memory region busy!\n");
|
||||
return -EBUSY;
|
||||
@@ -3640,7 +3640,7 @@ fail_ready_state:
|
||||
iounmap(instance->reg_set);
|
||||
|
||||
fail_ioremap:
|
||||
- pci_release_selected_regions(instance->pdev, instance->bar);
|
||||
+ pci_release_selected_regions(instance->pdev, 1<<instance->bar);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -3661,7 +3661,7 @@ static void megasas_release_mfi(struct megasas_instance *instance)
|
||||
|
||||
iounmap(instance->reg_set);
|
||||
|
||||
- pci_release_selected_regions(instance->pdev, instance->bar);
|
||||
+ pci_release_selected_regions(instance->pdev, 1<<instance->bar);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
|
||||
index a7d56687bfca..d478088ce5cf 100644
|
||||
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
|
||||
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
|
||||
@@ -2020,7 +2020,7 @@ megasas_release_fusion(struct megasas_instance *instance)
|
||||
|
||||
iounmap(instance->reg_set);
|
||||
|
||||
- pci_release_selected_regions(instance->pdev, instance->bar);
|
||||
+ pci_release_selected_regions(instance->pdev, 1<<instance->bar);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
|
||||
index b87f95c3e17d..1465a26b15cf 100644
|
||||
--- a/drivers/staging/comedi/drivers/daqboard2000.c
|
||||
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
|
||||
@@ -678,7 +678,7 @@ static const void *daqboard2000_find_boardinfo(struct comedi_device *dev,
|
||||
const struct daq200_boardtype *board;
|
||||
int i;
|
||||
|
||||
- if (pcidev->subsystem_device != PCI_VENDOR_ID_IOTECH)
|
||||
+ if (pcidev->subsystem_vendor != PCI_VENDOR_ID_IOTECH)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(boardtypes); i++) {
|
||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||
index 53b0d70120a1..55590f4fe110 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -1715,6 +1715,7 @@ static inline struct page *follow_page(struct vm_area_struct *vma,
|
||||
#define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */
|
||||
#define FOLL_NUMA 0x200 /* force NUMA hinting page fault */
|
||||
#define FOLL_MIGRATION 0x400 /* wait for page to replace migration entry */
|
||||
+#define FOLL_COW 0x4000 /* internal GUP flag */
|
||||
|
||||
typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
|
||||
void *data);
|
||||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
|
||||
index 6c7bb35ad6d1..302182a2f99d 100644
|
||||
--- a/include/linux/pci_ids.h
|
||||
+++ b/include/linux/pci_ids.h
|
||||
@@ -2472,6 +2472,13 @@
|
||||
#define PCI_DEVICE_ID_KORENIX_JETCARDF2 0x1700
|
||||
#define PCI_DEVICE_ID_KORENIX_JETCARDF3 0x17ff
|
||||
|
||||
+#define PCI_VENDOR_ID_NETRONOME 0x19ee
|
||||
+#define PCI_DEVICE_ID_NETRONOME_NFP3200 0x3200
|
||||
+#define PCI_DEVICE_ID_NETRONOME_NFP3240 0x3240
|
||||
+#define PCI_DEVICE_ID_NETRONOME_NFP4000 0x4000
|
||||
+#define PCI_DEVICE_ID_NETRONOME_NFP6000 0x6000
|
||||
+#define PCI_DEVICE_ID_NETRONOME_NFP6000_VF 0x6003
|
||||
+
|
||||
#define PCI_VENDOR_ID_QMI 0x1a32
|
||||
|
||||
#define PCI_VENDOR_ID_AZWAVE 0x1a3b
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index 30bf9cce8c2b..2ca2ee113ea2 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -1462,6 +1462,16 @@ int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(zap_vma_ptes);
|
||||
|
||||
+/*
|
||||
+ * FOLL_FORCE can write to even unwritable pte's, but only
|
||||
+ * after we've gone through a COW cycle and they are dirty.
|
||||
+ */
|
||||
+static inline bool can_follow_write_pte(pte_t pte, unsigned int flags)
|
||||
+{
|
||||
+ return pte_write(pte) ||
|
||||
+ ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pte_dirty(pte));
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* follow_page_mask - look up a page descriptor from a user-virtual address
|
||||
* @vma: vm_area_struct mapping @address
|
||||
@@ -1569,7 +1579,7 @@ split_fallthrough:
|
||||
}
|
||||
if ((flags & FOLL_NUMA) && pte_numa(pte))
|
||||
goto no_page;
|
||||
- if ((flags & FOLL_WRITE) && !pte_write(pte))
|
||||
+ if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, flags))
|
||||
goto unlock;
|
||||
|
||||
page = vm_normal_page(vma, address, pte);
|
||||
@@ -1877,7 +1887,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
||||
*/
|
||||
if ((ret & VM_FAULT_WRITE) &&
|
||||
!(vma->vm_flags & VM_WRITE))
|
||||
- foll_flags &= ~FOLL_WRITE;
|
||||
+ foll_flags |= FOLL_COW;
|
||||
|
||||
cond_resched();
|
||||
}
|
||||
@@ -3834,8 +3844,18 @@ retry:
|
||||
if (unlikely(pmd_none(*pmd)) &&
|
||||
unlikely(__pte_alloc(mm, vma, pmd, address)))
|
||||
return VM_FAULT_OOM;
|
||||
- /* if an huge pmd materialized from under us just retry later */
|
||||
- if (unlikely(pmd_trans_huge(*pmd)))
|
||||
+ /*
|
||||
+ * If a huge pmd materialized under us just retry later. Use
|
||||
+ * pmd_trans_unstable() instead of pmd_trans_huge() to ensure the pmd
|
||||
+ * didn't become pmd_trans_huge under us and then back to pmd_none, as
|
||||
+ * a result of MADV_DONTNEED running immediately after a huge pmd fault
|
||||
+ * in a different thread of this mm, in turn leading to a misleading
|
||||
+ * pmd_trans_huge() retval. All we have to ensure is that it is a
|
||||
+ * regular pmd that we can walk with pte_offset_map() and we can do that
|
||||
+ * through an atomic read in C, which is what pmd_trans_unstable()
|
||||
+ * provides.
|
||||
+ */
|
||||
+ if (unlikely(pmd_trans_unstable(pmd)))
|
||||
return 0;
|
||||
/*
|
||||
* A regular pmd is established and it can't morph into a huge pmd
|
||||
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
|
||||
index 13c88fbcf037..0038834b558e 100644
|
||||
--- a/security/yama/yama_lsm.c
|
||||
+++ b/security/yama/yama_lsm.c
|
||||
@@ -292,7 +292,7 @@ int yama_ptrace_access_check(struct task_struct *child,
|
||||
return rc;
|
||||
|
||||
/* require ptrace target be a child of ptracer on attach */
|
||||
- if (mode == PTRACE_MODE_ATTACH) {
|
||||
+ if (mode & PTRACE_MODE_ATTACH) {
|
||||
switch (ptrace_scope) {
|
||||
case YAMA_SCOPE_DISABLED:
|
||||
/* No additional restrictions. */
|
||||
@@ -318,7 +318,7 @@ int yama_ptrace_access_check(struct task_struct *child,
|
||||
}
|
||||
}
|
||||
|
||||
- if (rc) {
|
||||
+ if (rc && (mode & PTRACE_MODE_NOAUDIT) == 0) {
|
||||
printk_ratelimited(KERN_NOTICE
|
||||
"ptrace of pid %d was attempted by: %s (pid %d)\n",
|
||||
child->pid, current->comm, current->pid);
|
||||
@ -1,28 +0,0 @@
|
||||
From: Sedat Dilek <sedat.dilek@gmail.com>
|
||||
|
||||
With OverlayFS v22 I get the following build error when
|
||||
CONFIG_OVERLAYFS_FS=m
|
||||
|
||||
ERROR: "d_ancestor" [fs/overlayfs/overlayfs.ko] undefined!
|
||||
|
||||
Fix this by adding the missing export.
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
|
||||
---
|
||||
fs/dcache.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index 42ae01eefc07..b233bfc849de 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -2559,6 +2559,7 @@ struct dentry *d_ancestor(struct dentry *p1, struct dentry *p2)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
+EXPORT_SYMBOL(d_ancestor);
|
||||
|
||||
/*
|
||||
* This helper attempts to cope with remotely renamed directories
|
||||
--
|
||||
1.8.1.4
|
||||
@ -1,58 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -341,6 +341,10 @@ ath_reg_apply_beaconing_flags(struct wip
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i;
|
||||
|
||||
+#ifdef CPTCFG_ATH_USER_REGD
|
||||
+ return;
|
||||
+#endif
|
||||
+
|
||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||
if (!wiphy->bands[band])
|
||||
continue;
|
||||
@@ -374,6 +378,10 @@ ath_reg_apply_ir_flags(struct wiphy *wip
|
||||
{
|
||||
struct ieee80211_supported_band *sband;
|
||||
|
||||
+#ifdef CPTCFG_ATH_USER_REGD
|
||||
+ return;
|
||||
+#endif
|
||||
+
|
||||
sband = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
if (!sband)
|
||||
return;
|
||||
@@ -402,6 +410,10 @@ static void ath_reg_apply_radar_flags(st
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i;
|
||||
|
||||
+#ifdef CPTCFG_ATH_USER_REGD
|
||||
+ return;
|
||||
+#endif
|
||||
+
|
||||
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
||||
return;
|
||||
|
||||
@@ -631,6 +643,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
{
|
||||
const struct ieee80211_regdomain *regd;
|
||||
|
||||
+#ifdef CPTCFG_ATH_USER_REGD
|
||||
+ return 0;
|
||||
+#endif
|
||||
+
|
||||
wiphy->reg_notifier = reg_notifier;
|
||||
wiphy->regulatory_flags |= REGULATORY_STRICT_REG |
|
||||
REGULATORY_CUSTOM_REG;
|
||||
--- a/drivers/net/wireless/ath/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/Kconfig
|
||||
@@ -21,6 +21,9 @@ menuconfig ATH_CARDS
|
||||
|
||||
if ATH_CARDS
|
||||
|
||||
+config ATH_USER_REGD
|
||||
+ bool "Do not enforce EEPROM regulatory restrictions"
|
||||
+
|
||||
config ATH_DEBUG
|
||||
bool "Atheros wireless debugging"
|
||||
---help---
|
||||
@ -1,190 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 04f1729..df7fade 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -96,7 +96,8 @@ dtb-$(CONFIG_ARCH_MVEBU) += armada-38x-modular.dtb \
|
||||
armada-385-customer1.dtb \
|
||||
armada-382-customer2.dtb \
|
||||
armada-385-customer3.dtb \
|
||||
- armada-388-clearfog.dtb
|
||||
+ armada-388-clearfog.dtb \
|
||||
+ armada-388-clearfog-base.dtb
|
||||
dtb-$(CONFIG_ARCH_MXC) += \
|
||||
imx25-karo-tx25.dtb \
|
||||
imx25-pdk.dtb \
|
||||
diff --git a/arch/arm/boot/dts/armada-388-clearfog-base.dts b/arch/arm/boot/dts/armada-388-clearfog-base.dts
|
||||
new file mode 100644
|
||||
index 0000000..5f036ee
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/armada-388-clearfog-base.dts
|
||||
@@ -0,0 +1,170 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun's ClearFog-a1 board
|
||||
+ *
|
||||
+ * Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * version 2 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include "armada-385-388.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun ClearFog a1 board";
|
||||
+ compatible = "marvell,a388-db-gp", "marvell,armada388", "marvell,armada38x";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200 earlyprintk";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x10000000>; /* 256 MB */
|
||||
+ };
|
||||
+
|
||||
+ soc {
|
||||
+ internal-regs {
|
||||
+ ethernet@70000 {
|
||||
+ status = "okay";
|
||||
+ phy = <&phy0>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ };
|
||||
+
|
||||
+ ethernet@30000 {
|
||||
+ status = "okay";
|
||||
+ phy = <&phy1>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ ethernet@34000 {
|
||||
+ status = "okay";
|
||||
+ phy = <&phy2>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ i2c0: i2c@11000 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <100000>;
|
||||
+ };
|
||||
+
|
||||
+ i2c1: i2c@11100 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <100000>;
|
||||
+ };
|
||||
+
|
||||
+ mdio {
|
||||
+ phy0: ethernet-phy@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+ phy1: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ phy2: ethernet-phy@2 {
|
||||
+ reg = <999>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sata@a8000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ sata@e0000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ tdm@b0000 {
|
||||
+ pinctrl-0 = <&tdm_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pclk-freq-mhz = <8>;
|
||||
+ };
|
||||
+
|
||||
+ sdhci@d8000 {
|
||||
+ broken-cd;
|
||||
+ wp-inverted;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+ no-1-8-v;
|
||||
+ };
|
||||
+
|
||||
+ serial@12000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ serial@12100 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ spi1: spi@10680 {
|
||||
+ pinctrl-0 = <&spi1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spi-flash@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "w25q32";
|
||||
+ reg = <0>; /* Chip select 0 */
|
||||
+ spi-max-frequency = <3000000>;
|
||||
+ };
|
||||
+ slic@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "mv_slic";
|
||||
+ reg = <1>; /* Chip select 1 */
|
||||
+ spi-max-frequency = <3000000>;
|
||||
+ spi-1byte-cs;
|
||||
+ spi-cpol;
|
||||
+ spi-cpha;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ crypto@9D000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie-controller {
|
||||
+ status = "okay";
|
||||
+ pcie@2,0 {
|
||||
+ /* Port 1, Lane 0 */
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,375 +0,0 @@
|
||||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 3001ec5..dc76d3c
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -35,15 +35,17 @@ create_package() {
|
||||
sparc*)
|
||||
debarch=sparc ;;
|
||||
s390*)
|
||||
- debarch=s390 ;;
|
||||
+ debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
|
||||
ppc*)
|
||||
- debarch=powerpc ;;
|
||||
+ debarch=$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo ppc64el || echo powerpc) ;;
|
||||
parisc*)
|
||||
debarch=hppa ;;
|
||||
mips*)
|
||||
- debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y .config && echo el) ;;
|
||||
+ debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
|
||||
+ arm64)
|
||||
+ debarch=arm64 ;;
|
||||
arm*)
|
||||
- debarch=arm$(grep -q CONFIG_AEABI=y .config && echo el) ;;
|
||||
+ debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
|
||||
*)
|
||||
echo "" >&2
|
||||
echo "** ** ** WARNING ** ** **" >&2
|
||||
@@ -61,8 +63,30 @@ create_package() {
|
||||
forcearch="-DArchitecture=$debarch"
|
||||
fi
|
||||
|
||||
+ # Create preinstall and post install script to remove dtb
|
||||
+ if [[ "$1" == *dtb* ]]; then
|
||||
+ echo "if [ -d /boot/dtb-$version ]; then mv /boot/dtb-$version /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /dtb ]; then mv /dtb /dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb ]; then mv /boot/dtb /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/preinst
|
||||
+ chmod 775 $pdir/DEBIAN/preinst
|
||||
+ #
|
||||
+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/postinst
|
||||
+ echo "ln -sf dtb-$version /boot/dtb > /dev/null 2>&1 || mv /boot/dtb-$version /boot/dtb" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
+ # Create postinstall script for headers
|
||||
+ if [[ "$1" == *headers* ]]; then
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; make -s scripts >/dev/null 2>&1" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
# Create the package
|
||||
- dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
+ dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
}
|
||||
|
||||
@@ -78,49 +102,76 @@ tmpdir="$objtree/debian/tmp"
|
||||
fwdir="$objtree/debian/fwtmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
-packagename=linux-image-$version
|
||||
-fwpackagename=linux-firmware-image
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
+dbg_dir="$objtree/debian/dbgtmp"
|
||||
+packagename=linux-image"$LOCALVERSION"
|
||||
+fwpackagename=linux-firmware-image"$LOCALVERSION"
|
||||
+kernel_headers_packagename=linux-headers"$LOCALVERSION"
|
||||
+dtb_packagename=linux-dtb"$LOCALVERSION"
|
||||
+libc_headers_packagename=linux-libc-dev"$LOCALVERSION"
|
||||
+dbg_packagename=$packagename-dbg
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
packagename=user-mode-linux-$version
|
||||
fi
|
||||
|
||||
+# Not all arches have the same installed path in debian
|
||||
+# XXX: have each arch Makefile export a variable of the canonical image install
|
||||
+# path instead
|
||||
+case $ARCH in
|
||||
+um)
|
||||
+ installed_image_path="usr/bin/linux-$version"
|
||||
+ ;;
|
||||
+parisc|mips|powerpc)
|
||||
+ installed_image_path="boot/vmlinux-$version"
|
||||
+ ;;
|
||||
+*)
|
||||
+ installed_image_path="boot/vmlinuz-$version"
|
||||
+esac
|
||||
+
|
||||
+BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
+
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir"
|
||||
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
|
||||
mkdir -m 755 -p "$fwdir/DEBIAN"
|
||||
mkdir -p "$fwdir/lib/firmware/$version/" "$fwdir/usr/share/doc/$fwpackagename"
|
||||
mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
|
||||
mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
|
||||
+
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
+
|
||||
mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
|
||||
mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
|
||||
fi
|
||||
+if [ -n "$BUILD_DEBUG" ] ; then
|
||||
+ mkdir -p "$dbg_dir/usr/share/doc/$dbg_packagename"
|
||||
+ mkdir -m 755 -p "$dbg_dir/DEBIAN"
|
||||
+fi
|
||||
|
||||
# Build and install the kernel
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
$MAKE linux
|
||||
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
|
||||
- cp .config "$tmpdir/usr/share/doc/$packagename/config"
|
||||
+ cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
|
||||
gzip "$tmpdir/usr/share/doc/$packagename/config"
|
||||
- cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
|
||||
-else
|
||||
+else
|
||||
cp System.map "$tmpdir/boot/System.map-$version"
|
||||
- cp .config "$tmpdir/boot/config-$version"
|
||||
- # Not all arches include the boot path in KBUILD_IMAGE
|
||||
- if [ -e $KBUILD_IMAGE ]; then
|
||||
- cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
|
||||
- else
|
||||
- cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
|
||||
- fi
|
||||
+ cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
|
||||
+fi
|
||||
+# Not all arches include the boot path in KBUILD_IMAGE
|
||||
+if [ -e $KBUILD_IMAGE ]; then
|
||||
+ cp $KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
+else
|
||||
+ cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
|
||||
fi
|
||||
|
||||
-if grep -q '^CONFIG_MODULES=y' .config ; then
|
||||
+if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install
|
||||
rm -f "$tmpdir/lib/modules/$version/build"
|
||||
rm -f "$tmpdir/lib/modules/$version/source"
|
||||
@@ -128,6 +179,24 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
|
||||
mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
|
||||
rmdir "$tmpdir/lib/modules/$version"
|
||||
fi
|
||||
+ if [ -n "$BUILD_DEBUG" ] ; then
|
||||
+ for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
|
||||
+ module=lib/modules/$module
|
||||
+ mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
|
||||
+ # only keep debug symbols in the debug file
|
||||
+ $OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module
|
||||
+ # strip original module from debug symbols
|
||||
+ $OBJCOPY --strip-debug $tmpdir/$module
|
||||
+ # then add a link to those
|
||||
+ $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
|
||||
+ done
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
+ mkdir -p "$tmpdir/boot/dtb-""$version"
|
||||
+ cp $objtree/arch/arm/boot/dts/*.dtb $dtb_dir/boot/dtb-$version
|
||||
+ #INSTALL_DTBS_PATH="$dtb_dir/boot/dtb" $MAKE KBUILD_SRC= dtbs_install
|
||||
fi
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
@@ -137,8 +206,15 @@ fi
|
||||
|
||||
# Install the maintainer scripts
|
||||
# Note: hook scripts under /etc/kernel are also executed by official Debian
|
||||
-# kernel packages, as well as kernel packages built using make-kpkg
|
||||
+# kernel packages, as well as kernel packages built using make-kpkg.
|
||||
+# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and
|
||||
+# so do we; recent versions of dracut and initramfs-tools will obey this.
|
||||
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
|
||||
+if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
|
||||
+ want_initrd=Yes
|
||||
+else
|
||||
+ want_initrd=No
|
||||
+fi
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
@@ -147,14 +223,61 @@ for script in postinst postrm preinst prerm ; do
|
||||
set -e
|
||||
|
||||
# Pass maintainer script parameters to hook scripts
|
||||
+
|
||||
export DEB_MAINT_PARAMS="\$*"
|
||||
|
||||
-test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
|
||||
+# Tell initramfs builder whether it's wanted
|
||||
+
|
||||
+export INITRD=$want_initrd
|
||||
+
|
||||
+test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
|
||||
exit 0
|
||||
EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
+##
|
||||
+## Create sym link to kernel image
|
||||
+##
|
||||
+kernel_tmp_version="${installed_image_path////\\/}"
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/postinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+ln -sf $(basename $kernel_tmp_version) /boot/zImage > /dev/null 2>&1 || mv /$kernel_tmp_version /boot/zImage
|
||||
+
|
||||
+
|
||||
+exit 0
|
||||
+EOT
|
||||
+##
|
||||
+## FAT install workaround
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/preinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
+cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
+# exit if we are running chroot
|
||||
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
|
||||
+
|
||||
+check_and_unmount (){
|
||||
+boot_device=\$(mountpoint -d /boot)
|
||||
+
|
||||
+for file in /dev/* ; do
|
||||
+ CURRENT_DEVICE=\$(printf "%d:%d" \$(stat --printf="0x%t 0x%T" \$file))
|
||||
+ if [[ "\$CURRENT_DEVICE" = "\$boot_device" ]]; then
|
||||
+ boot_partition=\$file
|
||||
+ break;
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
|
||||
+if [ "\$bootfstype" = "vfat" ]; then
|
||||
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
|
||||
+fi
|
||||
+}
|
||||
+mountpoint -q /boot && check_and_unmount
|
||||
+EOT
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
+
|
||||
+
|
||||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
email=$DEBEMAIL
|
||||
@@ -172,9 +299,19 @@ else
|
||||
fi
|
||||
maintainer="$name <$email>"
|
||||
|
||||
+# Try to determine distribution
|
||||
+if [ -n "$KDEB_CHANGELOG_DIST" ]; then
|
||||
+ distribution=$KDEB_CHANGELOG_DIST
|
||||
+elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ]; then
|
||||
+ : # nothing to do in this case
|
||||
+else
|
||||
+ distribution="unstable"
|
||||
+ echo >&2 "Using default distribution of 'unstable' in the changelog"
|
||||
+ echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly"
|
||||
+fi
|
||||
# Generate a simple changelog template
|
||||
cat <<EOF > debian/changelog
|
||||
-linux-upstream ($packageversion) unstable; urgency=low
|
||||
+linux-upstream ($packageversion) $distribution; urgency=low
|
||||
|
||||
* Custom built Linux kernel.
|
||||
|
||||
@@ -242,21 +379,32 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
-# Build header package
|
||||
-(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles")
|
||||
-(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles")
|
||||
-(cd $objtree; find arch/$SRCARCH/include .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles")
|
||||
+# Build kernel header package
|
||||
+(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find arch/$SRCARCH/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
-(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
|
||||
-(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
|
||||
+######################## headers patch
|
||||
+ZACNI=$(pwd)
|
||||
+cd $destdir
|
||||
+patch -p1 < /tmp/headers-debian-byteshift.patch
|
||||
+cd $ZACNI
|
||||
+######################## headers patch
|
||||
+(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
|
||||
+(cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -)
|
||||
+(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
|
||||
+(cd "$destdir"; make M=scripts clean)
|
||||
+
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
-Provides: linux-headers, linux-headers-2.6
|
||||
+Provides: linux-headers
|
||||
Architecture: any
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
@@ -282,6 +430,16 @@ fi
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
+Package: $dtb_packagename
|
||||
+Architecture: any
|
||||
+Description: Linux DTB, version $version
|
||||
+ This package contains device blobs from the Linux kernel, version $version.
|
||||
+EOF
|
||||
+
|
||||
+create_package "$dtb_packagename" "$dtb_dir"
|
||||
+
|
||||
+cat <<EOF >> debian/control
|
||||
+
|
||||
Package: $libc_headers_packagename
|
||||
Section: devel
|
||||
Provides: linux-kernel-headers
|
||||
@@ -293,9 +451,35 @@ EOF
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+# create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
|
||||
-exit 0
|
||||
+if [ -n "$BUILD_DEBUG" ] ; then
|
||||
+ # Build debug package
|
||||
+ # Different tools want the image in different locations
|
||||
+ # perf
|
||||
+ mkdir -p $dbg_dir/usr/lib/debug/lib/modules/$version/
|
||||
+ cp vmlinux $dbg_dir/usr/lib/debug/lib/modules/$version/
|
||||
+ # systemtap
|
||||
+ mkdir -p $dbg_dir/usr/lib/debug/boot/
|
||||
+ ln -s ../lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/boot/vmlinux-$version
|
||||
+ # kdump-tools
|
||||
+ ln -s lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/vmlinux-$version
|
||||
+
|
||||
+ cat <<EOF >> debian/control
|
||||
+
|
||||
+Package: $dbg_packagename
|
||||
+Section: debug
|
||||
+Provides: linux-debug, linux-debug-$version
|
||||
+Architecture: any
|
||||
+Description: Linux kernel debugging symbols for $version
|
||||
+ This package will come in handy if you need to debug the kernel. It provides
|
||||
+ all the necessary debug symbols for the kernel and its modules.
|
||||
+EOF
|
||||
+
|
||||
+ create_package "$dbg_packagename" "$dbg_dir"
|
||||
+fi
|
||||
+
|
||||
+exit 0
|
||||
\ No newline at end of file
|
||||
@ -1,11 +0,0 @@
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -218,7 +218,7 @@
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
|
||||
index ccc4c71..71a4d00 100644
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -49,12 +49,9 @@ static int __ath_regd_init(struct ath_regulatory *reg);
|
||||
#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 40, 0, 30,\
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
|
||||
-#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \
|
||||
- ATH9K_2GHZ_CH12_13, \
|
||||
- ATH9K_2GHZ_CH14
|
||||
+#define ATH9K_2GHZ_ALL REG_RULE(2400, 2483, 40, 0, 30, 0)
|
||||
|
||||
-#define ATH9K_5GHZ_ALL ATH9K_5GHZ_5150_5350, \
|
||||
- ATH9K_5GHZ_5470_5850
|
||||
+#define ATH9K_5GHZ_ALL REG_RULE(5140, 5860, 40, 0, 30, 0)
|
||||
|
||||
/* This one skips what we call "mid band" */
|
||||
#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
|
||||
@@ -76,9 +73,8 @@ static const struct ieee80211_regdomain ath_world_regdom_63_65 = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_2GHZ_CH12_13,
|
||||
- ATH9K_5GHZ_NO_MIDBAND,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
+ ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -87,8 +83,8 @@ static const struct ieee80211_regdomain ath_world_regdom_64 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_5GHZ_NO_MIDBAND,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
+ ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -97,7 +93,7 @@ static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -107,8 +103,7 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_2GHZ_CH12_13,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -174,7 +169,7 @@ EXPORT_SYMBOL(ath_is_49ghz_allowed);
|
||||
/* Frequency is one where radar detection is required */
|
||||
static bool ath_is_radar_freq(u16 center_freq)
|
||||
{
|
||||
- return (center_freq >= 5260 && center_freq <= 5700);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
/*
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user