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 tag 'xtensa-20251010' of https://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa updates from Max Filippov:

- minor cleanups

* tag 'xtensa-20251010' of https://github.com/jcmvbkbc/linux-xtensa:
xtensa: use HZ_PER_MHZ in platform_calibrate_ccount
xtensa: simdisk: add input size check in proc_write_simdisk

+8 -3
+3 -2
arch/xtensa/kernel/platform.c
··· 14 14 15 15 #include <linux/printk.h> 16 16 #include <linux/types.h> 17 + #include <linux/units.h> 17 18 #include <asm/platform.h> 18 19 #include <asm/timex.h> 19 20 ··· 39 38 #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 40 39 void __weak platform_calibrate_ccount(void) 41 40 { 42 - pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n"); 43 - ccount_freq = 10 * 1000000UL; 41 + pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10 MHz.\n"); 42 + ccount_freq = 10 * HZ_PER_MHZ; 44 43 } 45 44 #endif
+5 -1
arch/xtensa/platforms/iss/simdisk.c
··· 231 231 static ssize_t proc_write_simdisk(struct file *file, const char __user *buf, 232 232 size_t count, loff_t *ppos) 233 233 { 234 - char *tmp = memdup_user_nul(buf, count); 234 + char *tmp; 235 235 struct simdisk *dev = pde_data(file_inode(file)); 236 236 int err; 237 237 238 + if (count == 0 || count > PAGE_SIZE) 239 + return -EINVAL; 240 + 241 + tmp = memdup_user_nul(buf, count); 238 242 if (IS_ERR(tmp)) 239 243 return PTR_ERR(tmp); 240 244