On Apollo Lake devices the BIOS does not set up IRQ routing for the i801
SMBUS controller IRQ, so we end up with dev->irq set to IRQ_NOTCONNECTED.
Detect this and do not try to use the irq in this case silencing:
i801_smbus 0000:00:1f.1: Failed to allocate irq -2147483648: -107
Cc: stable(a)vger.kernel.org
BugLink: https://communities.intel.com/thread/114759
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
---
drivers/i2c/busses/i2c-i801.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 9e12a53ef7b8..8eac00efadc1 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1617,6 +1617,9 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
/* Default timeout in interrupt mode: 200 ms */
priv->adapter.timeout = HZ / 5;
+ if (dev->irq == IRQ_NOTCONNECTED)
+ priv->features &= ~FEATURE_IRQ;
+
if (priv->features & FEATURE_IRQ) {
u16 pcictl, pcists;
--
2.14.3
This is a note to let you know that I've just added the patch titled
staging: ccree: fix leak of import() after init()
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From c5f39d07860c35e5e4c63188139465af790f86ce Mon Sep 17 00:00:00 2001
From: Gilad Ben-Yossef <gilad(a)benyossef.com>
Date: Thu, 9 Nov 2017 09:16:09 +0000
Subject: staging: ccree: fix leak of import() after init()
crypto_ahash_import() may be called either after
crypto_ahash_init() or without such call. Right now
we always internally call init() as part of
import(), thus leaking memory and mappings if the
user has already called init() herself.
Fix this by only calling init() internally if the
state is not already initialized.
Fixes: commit 454527d0d94f ("staging: ccree: fix hash import/export")
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Gilad Ben-Yossef <gilad(a)benyossef.com>
Reviewed-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/staging/ccree/ssi_hash.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index d79090ed7f9c..1799d3f26a9e 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -1778,9 +1778,12 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in)
}
in += sizeof(u32);
- rc = ssi_hash_init(state, ctx);
- if (rc)
- goto out;
+ /* call init() to allocate bufs if the user hasn't */
+ if (!state->digest_buff) {
+ rc = ssi_hash_init(state, ctx);
+ if (rc)
+ goto out;
+ }
dma_sync_single_for_cpu(dev, state->digest_buff_dma_addr,
ctx->inter_digestsize, DMA_BIDIRECTIONAL);
--
2.15.0
This is a note to let you know that I've just added the patch titled
Revert "sctp: do not peel off an assoc from one netns to another one"
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
revert-sctp-do-not-peel-off-an-assoc-from-one-netns-to.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From c76eb04f0895952a58f0029223f181854901e52e Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Date: Tue, 28 Nov 2017 12:29:45 +0100
Subject: Revert "sctp: do not peel off an assoc from one netns to another one"
From: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
This reverts commit 2a0e60907e54dad75e9b3568d02bec11d6e74f6b which is
commit df80cd9b28b9ebaa284a41df611dbf3a2d05ca74 upstream as I messed up
by applying it to the tree twice.
Reported-by: Michal Kubecek <mkubecek(a)suse.cz>
Cc: ChunYu Wang <chunwang(a)redhat.com>
Cc: Xin Long <lucien.xin(a)gmail.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner(a)gmail.com>
Cc: Neil Horman <nhorman(a)tuxdriver.com>
Cc: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sctp/socket.c | 4 ----
1 file changed, 4 deletions(-)
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4457,10 +4457,6 @@ int sctp_do_peeloff(struct sock *sk, sct
if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
return -EINVAL;
- /* Do not peel off from one netns to another one. */
- if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
- return -EINVAL;
-
if (!asoc)
return -EINVAL;
Patches currently in stable-queue which might be from gregkh(a)linuxfoundation.org are
queue-4.4/sched-make-resched_cpu-unconditional.patch
queue-4.4/media-rc-check-for-integer-overflow.patch
queue-4.4/af_vsock-shrink-the-area-influenced-by-prepare_to_wait.patch
queue-4.4/dmaengine-zx-set-dma_cyclic-cap_mask-bit.patch
queue-4.4/kvm-nvmx-set-idtr-and-gdtr-limits-when-loading-l1-host-state.patch
queue-4.4/rtlwifi-fix-uninitialized-rtlhal-last_suspend_sec-time.patch
queue-4.4/mips-fix-an-n32-core-file-generation-regset-support-regression.patch
queue-4.4/x86-decoder-add-new-test-instruction-pattern.patch
queue-4.4/i40evf-use-smp_rmb-rather-than-read_barrier_depends.patch
queue-4.4/ecryptfs-use-after-free-in-ecryptfs_release_messaging.patch
queue-4.4/iio-light-fix-improper-return-value.patch
queue-4.4/net-allow-ip_multicast_if-to-set-index-to-l3-slave.patch
queue-4.4/s390-disassembler-add-missing-end-marker-for-e7-table.patch
queue-4.4/kvm-svm-obey-guest-pat.patch
queue-4.4/asoc-rsnd-don-t-double-free-kctrl.patch
queue-4.4/cx231xx-cards-fix-null-deref-on-missing-association-descriptor.patch
queue-4.4/s390-disassembler-increase-show_code-buffer-size.patch
queue-4.4/alsa-timer-remove-kernel-warning-at-compat-ioctl-error-paths.patch
queue-4.4/igb-use-smp_rmb-rather-than-read_barrier_depends.patch
queue-4.4/s390-kbuild-enable-modversions-for-symbols-exported-from-asm.patch
queue-4.4/pci-apply-_hpx-settings-only-to-relevant-devices.patch
queue-4.4/s390-fix-transactional-execution-control-register-handling.patch
queue-4.4/netfilter-nf_tables-fix-oob-access.patch
queue-4.4/lib-mpi-call-cond_resched-from-mpi_powm-loop.patch
queue-4.4/alsa-hda-add-raven-pci-id.patch
queue-4.4/netfilter-nft_queue-use-raw_smp_processor_id.patch
queue-4.4/dm-fix-race-between-dm_get_from_kobject-and-__dm_destroy.patch
queue-4.4/net-3com-typhoon-typhoon_init_one-fix-incorrect-return-values.patch
queue-4.4/clk-ti-dra7-atl-clock-fix-child-node-lookups.patch
queue-4.4/arm-8722-1-mm-make-strict_kernel_rwx-effective-for-lpae.patch
queue-4.4/nfs-fix-ugly-referral-attributes.patch
queue-4.4/target-fix-queue_full-scsi-task-attribute-handling.patch
queue-4.4/mips-bcm47xx-fix-led-inversion-for-wrt54gsv1.patch
queue-4.4/mac80211-suppress-new_peer_candidate-event-if-no-room.patch
queue-4.4/vsock-use-new-wait-api-for-vsock_stream_sendmsg.patch
queue-4.4/autofs-don-t-fail-mount-for-transient-error.patch
queue-4.4/net-9p-switch-to-wait_event_killable.patch
queue-4.4/media-v4l2-ctrl-fix-flags-field-on-control-events.patch
queue-4.4/e1000e-fix-error-path-in-link-detection.patch
queue-4.4/mips-ralink-fix-mt7628-pinmux.patch
queue-4.4/e1000e-separate-signaling-for-link-check-link-up.patch
queue-4.4/iscsi-target-fix-non-immediate-tmr-reference-leak.patch
queue-4.4/alsa-usb-audio-add-sanity-checks-in-v2-clock-parsers.patch
queue-4.4/isofs-fix-timestamps-beyond-2027.patch
queue-4.4/nfs-fix-typo-in-nomigration-mount-option.patch
queue-4.4/fs-9p-compare-qid.path-in-v9fs_test_inode.patch
queue-4.4/alsa-hda-apply-alc269_fixup_no_shutup-on-hda_fixup_act_probe.patch
queue-4.4/alsa-hda-realtek-fix-alc700-family-no-sound-issue.patch
queue-4.4/pm-opp-add-missing-of_node_put-np.patch
queue-4.4/ixgbevf-use-smp_rmb-rather-than-read_barrier_depends.patch
queue-4.4/sched-rt-simplify-the-ipi-based-rt-balancing-logic.patch
queue-4.4/igbvf-use-smp_rmb-rather-than-read_barrier_depends.patch
queue-4.4/asoc-wm_adsp-don-t-overrun-firmware-file-buffer-when-reading-region-data.patch
queue-4.4/e1000e-fix-return-value-test.patch
queue-4.4/s390-runtime-instrumention-fix-possible-memory-corruption.patch
queue-4.4/nfsd-deal-with-revoked-delegations-appropriately.patch
queue-4.4/arm-8721-1-mm-dump-check-hardware-ro-bit-for-lpae.patch
queue-4.4/ath10k-fix-incorrect-txpower-set-by-p2p_device-interface.patch
queue-4.4/ata-fixes-kernel-crash-while-tracing-ata_eh_link_autopsy-event.patch
queue-4.4/ipv6-only-call-ip6_route_dev_notify-once-for-netdev_unregister.patch
queue-4.4/fm10k-use-smp_rmb-rather-than-read_barrier_depends.patch
queue-4.4/ath10k-fix-potential-memory-leak-in-ath10k_wmi_tlv_op_pull_fw_stats.patch
queue-4.4/bcache-check-ca-alloc_thread-initialized-before-wake-up-it.patch
queue-4.4/ixgbe-fix-skb-list-corruption-on-power-systems.patch
queue-4.4/net-3com-typhoon-typhoon_init_one-make-return-values-more-specific.patch
queue-4.4/alsa-usb-audio-fix-potential-out-of-bound-access-at-parsing-su.patch
queue-4.4/alsa-pcm-update-tstamp-only-if-audio_tstamp-changed.patch
queue-4.4/fscrypt-lock-mutex-before-checking-for-bounce-page-pool.patch
queue-4.4/parisc-fix-validity-check-of-pointer-size-argument-in-new-cas-implementation.patch
queue-4.4/revert-sctp-do-not-peel-off-an-assoc-from-one-netns-to.patch
queue-4.4/fix-a-page-leak-in-vhost_scsi_iov_to_sgl-error-recovery.patch
queue-4.4/btrfs-return-the-actual-error-value-from-from-btrfs_uuid_tree_iterate.patch
queue-4.4/mips-ralink-fix-typo-in-mt7628-pinmux-function.patch
queue-4.4/drm-armada-fix-compile-fail.patch
queue-4.4/rds-rdma-return-appropriate-error-on-rdma-map-failures.patch
queue-4.4/powerpc-signal-properly-handle-return-value-from-uprobe_deny_signal.patch
queue-4.4/ath10k-ignore-configuring-the-incorrect-board_id.patch
queue-4.4/ath10k-set-cts-protection-vdev-param-only-if-vdev-is-up.patch
queue-4.4/dm-bufio-fix-integer-overflow-when-limiting-maximum-cache-size.patch
queue-4.4/nilfs2-fix-race-condition-that-causes-file-system-corruption.patch
queue-4.4/spi-spi_fsl_dspi-should-depend-on-has_dma.patch
queue-4.4/staging-iio-cdc-fix-improper-return-value.patch
queue-4.4/ib-srp-avoid-that-a-cable-pull-can-trigger-a-kernel-crash.patch
queue-4.4/libnvdimm-namespace-make-resource-attribute-only-readable-by-root.patch
queue-4.4/ib-srpt-do-not-accept-invalid-initiator-port-names.patch
queue-4.4/nfc-fix-device-allocation-error-return.patch
queue-4.4/rtlwifi-rtl8192ee-fix-memory-leak-when-loading-firmware.patch
queue-4.4/clk-ti-dra7-atl-clock-fix-of_node-reference-counting.patch
queue-4.4/xen-xenbus-driver-must-not-accept-invalid-transaction-ids.patch
queue-4.4/media-don-t-do-dma-on-stack-for-firmware-upload-in-the-as102-driver.patch
queue-4.4/i40e-use-smp_rmb-rather-than-read_barrier_depends.patch
queue-4.4/libnvdimm-namespace-fix-label-initialization-to-use-valid-seq-numbers.patch
queue-4.4/alsa-usb-audio-add-sanity-checks-to-fe-parser.patch
queue-4.4/sunrpc-fix-tracepoint-storage-issues-with-svc_recv-and-svc_rqst_status.patch
queue-4.4/ext4-fix-interaction-between-i_size-fallocate-and-delalloc-after-a-crash.patch
queue-4.4/drm-apply-range-restriction-after-color-adjustment-when-allocation.patch
queue-4.4/mac80211-remove-invalid-flag-operations-in-mesh-tsf-synchronization.patch
Hello,
I noticed that mainline commit df80cd9b28b9 ("sctp: do not peel off an
assoc from one netns to another one") has been backported to stable 4.4
branch twice:
- first as commit 46bdabbca02e in 4.4.100
- then again as commit 2a0e60907e54 in 4.4.101
so that the check it adds in sctp_do_peeloff() is now performed twice.
Michal Kubecek
From: Eric Biggers <ebiggers(a)google.com>
->pkey_algo used to be an enum, but was changed to a string by commit
4e8ae72a75aa ("X.509: Make algo identifiers text instead of enum"). But
two comparisons were not updated. Fix them to use strcmp().
This bug broke signature verification in certain configurations,
depending on whether the string constants were deduplicated or not.
Fixes: 4e8ae72a75aa ("X.509: Make algo identifiers text instead of enum")
Cc: <stable(a)vger.kernel.org> # v4.6+
Signed-off-by: Eric Biggers <ebiggers(a)google.com>
---
crypto/asymmetric_keys/pkcs7_verify.c | 2 +-
crypto/asymmetric_keys/x509_public_key.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
index 2d93d9eccb4d..063d6745c741 100644
--- a/crypto/asymmetric_keys/pkcs7_verify.c
+++ b/crypto/asymmetric_keys/pkcs7_verify.c
@@ -150,7 +150,7 @@ static int pkcs7_find_key(struct pkcs7_message *pkcs7,
pr_devel("Sig %u: Found cert serial match X.509[%u]\n",
sinfo->index, certix);
- if (x509->pub->pkey_algo != sinfo->sig->pkey_algo) {
+ if (strcmp(x509->pub->pkey_algo, sinfo->sig->pkey_algo)) {
pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n",
sinfo->index);
continue;
diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
index c9013582c026..9db20abe78a0 100644
--- a/crypto/asymmetric_keys/x509_public_key.c
+++ b/crypto/asymmetric_keys/x509_public_key.c
@@ -135,7 +135,7 @@ int x509_check_for_self_signed(struct x509_certificate *cert)
}
ret = -EKEYREJECTED;
- if (cert->pub->pkey_algo != cert->sig->pkey_algo)
+ if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo))
goto out;
ret = public_key_verify_signature(cert->pub, cert->sig);
--
2.15.0
This reverts commit 92266d6ef60c2381c980c6cdcb2a5c1667b36b49, which
was simply wrong: In the case where domain is NULL, we now use the
wrong offsetof() in the list_first_entry macro, so we don't actually
fetch the ->cookie value, but rather the eight bytes located
sizeof(struct list_head) further into the struct async_entry.
On 64 bit, that's the data member, while on 32 bit, we get a u64 built
from func and data in some order.
I think the bug happens to be harmless in practice: It obviously only
affects callers which pass a NULL domain, and AFAICT the only such
caller is
async_synchronize_full() ->
async_synchronize_full_domain(NULL) ->
async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, NULL)
and the ASYNC_COOKIE_MAX means that in practice we end up waiting for
the async_global_pending list to be empty - but it would break if
somebody happened to pass (void*)-1 as the data element to
async_schedule, and of course also if somebody ever does a
async_synchronize_cookie_domain(, NULL) with a "finite" cookie value.
Cc: stable(a)vger.kernel.org # 3.10+
Signed-off-by: Rasmus Villemoes <linux(a)rasmusvillemoes.dk>
---
Maybe the "harmless in practice" means this isn't -stable
material. But I'm not completely confident my quick git grep'ing is
enough, and there might be affected code in one of the earlier kernels
that has since been removed, so I'll leave the decision to the stable
guys.
kernel/async.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/kernel/async.c b/kernel/async.c
index 2cbd3dd5940d..a893d6170944 100644
--- a/kernel/async.c
+++ b/kernel/async.c
@@ -84,20 +84,24 @@ static atomic_t entry_count;
static async_cookie_t lowest_in_progress(struct async_domain *domain)
{
- struct list_head *pending;
+ struct async_entry *first = NULL;
async_cookie_t ret = ASYNC_COOKIE_MAX;
unsigned long flags;
spin_lock_irqsave(&async_lock, flags);
- if (domain)
- pending = &domain->pending;
- else
- pending = &async_global_pending;
+ if (domain) {
+ if (!list_empty(&domain->pending))
+ first = list_first_entry(&domain->pending,
+ struct async_entry, domain_list);
+ } else {
+ if (!list_empty(&async_global_pending))
+ first = list_first_entry(&async_global_pending,
+ struct async_entry, global_list);
+ }
- if (!list_empty(pending))
- ret = list_first_entry(pending, struct async_entry,
- domain_list)->cookie;
+ if (first)
+ ret = first->cookie;
spin_unlock_irqrestore(&async_lock, flags);
return ret;
--
2.11.0
This is a note to let you know that I've just added the patch titled
e1000e: fix buffer overrun while the I219 is processing DMA transactions
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
e1000e-fix-buffer-overrun-while-the-i219-is-processing-dma-transactions.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From b10effb92e272051dd1ec0d7be56bf9ca85ab927 Mon Sep 17 00:00:00 2001
From: Sasha Neftin <sasha.neftin(a)intel.com>
Date: Sun, 6 Aug 2017 16:49:18 +0300
Subject: e1000e: fix buffer overrun while the I219 is processing DMA transactions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Sasha Neftin <sasha.neftin(a)intel.com>
commit b10effb92e272051dd1ec0d7be56bf9ca85ab927 upstream.
Intel® 100/200 Series Chipset platforms reduced the round-trip
latency for the LAN Controller DMA accesses, causing in some high
performance cases a buffer overrun while the I219 LAN Connected
Device is processing the DMA transactions. I219LM and I219V devices
can fall into unrecovered Tx hang under very stressfully UDP traffic
and multiple reconnection of Ethernet cable. This Tx hang of the LAN
Controller is only recovered if the system is rebooted. Slightly slow
down DMA access by reducing the number of outstanding requests.
This workaround could have an impact on TCP traffic performance
on the platform. Disabling TSO eliminates performance loss for TCP
traffic without a noticeable impact on CPU performance.
Please, refer to I218/I219 specification update:
https://www.intel.com/content/www/us/en/embedded/products/networking/
ethernet-connection-i218-family-documentation.html
Signed-off-by: Sasha Neftin <sasha.neftin(a)intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy(a)intel.com>
Reviewed-by: Raanan Avargil <raanan.avargil(a)intel.com>
Tested-by: Aaron Brown <aaron.f.brown(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Amit Pundir <amit.pundir(a)linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -3021,8 +3021,8 @@ static void e1000_configure_tx(struct e1
hw->mac.ops.config_collision_dist(hw);
- /* SPT and CNP Si errata workaround to avoid data corruption */
- if (hw->mac.type >= e1000_pch_spt) {
+ /* SPT and KBL Si errata workaround to avoid data corruption */
+ if (hw->mac.type == e1000_pch_spt) {
u32 reg_val;
reg_val = er32(IOSFPC);
@@ -3030,7 +3030,9 @@ static void e1000_configure_tx(struct e1
ew32(IOSFPC, reg_val);
reg_val = er32(TARC(0));
- reg_val |= E1000_TARC0_CB_MULTIQ_3_REQ;
+ /* SPT and KBL Si errata workaround to avoid Tx hang */
+ reg_val &= ~BIT(28);
+ reg_val |= BIT(29);
ew32(TARC(0), reg_val);
}
}
Patches currently in stable-queue which might be from sasha.neftin(a)intel.com are
queue-4.14/e1000e-fix-buffer-overrun-while-the-i219-is-processing-dma-transactions.patch