Skip to content

Commit f397aef

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.87' into linux-linaro-lsk-v4.4
This is the 4.4.87 stable release
2 parents 3fc3708 + 573b59e commit f397aef

17 files changed

Lines changed: 99 additions & 55 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 86
3+
SUBLEVEL = 87
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/alpha/include/asm/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef _ALPHA_TYPES_H
22
#define _ALPHA_TYPES_H
33

4-
#include <asm-generic/int-ll64.h>
4+
#include <uapi/asm/types.h>
55

66
#endif /* _ALPHA_TYPES_H */

arch/alpha/include/uapi/asm/types.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@
99
* need to be careful to avoid a name clashes.
1010
*/
1111

12-
#ifndef __KERNEL__
12+
/*
13+
* This is here because we used to use l64 for alpha
14+
* and we don't want to impact user mode with our change to ll64
15+
* in the kernel.
16+
*
17+
* However, some user programs are fine with this. They can
18+
* flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
19+
*/
20+
#if !defined(__SANE_USERSPACE_TYPES__) && !defined(__KERNEL__)
1321
#include <asm-generic/int-l64.h>
22+
#else
23+
#include <asm-generic/int-ll64.h>
1424
#endif
1525

1626
#endif /* _UAPI_ALPHA_TYPES_H */

arch/arm/kvm/mmu.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -831,24 +831,25 @@ void stage2_unmap_vm(struct kvm *kvm)
831831
* Walks the level-1 page table pointed to by kvm->arch.pgd and frees all
832832
* underlying level-2 and level-3 tables before freeing the actual level-1 table
833833
* and setting the struct pointer to NULL.
834-
*
835-
* Note we don't need locking here as this is only called when the VM is
836-
* destroyed, which can only be done once.
837834
*/
838835
void kvm_free_stage2_pgd(struct kvm *kvm)
839836
{
840-
if (kvm->arch.pgd == NULL)
841-
return;
837+
void *pgd = NULL;
838+
void *hwpgd = NULL;
842839

843840
spin_lock(&kvm->mmu_lock);
844-
unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
841+
if (kvm->arch.pgd) {
842+
unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
843+
pgd = READ_ONCE(kvm->arch.pgd);
844+
hwpgd = kvm_get_hwpgd(kvm);
845+
kvm->arch.pgd = NULL;
846+
}
845847
spin_unlock(&kvm->mmu_lock);
846848

847-
kvm_free_hwpgd(kvm_get_hwpgd(kvm));
848-
if (KVM_PREALLOC_LEVEL > 0)
849-
kfree(kvm->arch.pgd);
850-
851-
kvm->arch.pgd = NULL;
849+
if (hwpgd)
850+
kvm_free_hwpgd(hwpgd);
851+
if (KVM_PREALLOC_LEVEL > 0 && pgd)
852+
kfree(pgd);
852853
}
853854

854855
static pud_t *stage2_get_pud(struct kvm *kvm, struct kvm_mmu_memory_cache *cache,

crypto/algif_skcipher.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,13 @@ static void skcipher_free_async_sgls(struct skcipher_async_req *sreq)
8686
}
8787
sgl = sreq->tsg;
8888
n = sg_nents(sgl);
89-
for_each_sg(sgl, sg, n, i)
90-
put_page(sg_page(sg));
89+
for_each_sg(sgl, sg, n, i) {
90+
struct page *page = sg_page(sg);
91+
92+
/* some SGs may not have a page mapped */
93+
if (page && atomic_read(&page->_count))
94+
put_page(page);
95+
}
9196

9297
kfree(sreq->tsg);
9398
}

