mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-30 18:51:30 +00:00
645 lines
20 KiB
Diff
645 lines
20 KiB
Diff
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;
|