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' (Fixes from Andrew)

Merge misc fixes from Andrew Morton:
"Seven fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (7 patches)
lib/dma-debug.c: fix __hash_bucket_find()
mm: compaction: correct the nr_strict va isolated check for CMA
firmware/memmap: avoid type conflicts with the generic memmap_init()
pidns: remove recursion from free_pid_ns()
drivers/video/backlight/lm3639_bl.c: return proper error in lm3639_bled_mode_store() error paths
kernel/sys.c: fix stack memory content leak via UNAME26
linux/coredump.h needs asm/siginfo.h

+31 -27
+2 -2
drivers/firmware/memmap.c
··· 237 237 * firmware_map_add() or firmware_map_add_early() afterwards, the entries 238 238 * are not added to sysfs. 239 239 */ 240 - static int __init memmap_init(void) 240 + static int __init firmware_memmap_init(void) 241 241 { 242 242 struct firmware_map_entry *entry; 243 243 ··· 246 246 247 247 return 0; 248 248 } 249 - late_initcall(memmap_init); 249 + late_initcall(firmware_memmap_init); 250 250
+2 -2
drivers/video/backlight/lm3639_bl.c
··· 206 206 207 207 out: 208 208 dev_err(pchip->dev, "%s:i2c access fail to register\n", __func__); 209 - return size; 209 + return ret; 210 210 211 211 out_input: 212 212 dev_err(pchip->dev, "%s:input conversion fail\n", __func__); 213 - return size; 213 + return ret; 214 214 215 215 } 216 216
+1
include/linux/coredump.h
··· 4 4 #include <linux/types.h> 5 5 #include <linux/mm.h> 6 6 #include <linux/fs.h> 7 + #include <asm/siginfo.h> 7 8 8 9 /* 9 10 * These are the only things you should do on a core-file: use only these
+1 -7
include/linux/pid_namespace.h
··· 47 47 } 48 48 49 49 extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns); 50 - extern void free_pid_ns(struct kref *kref); 51 50 extern void zap_pid_ns_processes(struct pid_namespace *pid_ns); 52 51 extern int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd); 53 - 54 - static inline void put_pid_ns(struct pid_namespace *ns) 55 - { 56 - if (ns != &init_pid_ns) 57 - kref_put(&ns->kref, free_pid_ns); 58 - } 52 + extern void put_pid_ns(struct pid_namespace *ns); 59 53 60 54 #else /* !CONFIG_PID_NS */ 61 55 #include <linux/err.h>
+15 -8
kernel/pid_namespace.c
··· 133 133 return create_pid_namespace(old_ns); 134 134 } 135 135 136 - void free_pid_ns(struct kref *kref) 136 + static void free_pid_ns(struct kref *kref) 137 137 { 138 - struct pid_namespace *ns, *parent; 138 + struct pid_namespace *ns; 139 139 140 140 ns = container_of(kref, struct pid_namespace, kref); 141 - 142 - parent = ns->parent; 143 141 destroy_pid_namespace(ns); 144 - 145 - if (parent != NULL) 146 - put_pid_ns(parent); 147 142 } 148 - EXPORT_SYMBOL_GPL(free_pid_ns); 143 + 144 + void put_pid_ns(struct pid_namespace *ns) 145 + { 146 + struct pid_namespace *parent; 147 + 148 + while (ns != &init_pid_ns) { 149 + parent = ns->parent; 150 + if (!kref_put(&ns->kref, free_pid_ns)) 151 + break; 152 + ns = parent; 153 + } 154 + } 155 + EXPORT_SYMBOL_GPL(put_pid_ns); 149 156 150 157 void zap_pid_ns_processes(struct pid_namespace *pid_ns) 151 158 {
+7 -5
kernel/sys.c
··· 1265 1265 * Work around broken programs that cannot handle "Linux 3.0". 1266 1266 * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40 1267 1267 */ 1268 - static int override_release(char __user *release, int len) 1268 + static int override_release(char __user *release, size_t len) 1269 1269 { 1270 1270 int ret = 0; 1271 - char buf[65]; 1272 1271 1273 1272 if (current->personality & UNAME26) { 1274 - char *rest = UTS_RELEASE; 1273 + const char *rest = UTS_RELEASE; 1274 + char buf[65] = { 0 }; 1275 1275 int ndots = 0; 1276 1276 unsigned v; 1277 + size_t copy; 1277 1278 1278 1279 while (*rest) { 1279 1280 if (*rest == '.' && ++ndots >= 3) ··· 1284 1283 rest++; 1285 1284 } 1286 1285 v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40; 1287 - snprintf(buf, len, "2.6.%u%s", v, rest); 1288 - ret = copy_to_user(release, buf, len); 1286 + copy = min(sizeof(buf), max_t(size_t, 1, len)); 1287 + copy = scnprintf(buf, copy, "2.6.%u%s", v, rest); 1288 + ret = copy_to_user(release, buf, copy + 1); 1289 1289 } 1290 1290 return ret; 1291 1291 }
+2 -2
lib/dma-debug.c
··· 264 264 match_fn match) 265 265 { 266 266 struct dma_debug_entry *entry, *ret = NULL; 267 - int matches = 0, match_lvl, last_lvl = 0; 267 + int matches = 0, match_lvl, last_lvl = -1; 268 268 269 269 list_for_each_entry(entry, &bucket->list, list) { 270 270 if (!match(ref, entry)) ··· 293 293 } else if (match_lvl > last_lvl) { 294 294 /* 295 295 * We found an entry that fits better then the 296 - * previous one 296 + * previous one or it is the 1st match. 297 297 */ 298 298 last_lvl = match_lvl; 299 299 ret = entry;
+1 -1
mm/compaction.c
··· 346 346 * pages requested were isolated. If there were any failures, 0 is 347 347 * returned and CMA will fail. 348 348 */ 349 - if (strict && nr_strict_required != total_isolated) 349 + if (strict && nr_strict_required > total_isolated) 350 350 total_isolated = 0; 351 351 352 352 if (locked)