Commit c2102f3d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "10 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  scripts/gdb: fix lx-lsmod refcnt
  omfs: fix potential integer overflow in allocator
  omfs: fix sign confusion for bitmap loop counter
  omfs: set error return when d_make_root() fails
  fs, omfs: add NULL terminator in the end up the token list
  MAINTAINERS: update CAPABILITIES pattern
  fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
  tracing/mm: don't trace mm_page_pcpu_drain on offline cpus
  tracing/mm: don't trace mm_page_free on offline cpus
  tracing/mm: don't trace kmem_cache_free on offline cpus
parents 6e49ba1b ca3f172c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2427,7 +2427,6 @@ L: linux-security-module@vger.kernel.org
S:	Supported
F:	include/linux/capability.h
F:	include/uapi/linux/capability.h
F:	security/capability.c
F:	security/commoncap.c
F:	kernel/capability.c

+1 −1
Original line number Diff line number Diff line
@@ -918,7 +918,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
			total_size = total_mapping_size(elf_phdata,
							loc->elf_ex.e_phnum);
			if (!total_size) {
				error = -EINVAL;
				retval = -EINVAL;
				goto out_free_dentry;
			}
		}
+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ int omfs_allocate_range(struct super_block *sb,
	goto out;

found:
	*return_block = i * bits_per_entry + bit;
	*return_block = (u64) i * bits_per_entry + bit;
	*return_size = run;
	ret = set_run(sb, i, bits_per_entry, bit, run, 1);

+7 −3
Original line number Diff line number Diff line
@@ -306,7 +306,8 @@ static const struct super_operations omfs_sops = {
 */
static int omfs_get_imap(struct super_block *sb)
{
	unsigned int bitmap_size, count, array_size;
	unsigned int bitmap_size, array_size;
	int count;
	struct omfs_sb_info *sbi = OMFS_SB(sb);
	struct buffer_head *bh;
	unsigned long **ptr;
@@ -359,7 +360,7 @@ nomem:
}

enum {
	Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask
	Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask, Opt_err
};

static const match_table_t tokens = {
@@ -368,6 +369,7 @@ static const match_table_t tokens = {
	{Opt_umask, "umask=%o"},
	{Opt_dmask, "dmask=%o"},
	{Opt_fmask, "fmask=%o"},
	{Opt_err, NULL},
};

static int parse_options(char *options, struct omfs_sb_info *sbi)
@@ -548,8 +550,10 @@ static int omfs_fill_super(struct super_block *sb, void *data, int silent)
	}

	sb->s_root = d_make_root(root);
	if (!sb->s_root)
	if (!sb->s_root) {
		ret = -ENOMEM;
		goto out_brelse_bh2;
	}
	printk(KERN_DEBUG "omfs: Mounted volume %s\n", omfs_rb->r_name);

	ret = 0;
+50 −4
Original line number Diff line number Diff line
@@ -140,19 +140,42 @@ DEFINE_EVENT(kmem_free, kfree,
	TP_ARGS(call_site, ptr)
);

DEFINE_EVENT(kmem_free, kmem_cache_free,
DEFINE_EVENT_CONDITION(kmem_free, kmem_cache_free,

	TP_PROTO(unsigned long call_site, const void *ptr),

	TP_ARGS(call_site, ptr)
	TP_ARGS(call_site, ptr),

	/*
	 * This trace can be potentially called from an offlined cpu.
	 * Since trace points use RCU and RCU should not be used from
	 * offline cpus, filter such calls out.
	 * While this trace can be called from a preemptable section,
	 * it has no impact on the condition since tasks can migrate
	 * only from online cpus to other online cpus. Thus its safe
	 * to use raw_smp_processor_id.
	 */
	TP_CONDITION(cpu_online(raw_smp_processor_id()))
);

TRACE_EVENT(mm_page_free,
TRACE_EVENT_CONDITION(mm_page_free,

	TP_PROTO(struct page *page, unsigned int order),

	TP_ARGS(page, order),


	/*
	 * This trace can be potentially called from an offlined cpu.
	 * Since trace points use RCU and RCU should not be used from
	 * offline cpus, filter such calls out.
	 * While this trace can be called from a preemptable section,
	 * it has no impact on the condition since tasks can migrate
	 * only from online cpus to other online cpus. Thus its safe
	 * to use raw_smp_processor_id.
	 */
	TP_CONDITION(cpu_online(raw_smp_processor_id())),

	TP_STRUCT__entry(
		__field(	unsigned long,	pfn		)
		__field(	unsigned int,	order		)
@@ -253,12 +276,35 @@ DEFINE_EVENT(mm_page, mm_page_alloc_zone_locked,
	TP_ARGS(page, order, migratetype)
);

DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain,
TRACE_EVENT_CONDITION(mm_page_pcpu_drain,

	TP_PROTO(struct page *page, unsigned int order, int migratetype),

	TP_ARGS(page, order, migratetype),

	/*
	 * This trace can be potentially called from an offlined cpu.
	 * Since trace points use RCU and RCU should not be used from
	 * offline cpus, filter such calls out.
	 * While this trace can be called from a preemptable section,
	 * it has no impact on the condition since tasks can migrate
	 * only from online cpus to other online cpus. Thus its safe
	 * to use raw_smp_processor_id.
	 */
	TP_CONDITION(cpu_online(raw_smp_processor_id())),

	TP_STRUCT__entry(
		__field(	unsigned long,	pfn		)
		__field(	unsigned int,	order		)
		__field(	int,		migratetype	)
	),

	TP_fast_assign(
		__entry->pfn		= page ? page_to_pfn(page) : -1UL;
		__entry->order		= order;
		__entry->migratetype	= migratetype;
	),

	TP_printk("page=%p pfn=%lu order=%d migratetype=%d",
		pfn_to_page(__entry->pfn), __entry->pfn,
		__entry->order, __entry->migratetype)
Loading