Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+60 -18
-1
MAINTAINERS
··· 2427 2427 S: Supported 2428 2428 F: include/linux/capability.h 2429 2429 F: include/uapi/linux/capability.h 2430 - F: security/capability.c 2431 2430 F: security/commoncap.c 2432 2431 F: kernel/capability.c 2433 2432
+1 -1
fs/binfmt_elf.c
··· 918 918 total_size = total_mapping_size(elf_phdata, 919 919 loc->elf_ex.e_phnum); 920 920 if (!total_size) { 921 - error = -EINVAL; 921 + retval = -EINVAL; 922 922 goto out_free_dentry; 923 923 } 924 924 }
+1 -1
fs/omfs/bitmap.c
··· 159 159 goto out; 160 160 161 161 found: 162 - *return_block = i * bits_per_entry + bit; 162 + *return_block = (u64) i * bits_per_entry + bit; 163 163 *return_size = run; 164 164 ret = set_run(sb, i, bits_per_entry, bit, run, 1); 165 165
+7 -3
fs/omfs/inode.c
··· 306 306 */ 307 307 static int omfs_get_imap(struct super_block *sb) 308 308 { 309 - unsigned int bitmap_size, count, array_size; 309 + unsigned int bitmap_size, array_size; 310 + int count; 310 311 struct omfs_sb_info *sbi = OMFS_SB(sb); 311 312 struct buffer_head *bh; 312 313 unsigned long **ptr; ··· 360 359 } 361 360 362 361 enum { 363 - Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask 362 + Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask, Opt_err 364 363 }; 365 364 366 365 static const match_table_t tokens = { ··· 369 368 {Opt_umask, "umask=%o"}, 370 369 {Opt_dmask, "dmask=%o"}, 371 370 {Opt_fmask, "fmask=%o"}, 371 + {Opt_err, NULL}, 372 372 }; 373 373 374 374 static int parse_options(char *options, struct omfs_sb_info *sbi) ··· 550 548 } 551 549 552 550 sb->s_root = d_make_root(root); 553 - if (!sb->s_root) 551 + if (!sb->s_root) { 552 + ret = -ENOMEM; 554 553 goto out_brelse_bh2; 554 + } 555 555 printk(KERN_DEBUG "omfs: Mounted volume %s\n", omfs_rb->r_name); 556 556 557 557 ret = 0;
+50 -4
include/trace/events/kmem.h
··· 140 140 TP_ARGS(call_site, ptr) 141 141 ); 142 142 143 - DEFINE_EVENT(kmem_free, kmem_cache_free, 143 + DEFINE_EVENT_CONDITION(kmem_free, kmem_cache_free, 144 144 145 145 TP_PROTO(unsigned long call_site, const void *ptr), 146 146 147 - TP_ARGS(call_site, ptr) 147 + TP_ARGS(call_site, ptr), 148 + 149 + /* 150 + * This trace can be potentially called from an offlined cpu. 151 + * Since trace points use RCU and RCU should not be used from 152 + * offline cpus, filter such calls out. 153 + * While this trace can be called from a preemptable section, 154 + * it has no impact on the condition since tasks can migrate 155 + * only from online cpus to other online cpus. Thus its safe 156 + * to use raw_smp_processor_id. 157 + */ 158 + TP_CONDITION(cpu_online(raw_smp_processor_id())) 148 159 ); 149 160 150 - TRACE_EVENT(mm_page_free, 161 + TRACE_EVENT_CONDITION(mm_page_free, 151 162 152 163 TP_PROTO(struct page *page, unsigned int order), 153 164 154 165 TP_ARGS(page, order), 166 + 167 + 168 + /* 169 + * This trace can be potentially called from an offlined cpu. 170 + * Since trace points use RCU and RCU should not be used from 171 + * offline cpus, filter such calls out. 172 + * While this trace can be called from a preemptable section, 173 + * it has no impact on the condition since tasks can migrate 174 + * only from online cpus to other online cpus. Thus its safe 175 + * to use raw_smp_processor_id. 176 + */ 177 + TP_CONDITION(cpu_online(raw_smp_processor_id())), 155 178 156 179 TP_STRUCT__entry( 157 180 __field( unsigned long, pfn ) ··· 276 253 TP_ARGS(page, order, migratetype) 277 254 ); 278 255 279 - DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain, 256 + TRACE_EVENT_CONDITION(mm_page_pcpu_drain, 280 257 281 258 TP_PROTO(struct page *page, unsigned int order, int migratetype), 282 259 283 260 TP_ARGS(page, order, migratetype), 261 + 262 + /* 263 + * This trace can be potentially called from an offlined cpu. 264 + * Since trace points use RCU and RCU should not be used from 265 + * offline cpus, filter such calls out. 266 + * While this trace can be called from a preemptable section, 267 + * it has no impact on the condition since tasks can migrate 268 + * only from online cpus to other online cpus. Thus its safe 269 + * to use raw_smp_processor_id. 270 + */ 271 + TP_CONDITION(cpu_online(raw_smp_processor_id())), 272 + 273 + TP_STRUCT__entry( 274 + __field( unsigned long, pfn ) 275 + __field( unsigned int, order ) 276 + __field( int, migratetype ) 277 + ), 278 + 279 + TP_fast_assign( 280 + __entry->pfn = page ? page_to_pfn(page) : -1UL; 281 + __entry->order = order; 282 + __entry->migratetype = migratetype; 283 + ), 284 284 285 285 TP_printk("page=%p pfn=%lu order=%d migratetype=%d", 286 286 pfn_to_page(__entry->pfn), __entry->pfn,
+1 -8
scripts/gdb/linux/modules.py
··· 73 73 " " if utils.get_long_type().sizeof == 8 else "")) 74 74 75 75 for module in module_list(): 76 - ref = 0 77 - module_refptr = module['refptr'] 78 - for cpu in cpus.cpu_list("cpu_possible_mask"): 79 - refptr = cpus.per_cpu(module_refptr, cpu) 80 - ref += refptr['incs'] 81 - ref -= refptr['decs'] 82 - 83 76 gdb.write("{address} {name:<19} {size:>8} {ref}".format( 84 77 address=str(module['module_core']).split()[0], 85 78 name=module['name'].string(), 86 79 size=str(module['core_size']), 87 - ref=str(ref))) 80 + ref=str(module['refcnt']['counter']))) 88 81 89 82 source_list = module['source_list'] 90 83 t = self._module_use_type.get_type().pointer()