Skip to content

Commit 053f78d

Browse files
committed
Merge tag 'lkdtm-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into char-misc-linus
Kees briefly writes: fixes some possible memory allocation leaks on error paths
2 parents 1bb025f + 3d085c7 commit 053f78d

File tree

508 files changed

+3542
-3836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

508 files changed

+3542
-3836
lines changed

Documentation/devicetree/bindings/clock/qca,ath79-pll.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Binding for Qualcomm Atheros AR7xxx/AR9XXX PLL controller
33
The PPL controller provides the 3 main clocks of the SoC: CPU, DDR and AHB.
44

55
Required Properties:
6-
- compatible: has to be "qca,<soctype>-cpu-intc" and one of the following
6+
- compatible: has to be "qca,<soctype>-pll" and one of the following
77
fallbacks:
88
- "qca,ar7100-pll"
99
- "qca,ar7240-pll"
@@ -21,8 +21,8 @@ Optional properties:
2121

2222
Example:
2323

24-
memory-controller@18050000 {
25-
compatible = "qca,ar9132-ppl", "qca,ar9130-pll";
24+
pll-controller@18050000 {
25+
compatible = "qca,ar9132-pll", "qca,ar9130-pll";
2626
reg = <0x18050000 0x20>;
2727

2828
clock-names = "ref";

Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ mfio80 ddr_debug, mips_trace_data, mips_debug
134134
mfio81 dreq0, mips_trace_data, eth_debug
135135
mfio82 dreq1, mips_trace_data, eth_debug
136136
mfio83 mips_pll_lock, mips_trace_data, usb_debug
137-
mfio84 sys_pll_lock, mips_trace_data, usb_debug
138-
mfio85 wifi_pll_lock, mips_trace_data, sdhost_debug
139-
mfio86 bt_pll_lock, mips_trace_data, sdhost_debug
140-
mfio87 rpu_v_pll_lock, dreq2, socif_debug
141-
mfio88 rpu_l_pll_lock, dreq3, socif_debug
142-
mfio89 audio_pll_lock, dreq4, dreq5
137+
mfio84 audio_pll_lock, mips_trace_data, usb_debug
138+
mfio85 rpu_v_pll_lock, mips_trace_data, sdhost_debug
139+
mfio86 rpu_l_pll_lock, mips_trace_data, sdhost_debug
140+
mfio87 sys_pll_lock, dreq2, socif_debug
141+
mfio88 wifi_pll_lock, dreq3, socif_debug
142+
mfio89 bt_pll_lock, dreq4, dreq5
143143
tck
144144
trstn
145145
tdi

Documentation/filesystems/cramfs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ the update lasts only as long as the inode is cached in memory, after
3838
which the timestamp reverts to 1970, i.e. moves backwards in time.
3939

4040
Currently, cramfs must be written and read with architectures of the
41-
same endianness, and can be read only by kernels with PAGE_CACHE_SIZE
41+
same endianness, and can be read only by kernels with PAGE_SIZE
4242
== 4096. At least the latter of these is a bug, but it hasn't been
4343
decided what the best fix is. For the moment if you have larger pages
4444
you can just change the #define in mkcramfs.c, so long as you don't

Documentation/filesystems/tmpfs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ size: The limit of allocated bytes for this tmpfs instance. The
6060
default is half of your physical RAM without swap. If you
6161
oversize your tmpfs instances the machine will deadlock
6262
since the OOM handler will not be able to free that memory.
63-
nr_blocks: The same as size, but in blocks of PAGE_CACHE_SIZE.
63+
nr_blocks: The same as size, but in blocks of PAGE_SIZE.
6464
nr_inodes: The maximum number of inodes for this instance. The default
6565
is half of the number of your physical RAM pages, or (on a
6666
machine with highmem) the number of lowmem RAM pages,

Documentation/filesystems/vfs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,9 @@ struct address_space_operations {
708708
from the address space. This generally corresponds to either a
709709
truncation, punch hole or a complete invalidation of the address
710710
space (in the latter case 'offset' will always be 0 and 'length'
711-
will be PAGE_CACHE_SIZE). Any private data associated with the page
711+
will be PAGE_SIZE). Any private data associated with the page
712712
should be updated to reflect this truncation. If offset is 0 and
713-
length is PAGE_CACHE_SIZE, then the private data should be released,
713+
length is PAGE_SIZE, then the private data should be released,
714714
because the page must be able to be completely discarded. This may
715715
be done by calling the ->releasepage function, but in this case the
716716
release MUST succeed.

MAINTAINERS

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8712,6 +8712,8 @@ F: drivers/pinctrl/sh-pfc/
87128712

87138713
PIN CONTROLLER - SAMSUNG
87148714
M: Tomasz Figa <tomasz.figa@gmail.com>
8715+
M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
8716+
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
87158717
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
87168718
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
87178719
S: Maintained
@@ -12205,9 +12207,9 @@ S: Maintained
1220512207
F: drivers/media/tuners/tuner-xc2028.*
1220612208

1220712209
XEN HYPERVISOR INTERFACE
12208-
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
1220912210
M: Boris Ostrovsky <boris.ostrovsky@oracle.com>
1221012211
M: David Vrabel <david.vrabel@citrix.com>
12212+
M: Juergen Gross <jgross@suse.com>
1221112213
L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
1221212214
T: git git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git
1221312215
S: Supported
@@ -12219,16 +12221,16 @@ F: include/xen/
1221912221
F: include/uapi/xen/
1222012222

1222112223
XEN HYPERVISOR ARM
12222-
M: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12224+
M: Stefano Stabellini <sstabellini@kernel.org>
1222312225
L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
12224-
S: Supported
12226+
S: Maintained
1222512227
F: arch/arm/xen/
1222612228
F: arch/arm/include/asm/xen/
1222712229

1222812230
XEN HYPERVISOR ARM64
12229-
M: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12231+
M: Stefano Stabellini <sstabellini@kernel.org>
1223012232
L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
12231-
S: Supported
12233+
S: Maintained
1223212234
F: arch/arm64/xen/
1223312235
F: arch/arm64/include/asm/xen/
1223412236

arch/arc/mm/cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ void flush_dcache_page(struct page *page)
628628

629629
/* kernel reading from page with U-mapping */
630630
phys_addr_t paddr = (unsigned long)page_address(page);
631-
unsigned long vaddr = page->index << PAGE_CACHE_SHIFT;
631+
unsigned long vaddr = page->index << PAGE_SHIFT;
632632

633633
if (addr_not_cache_congruent(paddr, vaddr))
634634
__flush_dcache_page(paddr, vaddr);

arch/arm/kvm/arm.c

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,15 +1061,27 @@ static void cpu_init_hyp_mode(void *dummy)
10611061
kvm_arm_init_debug();
10621062
}
10631063

1064+
static void cpu_hyp_reinit(void)
1065+
{
1066+
if (is_kernel_in_hyp_mode()) {
1067+
/*
1068+
* cpu_init_stage2() is safe to call even if the PM
1069+
* event was cancelled before the CPU was reset.
1070+
*/
1071+
cpu_init_stage2(NULL);
1072+
} else {
1073+
if (__hyp_get_vectors() == hyp_default_vectors)
1074+
cpu_init_hyp_mode(NULL);
1075+
}
1076+
}
1077+
10641078
static int hyp_init_cpu_notify(struct notifier_block *self,
10651079
unsigned long action, void *cpu)
10661080
{
10671081
switch (action) {
10681082
case CPU_STARTING:
10691083
case CPU_STARTING_FROZEN:
1070-
if (__hyp_get_vectors() == hyp_default_vectors)
1071-
cpu_init_hyp_mode(NULL);
1072-
break;
1084+
cpu_hyp_reinit();
10731085
}
10741086

10751087
return NOTIFY_OK;
@@ -1084,9 +1096,8 @@ static int hyp_init_cpu_pm_notifier(struct notifier_block *self,
10841096
unsigned long cmd,
10851097
void *v)
10861098
{
1087-
if (cmd == CPU_PM_EXIT &&
1088-
__hyp_get_vectors() == hyp_default_vectors) {
1089-
cpu_init_hyp_mode(NULL);
1099+
if (cmd == CPU_PM_EXIT) {
1100+
cpu_hyp_reinit();
10901101
return NOTIFY_OK;
10911102
}
10921103

@@ -1127,6 +1138,22 @@ static int init_subsystems(void)
11271138
{
11281139
int err;
11291140

1141+
/*
1142+
* Register CPU Hotplug notifier
1143+
*/
1144+
cpu_notifier_register_begin();
1145+
err = __register_cpu_notifier(&hyp_init_cpu_nb);
1146+
cpu_notifier_register_done();
1147+
if (err) {
1148+
kvm_err("Cannot register KVM init CPU notifier (%d)\n", err);
1149+
return err;
1150+
}
1151+
1152+
/*
1153+
* Register CPU lower-power notifier
1154+
*/
1155+
hyp_cpu_pm_init();
1156+
11301157
/*
11311158
* Init HYP view of VGIC
11321159
*/
@@ -1270,19 +1297,6 @@ static int init_hyp_mode(void)
12701297
free_boot_hyp_pgd();
12711298
#endif
12721299

1273-
cpu_notifier_register_begin();
1274-
1275-
err = __register_cpu_notifier(&hyp_init_cpu_nb);
1276-
1277-
cpu_notifier_register_done();
1278-
1279-
if (err) {
1280-
kvm_err("Cannot register HYP init CPU notifier (%d)\n", err);
1281-
goto out_err;
1282-
}
1283-
1284-
hyp_cpu_pm_init();
1285-
12861300
/* set size of VMID supported by CPU */
12871301
kvm_vmid_bits = kvm_get_vmid_bits();
12881302
kvm_info("%d-bit VMID\n", kvm_vmid_bits);

arch/arm/mm/flush.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
235235
*/
236236
if (mapping && cache_is_vipt_aliasing())
237237
flush_pfn_alias(page_to_pfn(page),
238-
page->index << PAGE_CACHE_SHIFT);
238+
page->index << PAGE_SHIFT);
239239
}
240240

241241
static void __flush_dcache_aliases(struct address_space *mapping, struct page *page)
@@ -250,7 +250,7 @@ static void __flush_dcache_aliases(struct address_space *mapping, struct page *p
250250
* data in the current VM view associated with this page.
251251
* - aliasing VIPT: we only need to find one mapping of this page.
252252
*/
253-
pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
253+
pgoff = page->index;
254254

255255
flush_dcache_mmap_lock(mapping);
256256
vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) {

arch/arm64/include/asm/kvm_arm.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@
124124
#define VTCR_EL2_SL0_LVL1 (1 << 6)
125125
#define VTCR_EL2_T0SZ_MASK 0x3f
126126
#define VTCR_EL2_T0SZ_40B 24
127-
#define VTCR_EL2_VS 19
127+
#define VTCR_EL2_VS_SHIFT 19
128+
#define VTCR_EL2_VS_8BIT (0 << VTCR_EL2_VS_SHIFT)
129+
#define VTCR_EL2_VS_16BIT (1 << VTCR_EL2_VS_SHIFT)
128130

129131
/*
130132
* We configure the Stage-2 page tables to always restrict the IPA space to be

arch/arm64/include/asm/sysreg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@
141141
#define ID_AA64MMFR1_VMIDBITS_SHIFT 4
142142
#define ID_AA64MMFR1_HADBS_SHIFT 0
143143

144+
#define ID_AA64MMFR1_VMIDBITS_8 0
145+
#define ID_AA64MMFR1_VMIDBITS_16 2
146+
144147
/* id_aa64mmfr2 */
145148
#define ID_AA64MMFR2_UAO_SHIFT 4
146149

arch/arm64/kvm/hyp/s2-setup.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ void __hyp_text __init_stage2_translation(void)
3636
* Read the VMIDBits bits from ID_AA64MMFR1_EL1 and set the VS
3737
* bit in VTCR_EL2.
3838
*/
39-
tmp = (read_sysreg(id_aa64mmfr1_el1) >> 4) & 0xf;
40-
val |= (tmp == 2) ? VTCR_EL2_VS : 0;
39+
tmp = (read_sysreg(id_aa64mmfr1_el1) >> ID_AA64MMFR1_VMIDBITS_SHIFT) & 0xf;
40+
val |= (tmp == ID_AA64MMFR1_VMIDBITS_16) ?
41+
VTCR_EL2_VS_16BIT :
42+
VTCR_EL2_VS_8BIT;
4143

4244
write_sysreg(val, vtcr_el2);
4345
}

arch/mips/alchemy/common/dbdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid,
261261
au1x_dma_chan_t *cp;
262262

263263
/*
264-
* We do the intialization on the first channel allocation.
264+
* We do the initialization on the first channel allocation.
265265
* We have to wait because of the interrupt handler initialization
266266
* which can't be done successfully during board set up.
267267
*/
@@ -964,7 +964,7 @@ u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr)
964964
dp->dscr_source1 = dscr->dscr_source1;
965965
dp->dscr_cmd1 = dscr->dscr_cmd1;
966966
nbytes = dscr->dscr_cmd1;
967-
/* Allow the caller to specifiy if an interrupt is generated */
967+
/* Allow the caller to specify if an interrupt is generated */
968968
dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
969969
dp->dscr_cmd0 |= dscr->dscr_cmd0 | DSCR_CMD0_V;
970970
ctp->chan_ptr->ddma_dbell = 0;

arch/mips/alchemy/devboards/db1000.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,15 @@ int __init db1000_dev_setup(void)
503503
if (board == BCSR_WHOAMI_DB1500) {
504504
c0 = AU1500_GPIO2_INT;
505505
c1 = AU1500_GPIO5_INT;
506-
d0 = AU1500_GPIO0_INT;
507-
d1 = AU1500_GPIO3_INT;
506+
d0 = 0; /* GPIO number, NOT irq! */
507+
d1 = 3; /* GPIO number, NOT irq! */
508508
s0 = AU1500_GPIO1_INT;
509509
s1 = AU1500_GPIO4_INT;
510510
} else if (board == BCSR_WHOAMI_DB1100) {
511511
c0 = AU1100_GPIO2_INT;
512512
c1 = AU1100_GPIO5_INT;
513-
d0 = AU1100_GPIO0_INT;
514-
d1 = AU1100_GPIO3_INT;
513+
d0 = 0; /* GPIO number, NOT irq! */
514+
d1 = 3; /* GPIO number, NOT irq! */
515515
s0 = AU1100_GPIO1_INT;
516516
s1 = AU1100_GPIO4_INT;
517517

@@ -545,15 +545,15 @@ int __init db1000_dev_setup(void)
545545
} else if (board == BCSR_WHOAMI_DB1000) {
546546
c0 = AU1000_GPIO2_INT;
547547
c1 = AU1000_GPIO5_INT;
548-
d0 = AU1000_GPIO0_INT;
549-
d1 = AU1000_GPIO3_INT;
548+
d0 = 0; /* GPIO number, NOT irq! */
549+
d1 = 3; /* GPIO number, NOT irq! */
550550
s0 = AU1000_GPIO1_INT;
551551
s1 = AU1000_GPIO4_INT;
552552
platform_add_devices(db1000_devs, ARRAY_SIZE(db1000_devs));
553553
} else if ((board == BCSR_WHOAMI_PB1500) ||
554554
(board == BCSR_WHOAMI_PB1500R2)) {
555555
c0 = AU1500_GPIO203_INT;
556-
d0 = AU1500_GPIO201_INT;
556+
d0 = 1; /* GPIO number, NOT irq! */
557557
s0 = AU1500_GPIO202_INT;
558558
twosocks = 0;
559559
flashsize = 64;
@@ -566,7 +566,7 @@ int __init db1000_dev_setup(void)
566566
*/
567567
} else if (board == BCSR_WHOAMI_PB1100) {
568568
c0 = AU1100_GPIO11_INT;
569-
d0 = AU1100_GPIO9_INT;
569+
d0 = 9; /* GPIO number, NOT irq! */
570570
s0 = AU1100_GPIO10_INT;
571571
twosocks = 0;
572572
flashsize = 64;
@@ -583,7 +583,6 @@ int __init db1000_dev_setup(void)
583583
} else
584584
return 0; /* unknown board, no further dev setup to do */
585585

586-
irq_set_irq_type(d0, IRQ_TYPE_EDGE_BOTH);
587586
irq_set_irq_type(c0, IRQ_TYPE_LEVEL_LOW);
588587
irq_set_irq_type(s0, IRQ_TYPE_LEVEL_LOW);
589588

@@ -597,7 +596,6 @@ int __init db1000_dev_setup(void)
597596
c0, d0, /*s0*/0, 0, 0);
598597

599598
if (twosocks) {
600-
irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH);
601599
irq_set_irq_type(c1, IRQ_TYPE_LEVEL_LOW);
602600
irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW);
603601

arch/mips/alchemy/devboards/db1550.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ static void __init db1550_devices(void)
514514
AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
515515
AU1000_PCMCIA_IO_PHYS_ADDR,
516516
AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
517-
AU1550_GPIO3_INT, AU1550_GPIO0_INT,
517+
AU1550_GPIO3_INT, 0,
518518
/*AU1550_GPIO21_INT*/0, 0, 0);
519519

520520
db1x_register_pcmcia_socket(
@@ -524,7 +524,7 @@ static void __init db1550_devices(void)
524524
AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
525525
AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000,
526526
AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
527-
AU1550_GPIO5_INT, AU1550_GPIO1_INT,
527+
AU1550_GPIO5_INT, 1,
528528
/*AU1550_GPIO22_INT*/0, 0, 1);
529529

530530
platform_device_register(&db1550_nand_dev);

0 commit comments

Comments
 (0)