drivers/gpu/drm/ttm/ttm_page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
612612
} else {
613613
pr_err("Failed to fill pool (%p)\n", pool);
614614
/* If we have any pages left put them to the pool. */
615-
list_for_each_entry(p, &pool->list, lru) {
615+
list_for_each_entry(p, &new_pages, lru) {
616616
++cpages;
617617
}
618618
list_splice(&new_pages, &pool->list);

drivers/i2c/busses/i2c-ismt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,10 @@ static int ismt_process_desc(const struct ismt_desc *desc,
339339
break;
340340
case I2C_SMBUS_BLOCK_DATA:
341341
case I2C_SMBUS_I2C_BLOCK_DATA:
342-
memcpy(&data->block[1], dma_buffer, desc->rxbytes);
343-
data->block[0] = desc->rxbytes;
342+
if (desc->rxbytes != dma_buffer[0] + 1)
343+
return -EMSGSIZE;
344+
345+
memcpy(data->block, dma_buffer, desc->rxbytes);
344346
break;
345347
}
346348
return 0;

drivers/irqchip/irq-mips-gic.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,8 +915,11 @@ static int __init gic_of_init(struct device_node *node,
915915
gic_len = resource_size(&res);
916916
}
917917

918-
if (mips_cm_present())
918+
if (mips_cm_present()) {
919919
write_gcr_gic_base(gic_base | CM_GCR_GIC_BASE_GICEN_MSK);
920+
/* Ensure GIC region is enabled before trying to access it */
921+
__sync();
922+
}
920923
gic_present = true;
921924

922925
__gic_init(gic_base, gic_len, cpu_vec, 0, node);

drivers/net/wireless/ti/wl1251/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
15671567

15681568
wl->state = WL1251_STATE_OFF;
15691569
mutex_init(&wl->mutex);
1570+
spin_lock_init(&wl->wl_lock);
15701571

15711572
wl->tx_mgmt_frm_rate = DEFAULT_HW_GEN_TX_RATE;
15721573
wl->tx_mgmt_frm_mod = DEFAULT_HW_GEN_MODULATION_TYPE;

fs/ceph/addr.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static int ceph_releasepage(struct page *page, gfp_t g)
189189
/*
190190
* read a single page, without unlocking it.
191191
*/
192-
static int readpage_nounlock(struct file *filp, struct page *page)
192+
static int ceph_do_readpage(struct file *filp, struct page *page)
193193
{
194194
struct inode *inode = file_inode(filp);
195195
struct ceph_inode_info *ci = ceph_inode(inode);
@@ -219,7 +219,7 @@ static int readpage_nounlock(struct file *filp, struct page *page)
219219

220220
err = ceph_readpage_from_fscache(inode, page);
221221
if (err == 0)
222-
goto out;
222+
return -EINPROGRESS;
223223

224224
dout("readpage inode %p file %p page %p index %lu\n",
225225
inode, filp, page, page->index);
@@ -249,8 +249,11 @@ static int readpage_nounlock(struct file *filp, struct page *page)
249249

250250
static int ceph_readpage(struct file *filp, struct page *page)
251251
{
252-
int r = readpage_nounlock(filp, page);
253-
unlock_page(page);
252+
int r = ceph_do_readpage(filp, page);
253+
if (r != -EINPROGRESS)
254+
unlock_page(page);
255+
else
256+
r = 0;
254257
return r;
255258
}
256259

@@ -1094,7 +1097,7 @@ static int ceph_update_writeable_page(struct file *file,
10941097
goto retry_locked;
10951098
r = writepage_nounlock(page, NULL);
10961099
if (r < 0)
1097-
goto fail_nosnap;
1100+
goto fail_unlock;
10981101
goto retry_locked;
10991102
}
11001103

@@ -1122,11 +1125,14 @@ static int ceph_update_writeable_page(struct file *file,
11221125
}
11231126

11241127
/* we need to read it. */
1125-
r = readpage_nounlock(file, page);
1126-
if (r < 0)
1127-
goto fail_nosnap;
1128+
r = ceph_do_readpage(file, page);
1129+
if (r < 0) {
1130+
if (r == -EINPROGRESS)
1131+
return -EAGAIN;
1132+
goto fail_unlock;
1133+
}
11281134
goto retry_locked;
1129-
fail_nosnap:
1135+
fail_unlock:
11301136
unlock_page(page);
11311137
return r;
11321138
}

0 commit comments

Comments
 (0)