Skip to content

Commit c727b4c

Browse files
committed
Merge branch 'akpm' (incoming fixes from Andrew)
Merge misc fixes from Andrew Morton: "The audit fixes have been floating around for a while - Al and Eric aren't responding to either myself or Kees so I asked Kees to re-review them and here they are." * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (22 commits) lib/rbtree.c: avoid the use of non-static __always_inline MAINTAINERS: Omar had moved mm: compaction: partially revert capture of suitable high-order page linux/audit.h: move ptrace.h include to kernel header kernel/audit.c: avoid negative sleep durations audit: catch possible NULL audit buffers audit: create explicit AUDIT_SECCOMP event type MAINTAINERS: fix a status pattern MAINTAINERS: fix arch/arm/plat-omap/include/plat/omap_hwmod.h mm: thp: acquire the anon_vma rwsem for write during split mm: mmap: annotate vm_lock_anon_vma locking properly for lockdep lockdep, rwsem: provide down_write_nest_lock() arch/mn10300/Kconfig: select CONFIG_GENERIC_ATOMIC64 mm: bootmem: fix free_all_bootmem_core() with odd bitmap alignment mm: use aligned zone start for pfn_to_bitidx calculation fs/exec.c: work around icc miscompilation mm: compaction: fix echo 1 > compact_memory return error issue mm: memblock: fix wrong memmove size in memblock_merge_regions() drivers/video/ssd1307fb.c: fix bit order bug in the byte translation function mm: migrate: check page_count of THP before migrating ...
2 parents 93ccb39 + 3cb7a56 commit c727b4c

26 files changed

+227
-78
lines changed

MAINTAINERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ F: arch/arm/
648648

649649
ARM SUB-ARCHITECTURES
650650
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
651-
S: MAINTAINED
651+
S: Maintained
652652
F: arch/arm/mach-*/
653653
F: arch/arm/plat-*/
654654
T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git
@@ -5507,8 +5507,7 @@ M: Benoît Cousson <b-cousson@ti.com>
55075507
M: Paul Walmsley <paul@pwsan.com>
55085508
L: linux-omap@vger.kernel.org
55095509
S: Maintained
5510-
F: arch/arm/mach-omap2/omap_hwmod.c
5511-
F: arch/arm/plat-omap/include/plat/omap_hwmod.h
5510+
F: arch/arm/mach-omap2/omap_hwmod.*
55125511

55135512
OMAP HWMOD DATA FOR OMAP4-BASED DEVICES
55145513
M: Benoît Cousson <b-cousson@ti.com>
@@ -7334,7 +7333,7 @@ S: Odd Fixes
73347333
F: drivers/staging/speakup/
73357334

73367335
STAGING - TI DSP BRIDGE DRIVERS
7337-
M: Omar Ramirez Luna <omar.ramirez@ti.com>
7336+
M: Omar Ramirez Luna <omar.ramirez@copitl.com>
73387337
S: Odd Fixes
73397338
F: drivers/staging/tidspbridge/
73407339

arch/mn10300/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ config MN10300
66
select ARCH_WANT_IPC_PARSE_VERSION
77
select HAVE_ARCH_TRACEHOOK
88
select HAVE_ARCH_KGDB
9+
select GENERIC_ATOMIC64
910
select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
1011
select GENERIC_CLOCKEVENTS
1112
select MODULES_USE_ELF_RELA

drivers/rtc/rtc-da9055.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static const struct rtc_class_ops da9055_rtc_ops = {
227227
.alarm_irq_enable = da9055_rtc_alarm_irq_enable,
228228
};
229229

