diff options
| -rw-r--r-- | arch/arm64/configs/defconfig | 9 | ||||
| -rw-r--r-- | arch/arm64/include/asm/dma-mapping.h | 11 | ||||
| -rw-r--r-- | arch/arm64/include/asm/pgtable.h | 5 | ||||
| -rw-r--r-- | arch/arm64/kernel/suspend.c | 14 | ||||
| -rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 46 | ||||
| -rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 1 | ||||
| -rw-r--r-- | drivers/md/dm-thin.c | 29 | ||||
| -rw-r--r-- | drivers/md/dm.c | 2 | ||||
| -rw-r--r-- | include/linux/audit.h | 4 | ||||
| -rw-r--r-- | kernel/audit.c | 8 | ||||
| -rw-r--r-- | kernel/auditfilter.c | 23 | ||||
| -rw-r--r-- | kernel/auditsc.c | 14 | ||||
| -rw-r--r-- | mm/memory.c | 4 |
13 files changed, 99 insertions, 71 deletions
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index dd301be89ecc..5376d908eabe 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | # CONFIG_LOCALVERSION_AUTO is not set | 1 | # CONFIG_LOCALVERSION_AUTO is not set |
| 2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
| 4 | CONFIG_FHANDLE=y | ||
| 4 | CONFIG_AUDIT=y | 5 | CONFIG_AUDIT=y |
| 5 | CONFIG_NO_HZ_IDLE=y | 6 | CONFIG_NO_HZ_IDLE=y |
| 6 | CONFIG_HIGH_RES_TIMERS=y | 7 | CONFIG_HIGH_RES_TIMERS=y |
| @@ -13,14 +14,12 @@ CONFIG_TASK_IO_ACCOUNTING=y | |||
| 13 | CONFIG_IKCONFIG=y | 14 | CONFIG_IKCONFIG=y |
| 14 | CONFIG_IKCONFIG_PROC=y | 15 | CONFIG_IKCONFIG_PROC=y |
| 15 | CONFIG_LOG_BUF_SHIFT=14 | 16 | CONFIG_LOG_BUF_SHIFT=14 |
| 16 | CONFIG_RESOURCE_COUNTERS=y | ||
| 17 | CONFIG_MEMCG=y | 17 | CONFIG_MEMCG=y |
| 18 | CONFIG_MEMCG_SWAP=y | 18 | CONFIG_MEMCG_SWAP=y |
| 19 | CONFIG_MEMCG_KMEM=y | 19 | CONFIG_MEMCG_KMEM=y |
| 20 | CONFIG_CGROUP_HUGETLB=y | 20 | CONFIG_CGROUP_HUGETLB=y |
| 21 | # CONFIG_UTS_NS is not set | 21 | # CONFIG_UTS_NS is not set |
| 22 | # CONFIG_IPC_NS is not set | 22 | # CONFIG_IPC_NS is not set |
| 23 | # CONFIG_PID_NS is not set | ||
| 24 | # CONFIG_NET_NS is not set | 23 | # CONFIG_NET_NS is not set |
| 25 | CONFIG_SCHED_AUTOGROUP=y | 24 | CONFIG_SCHED_AUTOGROUP=y |
| 26 | CONFIG_BLK_DEV_INITRD=y | 25 | CONFIG_BLK_DEV_INITRD=y |
| @@ -92,7 +91,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | |||
| 92 | CONFIG_SERIAL_OF_PLATFORM=y | 91 | CONFIG_SERIAL_OF_PLATFORM=y |
| 93 | CONFIG_VIRTIO_CONSOLE=y | 92 | CONFIG_VIRTIO_CONSOLE=y |
| 94 | # CONFIG_HW_RANDOM is not set | 93 | # CONFIG_HW_RANDOM is not set |
| 95 | # CONFIG_HMC_DRV is not set | ||
| 96 | CONFIG_SPI=y | 94 | CONFIG_SPI=y |
| 97 | CONFIG_SPI_PL022=y | 95 | CONFIG_SPI_PL022=y |
| 98 | CONFIG_GPIO_PL061=y | 96 | CONFIG_GPIO_PL061=y |
| @@ -133,6 +131,8 @@ CONFIG_EXT3_FS=y | |||
| 133 | CONFIG_EXT4_FS=y | 131 | CONFIG_EXT4_FS=y |
| 134 | CONFIG_FANOTIFY=y | 132 | CONFIG_FANOTIFY=y |
| 135 | CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y | 133 | CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y |
| 134 | CONFIG_QUOTA=y | ||
| 135 | CONFIG_AUTOFS4_FS=y | ||
| 136 | CONFIG_FUSE_FS=y | 136 | CONFIG_FUSE_FS=y |
| 137 | CONFIG_CUSE=y | 137 | CONFIG_CUSE=y |
| 138 | CONFIG_VFAT_FS=y | 138 | CONFIG_VFAT_FS=y |
| @@ -152,14 +152,15 @@ CONFIG_MAGIC_SYSRQ=y | |||
| 152 | CONFIG_DEBUG_KERNEL=y | 152 | CONFIG_DEBUG_KERNEL=y |
| 153 | CONFIG_LOCKUP_DETECTOR=y | 153 | CONFIG_LOCKUP_DETECTOR=y |
| 154 | # CONFIG_SCHED_DEBUG is not set | 154 | # CONFIG_SCHED_DEBUG is not set |
| 155 | # CONFIG_DEBUG_PREEMPT is not set | ||
| 155 | # CONFIG_FTRACE is not set | 156 | # CONFIG_FTRACE is not set |
| 157 | CONFIG_KEYS=y | ||
| 156 | CONFIG_SECURITY=y | 158 | CONFIG_SECURITY=y |
| 157 | CONFIG_CRYPTO_ANSI_CPRNG=y | 159 | CONFIG_CRYPTO_ANSI_CPRNG=y |
| 158 | CONFIG_ARM64_CRYPTO=y | 160 | CONFIG_ARM64_CRYPTO=y |
| 159 | CONFIG_CRYPTO_SHA1_ARM64_CE=y | 161 | CONFIG_CRYPTO_SHA1_ARM64_CE=y |
| 160 | CONFIG_CRYPTO_SHA2_ARM64_CE=y | 162 | CONFIG_CRYPTO_SHA2_ARM64_CE=y |
| 161 | CONFIG_CRYPTO_GHASH_ARM64_CE=y | 163 | CONFIG_CRYPTO_GHASH_ARM64_CE=y |
| 162 | CONFIG_CRYPTO_AES_ARM64_CE=y | ||
| 163 | CONFIG_CRYPTO_AES_ARM64_CE_CCM=y | 164 | CONFIG_CRYPTO_AES_ARM64_CE_CCM=y |
| 164 | CONFIG_CRYPTO_AES_ARM64_CE_BLK=y | 165 | CONFIG_CRYPTO_AES_ARM64_CE_BLK=y |
| 165 | CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y | 166 | CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y |
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h index d34189bceff7..9ce3e680ae1c 100644 --- a/arch/arm64/include/asm/dma-mapping.h +++ b/arch/arm64/include/asm/dma-mapping.h | |||
| @@ -52,13 +52,14 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) | |||
| 52 | dev->archdata.dma_ops = ops; | 52 | dev->archdata.dma_ops = ops; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static inline int set_arch_dma_coherent_ops(struct device *dev) | 55 | static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, |
| 56 | struct iommu_ops *iommu, bool coherent) | ||
| 56 | { | 57 | { |
| 57 | dev->archdata.dma_coherent = true; | 58 | dev->archdata.dma_coherent = coherent; |
| 58 | set_dma_ops(dev, &coherent_swiotlb_dma_ops); | 59 | if (coherent) |
| 59 | return 0; | 60 | set_dma_ops(dev, &coherent_swiotlb_dma_ops); |
| 60 | } | 61 | } |
| 61 | #define set_arch_dma_coherent_ops set_arch_dma_coherent_ops | 62 | #define arch_setup_dma_ops arch_setup_dma_ops |
| 62 | 63 | ||
| 63 | /* do not use this function in a driver */ | 64 | /* do not use this function in a driver */ |
| 64 | static inline bool is_device_dma_coherent(struct device *dev) | 65 | static inline bool is_device_dma_coherent(struct device *dev) |
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index df22314f57cf..210d632aa5ad 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
| @@ -298,7 +298,6 @@ void pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address, | |||
| 298 | #define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) | 298 | #define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) |
| 299 | #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) | 299 | #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) |
| 300 | 300 | ||
| 301 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) | ||
| 302 | #define pud_write(pud) pte_write(pud_pte(pud)) | 301 | #define pud_write(pud) pte_write(pud_pte(pud)) |
| 303 | #define pud_pfn(pud) (((pud_val(pud) & PUD_MASK) & PHYS_MASK) >> PAGE_SHIFT) | 302 | #define pud_pfn(pud) (((pud_val(pud) & PUD_MASK) & PHYS_MASK) >> PAGE_SHIFT) |
| 304 | 303 | ||
| @@ -401,7 +400,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | |||
| 401 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr); | 400 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr); |
| 402 | } | 401 | } |
| 403 | 402 | ||
| 404 | #define pud_page(pud) pmd_page(pud_pmd(pud)) | 403 | #define pud_page(pud) pfn_to_page(__phys_to_pfn(pud_val(pud) & PHYS_MASK)) |
| 405 | 404 | ||
| 406 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 2 */ | 405 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 2 */ |
| 407 | 406 | ||
| @@ -437,6 +436,8 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long addr) | |||
| 437 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(addr); | 436 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(addr); |
| 438 | } | 437 | } |
| 439 | 438 | ||
| 439 | #define pgd_page(pgd) pfn_to_page(__phys_to_pfn(pgd_val(pgd) & PHYS_MASK)) | ||
| 440 | |||
| 440 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 3 */ | 441 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 3 */ |
| 441 | 442 | ||
| 442 | #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) | 443 | #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) |
diff --git a/arch/arm64/kernel/suspend.c b/arch/arm64/kernel/suspend.c index 3771b72b6569..2d6b6065fe7f 100644 --- a/arch/arm64/kernel/suspend.c +++ b/arch/arm64/kernel/suspend.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <asm/debug-monitors.h> | 5 | #include <asm/debug-monitors.h> |
| 6 | #include <asm/pgtable.h> | 6 | #include <asm/pgtable.h> |
| 7 | #include <asm/memory.h> | 7 | #include <asm/memory.h> |
| 8 | #include <asm/mmu_context.h> | ||
| 8 | #include <asm/smp_plat.h> | 9 | #include <asm/smp_plat.h> |
| 9 | #include <asm/suspend.h> | 10 | #include <asm/suspend.h> |
| 10 | #include <asm/tlbflush.h> | 11 | #include <asm/tlbflush.h> |
| @@ -98,7 +99,18 @@ int __cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) | |||
| 98 | */ | 99 | */ |
| 99 | ret = __cpu_suspend_enter(arg, fn); | 100 | ret = __cpu_suspend_enter(arg, fn); |
| 100 | if (ret == 0) { | 101 | if (ret == 0) { |
| 101 | cpu_switch_mm(mm->pgd, mm); | 102 | /* |
| 103 | * We are resuming from reset with TTBR0_EL1 set to the | ||
| 104 | * idmap to enable the MMU; restore the active_mm mappings in | ||
| 105 | * TTBR0_EL1 unless the active_mm == &init_mm, in which case | ||
| 106 | * the thread entered __cpu_suspend with TTBR0_EL1 set to | ||
| 107 | * reserved TTBR0 page tables and should be restored as such. | ||
| 108 | */ | ||
| 109 | if (mm == &init_mm) | ||
| 110 | cpu_set_reserved_ttbr0(); | ||
| 111 | else | ||
| 112 | cpu_switch_mm(mm->pgd, mm); | ||
| 113 | |||
| 102 | flush_tlb_all(); | 114 | flush_tlb_all(); |
| 103 | 115 | ||
| 104 | /* | 116 | /* |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 5fa83f751378..6b65fa4e0c55 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
| @@ -199,18 +199,6 @@ struct bmc_device { | |||
| 199 | int guid_set; | 199 | int guid_set; |
| 200 | char name[16]; | 200 | char name[16]; |
| 201 | struct kref usecount; | 201 | struct kref usecount; |
| 202 | |||
| 203 | /* bmc device attributes */ | ||
| 204 | struct device_attribute device_id_attr; | ||
| 205 | struct device_attribute provides_dev_sdrs_attr; | ||
| 206 | struct device_attribute revision_attr; | ||
| 207 | struct device_attribute firmware_rev_attr; | ||
| 208 | struct device_attribute version_attr; | ||
| 209 | struct device_attribute add_dev_support_attr; | ||
| 210 | struct device_attribute manufacturer_id_attr; | ||
| 211 | struct device_attribute product_id_attr; | ||
| 212 | struct device_attribute guid_attr; | ||
| 213 | struct device_attribute aux_firmware_rev_attr; | ||
| 214 | }; | 202 | }; |
| 215 | #define to_bmc_device(x) container_of((x), struct bmc_device, pdev.dev) | 203 | #define to_bmc_device(x) container_of((x), struct bmc_device, pdev.dev) |
| 216 | 204 | ||
| @@ -2252,7 +2240,7 @@ static ssize_t device_id_show(struct device *dev, | |||
| 2252 | 2240 | ||
| 2253 | return snprintf(buf, 10, "%u\n", bmc->id.device_id); | 2241 | return snprintf(buf, 10, "%u\n", bmc->id.device_id); |
| 2254 | } | 2242 | } |
| 2255 | DEVICE_ATTR(device_id, S_IRUGO, device_id_show, NULL); | 2243 | static DEVICE_ATTR(device_id, S_IRUGO, device_id_show, NULL); |
| 2256 | 2244 | ||
| 2257 | static ssize_t provides_device_sdrs_show(struct device *dev, | 2245 | static ssize_t provides_device_sdrs_show(struct device *dev, |
| 2258 | struct device_attribute *attr, | 2246 | struct device_attribute *attr, |
| @@ -2263,7 +2251,8 @@ static ssize_t provides_device_sdrs_show(struct device *dev, | |||
| 2263 | return snprintf(buf, 10, "%u\n", | 2251 | return snprintf(buf, 10, "%u\n", |
| 2264 | (bmc->id.device_revision & 0x80) >> 7); | 2252 | (bmc->id.device_revision & 0x80) >> 7); |
| 2265 | } | 2253 | } |
| 2266 | DEVICE_ATTR(provides_device_sdrs, S_IRUGO, provides_device_sdrs_show, NULL); | 2254 | static DEVICE_ATTR(provides_device_sdrs, S_IRUGO, provides_device_sdrs_show, |
| 2255 | NULL); | ||
| 2267 | 2256 | ||
| 2268 | static ssize_t revision_show(struct device *dev, struct device_attribute *attr, | 2257 | static ssize_t revision_show(struct device *dev, struct device_attribute *attr, |
| 2269 | char *buf) | 2258 | char *buf) |
| @@ -2273,7 +2262,7 @@ static ssize_t revision_show(struct device *dev, struct device_attribute *attr, | |||
| 2273 | return snprintf(buf, 20, "%u\n", | 2262 | return snprintf(buf, 20, "%u\n", |
| 2274 | bmc->id.device_revision & 0x0F); | 2263 | bmc->id.device_revision & 0x0F); |
| 2275 | } | 2264 | } |
| 2276 | DEVICE_ATTR(revision, S_IRUGO, revision_show, NULL); | 2265 | static DEVICE_ATTR(revision, S_IRUGO, revision_show, NULL); |
| 2277 | 2266 | ||
| 2278 | static ssize_t firmware_revision_show(struct device *dev, | 2267 | static ssize_t firmware_revision_show(struct device *dev, |
| 2279 | struct device_attribute *attr, | 2268 | struct device_attribute *attr, |
| @@ -2284,7 +2273,7 @@ static ssize_t firmware_revision_show(struct device *dev, | |||
| 2284 | return snprintf(buf, 20, "%u.%x\n", bmc->id.firmware_revision_1, | 2273 | return snprintf(buf, 20, "%u.%x\n", bmc->id.firmware_revision_1, |
| 2285 | bmc->id.firmware_revision_2); | 2274 | bmc->id.firmware_revision_2); |
| 2286 | } | 2275 | } |
| 2287 | DEVICE_ATTR(firmware_revision, S_IRUGO, firmware_revision_show, NULL); | 2276 | static DEVICE_ATTR(firmware_revision, S_IRUGO, firmware_revision_show, NULL); |
| 2288 | 2277 | ||
| 2289 | static ssize_t ipmi_version_show(struct device *dev, | 2278 | static ssize_t ipmi_version_show(struct device *dev, |
| 2290 | struct device_attribute *attr, | 2279 | struct device_attribute *attr, |
| @@ -2296,7 +2285,7 @@ static ssize_t ipmi_version_show(struct device *dev, | |||
| 2296 | ipmi_version_major(&bmc->id), | 2285 | ipmi_version_major(&bmc->id), |
| 2297 | ipmi_version_minor(&bmc->id)); | 2286 | ipmi_version_minor(&bmc->id)); |
| 2298 | } | 2287 | } |
| 2299 | DEVICE_ATTR(ipmi_version, S_IRUGO, ipmi_version_show, NULL); | 2288 | static DEVICE_ATTR(ipmi_version, S_IRUGO, ipmi_version_show, NULL); |
| 2300 | 2289 | ||
| 2301 | static ssize_t add_dev_support_show(struct device *dev, | 2290 | static ssize_t add_dev_support_show(struct device *dev, |
| 2302 | struct device_attribute *attr, | 2291 | struct device_attribute *attr, |
| @@ -2307,7 +2296,8 @@ static ssize_t add_dev_support_show(struct device *dev, | |||
| 2307 | return snprintf(buf, 10, "0x%02x\n", | 2296 | return snprintf(buf, 10, "0x%02x\n", |
| 2308 | bmc->id.additional_device_support); | 2297 | bmc->id.additional_device_support); |
| 2309 | } | 2298 | } |
| 2310 | DEVICE_ATTR(additional_device_support, S_IRUGO, add_dev_support_show, NULL); | 2299 | static DEVICE_ATTR(additional_device_support, S_IRUGO, add_dev_support_show, |
| 2300 | NULL); | ||
| 2311 | 2301 | ||
| 2312 | static ssize_t manufacturer_id_show(struct device *dev, | 2302 | static ssize_t manufacturer_id_show(struct device *dev, |
| 2313 | struct device_attribute *attr, | 2303 | struct device_attribute *attr, |
| @@ -2317,7 +2307,7 @@ static ssize_t manufacturer_id_show(struct device *dev, | |||
| 2317 | 2307 | ||
| 2318 | return snprintf(buf, 20, "0x%6.6x\n", bmc->id.manufacturer_id); | 2308 | return snprintf(buf, 20, "0x%6.6x\n", bmc->id.manufacturer_id); |
| 2319 | } | 2309 | } |
| 2320 | DEVICE_ATTR(manufacturer_id, S_IRUGO, manufacturer_id_show, NULL); | 2310 | static DEVICE_ATTR(manufacturer_id, S_IRUGO, manufacturer_id_show, NULL); |
| 2321 | 2311 | ||
| 2322 | static ssize_t product_id_show(struct device *dev, | 2312 | static ssize_t product_id_show(struct device *dev, |
| 2323 | struct device_attribute *attr, | 2313 | struct device_attribute *attr, |
| @@ -2327,7 +2317,7 @@ static ssize_t product_id_show(struct device *dev, | |||
| 2327 | 2317 | ||
| 2328 | return snprintf(buf, 10, "0x%4.4x\n", bmc->id.product_id); | 2318 | return snprintf(buf, 10, "0x%4.4x\n", bmc->id.product_id); |
| 2329 | } | 2319 | } |
| 2330 | DEVICE_ATTR(product_id, S_IRUGO, product_id_show, NULL); | 2320 | static DEVICE_ATTR(product_id, S_IRUGO, product_id_show, NULL); |
| 2331 | 2321 | ||
| 2332 | static ssize_t aux_firmware_rev_show(struct device *dev, | 2322 | static ssize_t aux_firmware_rev_show(struct device *dev, |
| 2333 | struct device_attribute *attr, | 2323 | struct device_attribute *attr, |
| @@ -2341,7 +2331,7 @@ static ssize_t aux_firmware_rev_show(struct device *dev, | |||
| 2341 | bmc->id.aux_firmware_revision[1], | 2331 | bmc->id.aux_firmware_revision[1], |
| 2342 | bmc->id.aux_firmware_revision[0]); | 2332 | bmc->id.aux_firmware_revision[0]); |
| 2343 | } | 2333 | } |
| 2344 | DEVICE_ATTR(aux_firmware_revision, S_IRUGO, aux_firmware_rev_show, NULL); | 2334 | static DEVICE_ATTR(aux_firmware_revision, S_IRUGO, aux_firmware_rev_show, NULL); |
| 2345 | 2335 | ||
| 2346 | static ssize_t guid_show(struct device *dev, struct device_attribute *attr, | 2336 | static ssize_t guid_show(struct device *dev, struct device_attribute *attr, |
| 2347 | char *buf) | 2337 | char *buf) |
| @@ -2352,7 +2342,7 @@ static ssize_t guid_show(struct device *dev, struct device_attribute *attr, | |||
| 2352 | (long long) bmc->guid[0], | 2342 | (long long) bmc->guid[0], |
| 2353 | (long long) bmc->guid[8]); | 2343 | (long long) bmc->guid[8]); |
| 2354 | } | 2344 | } |
| 2355 | DEVICE_ATTR(guid, S_IRUGO, guid_show, NULL); | 2345 | static DEVICE_ATTR(guid, S_IRUGO, guid_show, NULL); |
| 2356 | 2346 | ||
| 2357 | static struct attribute *bmc_dev_attrs[] = { | 2347 | static struct attribute *bmc_dev_attrs[] = { |
| 2358 | &dev_attr_device_id.attr, | 2348 | &dev_attr_device_id.attr, |
| @@ -2392,10 +2382,10 @@ cleanup_bmc_device(struct kref *ref) | |||
| 2392 | 2382 | ||
| 2393 | if (bmc->id.aux_firmware_revision_set) | 2383 | if (bmc->id.aux_firmware_revision_set) |
| 2394 | device_remove_file(&bmc->pdev.dev, | 2384 | device_remove_file(&bmc->pdev.dev, |
| 2395 | &bmc->aux_firmware_rev_attr); | 2385 | &dev_attr_aux_firmware_revision); |
| 2396 | if (bmc->guid_set) | 2386 | if (bmc->guid_set) |
| 2397 | device_remove_file(&bmc->pdev.dev, | 2387 | device_remove_file(&bmc->pdev.dev, |
| 2398 | &bmc->guid_attr); | 2388 | &dev_attr_guid); |
| 2399 | 2389 | ||
| 2400 | platform_device_unregister(&bmc->pdev); | 2390 | platform_device_unregister(&bmc->pdev); |
| 2401 | } | 2391 | } |
| @@ -2422,16 +2412,14 @@ static int create_bmc_files(struct bmc_device *bmc) | |||
| 2422 | int err; | 2412 | int err; |
| 2423 | 2413 | ||
| 2424 | if (bmc->id.aux_firmware_revision_set) { | 2414 | if (bmc->id.aux_firmware_revision_set) { |
| 2425 | bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision"; | ||
| 2426 | err = device_create_file(&bmc->pdev.dev, | 2415 | err = device_create_file(&bmc->pdev.dev, |
| 2427 | &bmc->aux_firmware_rev_attr); | 2416 | &dev_attr_aux_firmware_revision); |
| 2428 | if (err) | 2417 | if (err) |
| 2429 | goto out; | 2418 | goto out; |
| 2430 | } | 2419 | } |
| 2431 | if (bmc->guid_set) { | 2420 | if (bmc->guid_set) { |
| 2432 | bmc->guid_attr.attr.name = "guid"; | ||
| 2433 | err = device_create_file(&bmc->pdev.dev, | 2421 | err = device_create_file(&bmc->pdev.dev, |
| 2434 | &bmc->guid_attr); | 2422 | &dev_attr_guid); |
| 2435 | if (err) | 2423 | if (err) |
| 2436 | goto out_aux_firm; | 2424 | goto out_aux_firm; |
| 2437 | } | 2425 | } |
| @@ -2441,7 +2429,7 @@ static int create_bmc_files(struct bmc_device *bmc) | |||
| 2441 | out_aux_firm: | 2429 | out_aux_firm: |
| 2442 | if (bmc->id.aux_firmware_revision_set) | 2430 | if (bmc->id.aux_firmware_revision_set) |
| 2443 | device_remove_file(&bmc->pdev.dev, | 2431 | device_remove_file(&bmc->pdev.dev, |
| 2444 | &bmc->aux_firmware_rev_attr); | 2432 | &dev_attr_aux_firmware_revision); |
| 2445 | out: | 2433 | out: |
| 2446 | return err; | 2434 | return err; |
| 2447 | } | 2435 | } |
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index e178ac27e73c..fd5a5e85d7dc 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c | |||
| @@ -52,6 +52,7 @@ | |||
| 52 | #include <linux/dmi.h> | 52 | #include <linux/dmi.h> |
| 53 | #include <linux/kthread.h> | 53 | #include <linux/kthread.h> |
| 54 | #include <linux/acpi.h> | 54 | #include <linux/acpi.h> |
| 55 | #include <linux/ctype.h> | ||
| 55 | 56 | ||
| 56 | #define PFX "ipmi_ssif: " | 57 | #define PFX "ipmi_ssif: " |
| 57 | #define DEVICE_NAME "ipmi_ssif" | 58 | #define DEVICE_NAME "ipmi_ssif" |
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 8735543eacdb..493478989dbd 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c | |||
| @@ -1127,6 +1127,24 @@ static void schedule_external_copy(struct thin_c *tc, dm_block_t virt_block, | |||
| 1127 | schedule_zero(tc, virt_block, data_dest, cell, bio); | 1127 | schedule_zero(tc, virt_block, data_dest, cell, bio); |
| 1128 | } | 1128 | } |
| 1129 | 1129 | ||
| 1130 | static void set_pool_mode(struct pool *pool, enum pool_mode new_mode); | ||
| 1131 | |||
| 1132 | static void check_for_space(struct pool *pool) | ||
| 1133 | { | ||
| 1134 | int r; | ||
| 1135 | dm_block_t nr_free; | ||
| 1136 | |||
| 1137 | if (get_pool_mode(pool) != PM_OUT_OF_DATA_SPACE) | ||
| 1138 | return; | ||
| 1139 | |||
| 1140 | r = dm_pool_get_free_block_count(pool->pmd, &nr_free); | ||
| 1141 | if (r) | ||
| 1142 | return; | ||
| 1143 | |||
| 1144 | if (nr_free) | ||
| 1145 | set_pool_mode(pool, PM_WRITE); | ||
| 1146 | } | ||
| 1147 | |||
| 1130 | /* | 1148 | /* |
| 1131 | * A non-zero return indicates read_only or fail_io mode. | 1149 | * A non-zero return indicates read_only or fail_io mode. |
| 1132 | * Many callers don't care about the return value. | 1150 | * Many callers don't care about the return value. |
| @@ -1141,6 +1159,8 @@ static int commit(struct pool *pool) | |||
| 1141 | r = dm_pool_commit_metadata(pool->pmd); | 1159 | r = dm_pool_commit_metadata(pool->pmd); |
| 1142 | if (r) | 1160 | if (r) |
| 1143 | metadata_operation_failed(pool, "dm_pool_commit_metadata", r); | 1161 | metadata_operation_failed(pool, "dm_pool_commit_metadata", r); |
| 1162 | else | ||
| 1163 | check_for_space(pool); | ||
| 1144 | 1164 | ||
| 1145 | return r; | 1165 | return r; |
| 1146 | } | 1166 | } |
| @@ -1159,8 +1179,6 @@ static void check_low_water_mark(struct pool *pool, dm_block_t free_blocks) | |||
| 1159 | } | 1179 | } |
| 1160 | } | 1180 | } |
| 1161 | 1181 | ||
| 1162 | static void set_pool_mode(struct pool *pool, enum pool_mode new_mode); | ||
| 1163 | |||
| 1164 | static int alloc_data_block(struct thin_c *tc, dm_block_t *result) | 1182 | static int alloc_data_block(struct thin_c *tc, dm_block_t *result) |
| 1165 | { | 1183 | { |
| 1166 | int r; | 1184 | int r; |
| @@ -2155,7 +2173,7 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode) | |||
| 2155 | pool->process_cell = process_cell_read_only; | 2173 | pool->process_cell = process_cell_read_only; |
| 2156 | pool->process_discard_cell = process_discard_cell; | 2174 | pool->process_discard_cell = process_discard_cell; |
| 2157 | pool->process_prepared_mapping = process_prepared_mapping; | 2175 | pool->process_prepared_mapping = process_prepared_mapping; |
| 2158 | pool->process_prepared_discard = process_prepared_discard_passdown; | 2176 | pool->process_prepared_discard = process_prepared_discard; |
| 2159 | 2177 | ||
| 2160 | if (!pool->pf.error_if_no_space && no_space_timeout) | 2178 | if (!pool->pf.error_if_no_space && no_space_timeout) |
| 2161 | queue_delayed_work(pool->wq, &pool->no_space_timeout, no_space_timeout); | 2179 | queue_delayed_work(pool->wq, &pool->no_space_timeout, no_space_timeout); |
| @@ -3814,6 +3832,8 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
| 3814 | r = -EINVAL; | 3832 | r = -EINVAL; |
| 3815 | goto bad; | 3833 | goto bad; |
| 3816 | } | 3834 | } |
| 3835 | atomic_set(&tc->refcount, 1); | ||
| 3836 | init_completion(&tc->can_destroy); | ||
| 3817 | list_add_tail_rcu(&tc->list, &tc->pool->active_thins); | 3837 | list_add_tail_rcu(&tc->list, &tc->pool->active_thins); |
| 3818 | spin_unlock_irqrestore(&tc->pool->lock, flags); | 3838 | spin_unlock_irqrestore(&tc->pool->lock, flags); |
| 3819 | /* | 3839 | /* |
| @@ -3826,9 +3846,6 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
| 3826 | 3846 | ||
| 3827 | dm_put(pool_md); | 3847 | dm_put(pool_md); |
| 3828 | 3848 | ||
| 3829 | atomic_set(&tc->refcount, 1); | ||
| 3830 | init_completion(&tc->can_destroy); | ||
| 3831 | |||
| 3832 | return 0; | 3849 | return 0; |
| 3833 | 3850 | ||
| 3834 | bad: | 3851 | bad: |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 4c06585bf165..b98cd9d84435 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
| @@ -899,7 +899,7 @@ static void disable_write_same(struct mapped_device *md) | |||
| 899 | 899 | ||
| 900 | static void clone_endio(struct bio *bio, int error) | 900 | static void clone_endio(struct bio *bio, int error) |
| 901 | { | 901 | { |
| 902 | int r = 0; | 902 | int r = error; |
| 903 | struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone); | 903 | struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone); |
| 904 | struct dm_io *io = tio->io; | 904 | struct dm_io *io = tio->io; |
| 905 | struct mapped_device *md = tio->io->md; | 905 | struct mapped_device *md = tio->io->md; |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 0c04917c2f12..af84234e1f6e 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -47,6 +47,7 @@ struct sk_buff; | |||
| 47 | 47 | ||
| 48 | struct audit_krule { | 48 | struct audit_krule { |
| 49 | int vers_ops; | 49 | int vers_ops; |
| 50 | u32 pflags; | ||
| 50 | u32 flags; | 51 | u32 flags; |
| 51 | u32 listnr; | 52 | u32 listnr; |
| 52 | u32 action; | 53 | u32 action; |
| @@ -64,6 +65,9 @@ struct audit_krule { | |||
| 64 | u64 prio; | 65 | u64 prio; |
| 65 | }; | 66 | }; |
| 66 | 67 | ||
| 68 | /* Flag to indicate legacy AUDIT_LOGINUID unset usage */ | ||
| 69 | #define AUDIT_LOGINUID_LEGACY 0x1 | ||
| 70 | |||
| 67 | struct audit_field { | 71 | struct audit_field { |
| 68 | u32 type; | 72 | u32 type; |
| 69 | union { | 73 | union { |
diff --git a/kernel/audit.c b/kernel/audit.c index f8f203e8018c..231b7dcb154b 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -429,7 +429,7 @@ static void kauditd_send_skb(struct sk_buff *skb) | |||
| 429 | * This function doesn't consume an skb as might be expected since it has to | 429 | * This function doesn't consume an skb as might be expected since it has to |
| 430 | * copy it anyways. | 430 | * copy it anyways. |
| 431 | */ | 431 | */ |
| 432 | static void kauditd_send_multicast_skb(struct sk_buff *skb) | 432 | static void kauditd_send_multicast_skb(struct sk_buff *skb, gfp_t gfp_mask) |
| 433 | { | 433 | { |
| 434 | struct sk_buff *copy; | 434 | struct sk_buff *copy; |
| 435 | struct audit_net *aunet = net_generic(&init_net, audit_net_id); | 435 | struct audit_net *aunet = net_generic(&init_net, audit_net_id); |
| @@ -448,11 +448,11 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb) | |||
| 448 | * no reason for new multicast clients to continue with this | 448 | * no reason for new multicast clients to continue with this |
| 449 | * non-compliance. | 449 | * non-compliance. |
| 450 | */ | 450 | */ |
| 451 | copy = skb_copy(skb, GFP_KERNEL); | 451 | copy = skb_copy(skb, gfp_mask); |
| 452 | if (!copy) | 452 | if (!copy) |
| 453 | return; | 453 | return; |
| 454 | 454 | ||
| 455 | nlmsg_multicast(sock, copy, 0, AUDIT_NLGRP_READLOG, GFP_KERNEL); | 455 | nlmsg_multicast(sock, copy, 0, AUDIT_NLGRP_READLOG, gfp_mask); |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | /* | 458 | /* |
| @@ -1940,7 +1940,7 @@ void audit_log_end(struct audit_buffer *ab) | |||
| 1940 | struct nlmsghdr *nlh = nlmsg_hdr(ab->skb); | 1940 | struct nlmsghdr *nlh = nlmsg_hdr(ab->skb); |
| 1941 | 1941 | ||
| 1942 | nlh->nlmsg_len = ab->skb->len; | 1942 | nlh->nlmsg_len = ab->skb->len; |
| 1943 | kauditd_send_multicast_skb(ab->skb); | 1943 | kauditd_send_multicast_skb(ab->skb, ab->gfp_mask); |
| 1944 | 1944 | ||
| 1945 | /* | 1945 | /* |
| 1946 | * The original kaudit unicast socket sends up messages with | 1946 | * The original kaudit unicast socket sends up messages with |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 3598e13f2a65..4f68a326d92e 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
| @@ -442,19 +442,7 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, | |||
| 442 | if ((f->type == AUDIT_LOGINUID) && (f->val == AUDIT_UID_UNSET)) { | 442 | if ((f->type == AUDIT_LOGINUID) && (f->val == AUDIT_UID_UNSET)) { |
| 443 | f->type = AUDIT_LOGINUID_SET; | 443 | f->type = AUDIT_LOGINUID_SET; |
| 444 | f->val = 0; | 444 | f->val = 0; |
| 445 | } | 445 | entry->rule.pflags |= AUDIT_LOGINUID_LEGACY; |
| 446 | |||
| 447 | if ((f->type == AUDIT_PID) || (f->type == AUDIT_PPID)) { | ||
| 448 | struct pid *pid; | ||
| 449 | rcu_read_lock(); | ||
| 450 | pid = find_vpid(f->val); | ||
| 451 | if (!pid) { | ||
| 452 | rcu_read_unlock(); | ||
| 453 | err = -ESRCH; | ||
| 454 | goto exit_free; | ||
| 455 | } | ||
| 456 | f->val = pid_nr(pid); | ||
| 457 | rcu_read_unlock(); | ||
| 458 | } | 446 | } |
| 459 | 447 | ||
| 460 | err = audit_field_valid(entry, f); | 448 | err = audit_field_valid(entry, f); |
| @@ -630,6 +618,13 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule) | |||
| 630 | data->buflen += data->values[i] = | 618 | data->buflen += data->values[i] = |
| 631 | audit_pack_string(&bufp, krule->filterkey); | 619 | audit_pack_string(&bufp, krule->filterkey); |
| 632 | break; | 620 | break; |
| 621 | case AUDIT_LOGINUID_SET: | ||
| 622 | if (krule->pflags & AUDIT_LOGINUID_LEGACY && !f->val) { | ||
| 623 | data->fields[i] = AUDIT_LOGINUID; | ||
| 624 | data->values[i] = AUDIT_UID_UNSET; | ||
| 625 | break; | ||
| 626 | } | ||
| 627 | /* fallthrough if set */ | ||
| 633 | default: | 628 | default: |
| 634 | data->values[i] = f->val; | 629 | data->values[i] = f->val; |
| 635 | } | 630 | } |
| @@ -646,6 +641,7 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b) | |||
| 646 | int i; | 641 | int i; |
| 647 | 642 | ||
| 648 | if (a->flags != b->flags || | 643 | if (a->flags != b->flags || |
| 644 | a->pflags != b->pflags || | ||
| 649 | a->listnr != b->listnr || | 645 | a->listnr != b->listnr || |
| 650 | a->action != b->action || | 646 | a->action != b->action || |
| 651 | a->field_count != b->field_count) | 647 | a->field_count != b->field_count) |
| @@ -764,6 +760,7 @@ struct audit_entry *audit_dupe_rule(struct audit_krule *old) | |||
| 764 | new = &entry->rule; | 760 | new = &entry->rule; |
| 765 | new->vers_ops = old->vers_ops; | 761 | new->vers_ops = old->vers_ops; |
| 766 | new->flags = old->flags; | 762 | new->flags = old->flags; |
| 763 | new->pflags = old->pflags; | ||
| 767 | new->listnr = old->listnr; | 764 | new->listnr = old->listnr; |
| 768 | new->action = old->action; | 765 | new->action = old->action; |
| 769 | for (i = 0; i < AUDIT_BITMASK_SIZE; i++) | 766 | for (i = 0; i < AUDIT_BITMASK_SIZE; i++) |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index c75522a83678..37c69ab561da 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
| @@ -1877,12 +1877,18 @@ void __audit_inode(struct filename *name, const struct dentry *dentry, | |||
| 1877 | } | 1877 | } |
| 1878 | 1878 | ||
| 1879 | out_alloc: | 1879 | out_alloc: |
| 1880 | /* unable to find the name from a previous getname(). Allocate a new | 1880 | /* unable to find an entry with both a matching name and type */ |
| 1881 | * anonymous entry. | 1881 | n = audit_alloc_name(context, AUDIT_TYPE_UNKNOWN); |
| 1882 | */ | ||
| 1883 | n = audit_alloc_name(context, AUDIT_TYPE_NORMAL); | ||
| 1884 | if (!n) | 1882 | if (!n) |
| 1885 | return; | 1883 | return; |
| 1884 | if (name) | ||
| 1885 | /* since name is not NULL we know there is already a matching | ||
| 1886 | * name record, see audit_getname(), so there must be a type | ||
| 1887 | * mismatch; reuse the string path since the original name | ||
| 1888 | * record will keep the string valid until we free it in | ||
| 1889 | * audit_free_names() */ | ||
| 1890 | n->name = name; | ||
| 1891 | |||
| 1886 | out: | 1892 | out: |
| 1887 | if (parent) { | 1893 | if (parent) { |
| 1888 | n->name_len = n->name ? parent_len(n->name->name) : AUDIT_NAME_FULL; | 1894 | n->name_len = n->name ? parent_len(n->name->name) : AUDIT_NAME_FULL; |
diff --git a/mm/memory.c b/mm/memory.c index 649e7d440bd7..ca920d1fd314 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -2378,12 +2378,12 @@ void unmap_mapping_range(struct address_space *mapping, | |||
| 2378 | details.last_index = ULONG_MAX; | 2378 | details.last_index = ULONG_MAX; |
| 2379 | 2379 | ||
| 2380 | 2380 | ||
| 2381 | i_mmap_lock_read(mapping); | 2381 | i_mmap_lock_write(mapping); |
| 2382 | if (unlikely(!RB_EMPTY_ROOT(&mapping->i_mmap))) | 2382 | if (unlikely(!RB_EMPTY_ROOT(&mapping->i_mmap))) |
| 2383 | unmap_mapping_range_tree(&mapping->i_mmap, &details); | 2383 | unmap_mapping_range_tree(&mapping->i_mmap, &details); |
| 2384 | if (unlikely(!list_empty(&mapping->i_mmap_nonlinear))) | 2384 | if (unlikely(!list_empty(&mapping->i_mmap_nonlinear))) |
| 2385 | unmap_mapping_range_list(&mapping->i_mmap_nonlinear, &details); | 2385 | unmap_mapping_range_list(&mapping->i_mmap_nonlinear, &details); |
| 2386 | i_mmap_unlock_read(mapping); | 2386 | i_mmap_unlock_write(mapping); |
| 2387 | } | 2387 | } |
| 2388 | EXPORT_SYMBOL(unmap_mapping_range); | 2388 | EXPORT_SYMBOL(unmap_mapping_range); |
| 2389 | 2389 | ||