230-
static int __init da9055_rtc_device_init(struct da9055 *da9055,
230+
static int da9055_rtc_device_init(struct da9055 *da9055,
231231
struct da9055_pdata *pdata)
232232
{
233233
int ret;

drivers/video/ssd1307fb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ static void ssd1307fb_update_display(struct ssd1307fb_par *par)
145145
u32 page_length = SSD1307FB_WIDTH * i;
146146
u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8;
147147
u8 byte = *(vmem + index);
148-
u8 bit = byte & (1 << (7 - (j % 8)));
149-
bit = bit >> (7 - (j % 8));
148+
u8 bit = byte & (1 << (j % 8));
149+
bit = bit >> (j % 8);
150150
buf |= bit << k;
151151
}
152152
ssd1307fb_write_data(par->client, buf);

fs/exec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,9 @@ static int count(struct user_arg_ptr argv, int max)
434434
if (IS_ERR(p))
435435
return -EFAULT;
436436

437-
if (i++ >= max)
437+
if (i >= max)
438438
return -E2BIG;
439+
++i;
439440

440441
if (fatal_signal_pending(current))
441442
return -ERESTARTNOHAND;

include/linux/audit.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#define _LINUX_AUDIT_H_
2525

2626
#include <linux/sched.h>
27+
#include <linux/ptrace.h>
2728
#include <uapi/linux/audit.h>
2829

2930
struct audit_sig_info {
@@ -157,7 +158,8 @@ void audit_core_dumps(long signr);
157158

158159
static inline void audit_seccomp(unsigned long syscall, long signr, int code)
159160
{
160-
if (unlikely(!audit_dummy_context()))
161+
/* Force a record to be reported if a signal was delivered. */
162+
if (signr || unlikely(!audit_dummy_context()))
161163
__audit_seccomp(syscall, signr, code);
162164
}
163165

include/linux/cpu_rmap.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@
1313
#include <linux/cpumask.h>
1414
#include <linux/gfp.h>
1515
#include <linux/slab.h>
16+
#include <linux/kref.h>
1617

1718
/**
1819
* struct cpu_rmap - CPU affinity reverse-map
20+
* @refcount: kref for object
1921
* @size: Number of objects to be reverse-mapped
2022
* @used: Number of objects added
2123
* @obj: Pointer to array of object pointers
2224
* @near: For each CPU, the index and distance to the nearest object,
2325
* based on affinity masks
2426
*/
2527
struct cpu_rmap {
28+
struct kref refcount;
2629
u16 size, used;
2730
void **obj;
2831
struct {
@@ -33,15 +36,7 @@ struct cpu_rmap {
3336
#define CPU_RMAP_DIST_INF 0xffff
3437

3538
extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags);
36-
37-
/**
38-
* free_cpu_rmap - free CPU affinity reverse-map
39-
* @rmap: Reverse-map allocated with alloc_cpu_rmap(), or %NULL
40-
*/
41-
static inline void free_cpu_rmap(struct cpu_rmap *rmap)
42-
{
43-
kfree(rmap);
44-
}
39+
extern int cpu_rmap_put(struct cpu_rmap *rmap);
4540

4641
extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj);
4742
extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index,

include/linux/interrupt.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,6 @@ struct irq_affinity_notify {
268268
extern int
269269
irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
270270

271-
static inline void irq_run_affinity_notifiers(void)
272-
{
273-
flush_scheduled_work();
274-
}
275-
276271
#else /* CONFIG_SMP */
277272

278273
static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m)

include/linux/lockdep.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,17 @@ static inline void print_irqtrace_events(struct task_struct *curr)
524524
#ifdef CONFIG_DEBUG_LOCK_ALLOC
525525
# ifdef CONFIG_PROVE_LOCKING
526526
# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
527+
# define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i)
527528
# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i)
528529
# else
529530
# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
531+
# define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i)
530532
# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i)
531533
# endif
532534
# define rwsem_release(l, n, i) lock_release(l, n, i)
533535
#else
534536
# define rwsem_acquire(l, s, t, i) do { } while (0)
537+
# define rwsem_acquire_nest(l, s, t, n, i) do { } while (0)
535538
# define rwsem_acquire_read(l, s, t, i) do { } while (0)
536539
# define rwsem_release(l, n, i) do { } while (0)
537540
#endif

include/linux/rbtree_augmented.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ __rb_change_child(struct rb_node *old, struct rb_node *new,
123123
extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root,
124124
void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
125125

126-
static __always_inline void
127-
rb_erase_augmented(struct rb_node *node, struct rb_root *root,
128-
const struct rb_augment_callbacks *augment)
126+
static __always_inline struct rb_node *
127+
__rb_erase_augmented(struct rb_node *node, struct rb_root *root,
128+
const struct rb_augment_callbacks *augment)
129129
{
130130
struct rb_node *child = node->rb_right, *tmp = node->rb_left;
131131
struct rb_node *parent, *rebalance;
@@ -217,6 +217,14 @@ rb_erase_augmented(struct rb_node *node, struct rb_root *root,
217217
}
218218

219219
augment->propagate(tmp, NULL);
220+
return rebalance;
221+
}
222+
223+
static __always_inline void
224+
rb_erase_augmented(struct rb_node *node, struct rb_root *root,
225+
const struct rb_augment_callbacks *augment)
226+
{
227+
struct rb_node *rebalance = __rb_erase_augmented(node, root, augment);
220228
if (rebalance)
221229
__rb_erase_color(rebalance, root, augment->rotate);
222230
}

0 commit comments

Comments
 (0)