diff options
-rw-r--r-- | arch/x86/.gitignore | 1 | ||||
-rw-r--r-- | arch/x86/lib/x86-opcode-map.txt | 4 | ||||
-rw-r--r-- | drivers/gpio/Kconfig | 1 | ||||
-rw-r--r-- | drivers/gpio/gpio-ml-ioh.c | 8 | ||||
-rw-r--r-- | drivers/gpio/gpio-pch.c | 4 | ||||
-rw-r--r-- | drivers/gpio/gpio-tps65910.c | 2 | ||||
-rw-r--r-- | fs/inode.c | 3 | ||||
-rw-r--r-- | fs/proc/stat.c | 2 | ||||
-rw-r--r-- | fs/qnx4/inode.c | 62 | ||||
-rw-r--r-- | fs/super.c | 2 | ||||
-rw-r--r-- | include/linux/key.h | 2 | ||||
-rw-r--r-- | kernel/tracepoint.c | 7 | ||||
-rw-r--r-- | lib/mpi/mpicoder.c | 2 | ||||
-rw-r--r-- | security/integrity/ima/ima_policy.c | 3 | ||||
-rw-r--r-- | security/keys/user_defined.c | 6 |
15 files changed, 53 insertions, 56 deletions
diff --git a/arch/x86/.gitignore b/arch/x86/.gitignore index 028079065af6..7cab8c08e6d1 100644 --- a/arch/x86/.gitignore +++ b/arch/x86/.gitignore | |||
@@ -1,3 +1,4 @@ | |||
1 | boot/compressed/vmlinux | 1 | boot/compressed/vmlinux |
2 | tools/test_get_len | 2 | tools/test_get_len |
3 | tools/insn_sanity | ||
3 | 4 | ||
diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt index 4c8010d4f5e6..819137904428 100644 --- a/arch/x86/lib/x86-opcode-map.txt +++ b/arch/x86/lib/x86-opcode-map.txt | |||
@@ -219,7 +219,9 @@ ab: STOS/W/D/Q Yv,rAX | |||
219 | ac: LODS/B AL,Xb | 219 | ac: LODS/B AL,Xb |
220 | ad: LODS/W/D/Q rAX,Xv | 220 | ad: LODS/W/D/Q rAX,Xv |
221 | ae: SCAS/B AL,Yb | 221 | ae: SCAS/B AL,Yb |
222 | af: SCAS/W/D/Q rAX,Xv | 222 | # Note: The May 2011 Intel manual shows Xv for the second parameter of the |
223 | # next instruction but Yv is correct | ||
224 | af: SCAS/W/D/Q rAX,Yv | ||
223 | # 0xb0 - 0xbf | 225 | # 0xb0 - 0xbf |
224 | b0: MOV AL/R8L,Ib | 226 | b0: MOV AL/R8L,Ib |
225 | b1: MOV CL/R9L,Ib | 227 | b1: MOV CL/R9L,Ib |
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 37c4bd1cacd5..d0c41188d4e5 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
@@ -87,6 +87,7 @@ config GPIO_GENERIC_PLATFORM | |||
87 | 87 | ||
88 | config GPIO_IT8761E | 88 | config GPIO_IT8761E |
89 | tristate "IT8761E GPIO support" | 89 | tristate "IT8761E GPIO support" |
90 | depends on X86 # unconditional access to IO space. | ||
90 | help | 91 | help |
91 | Say yes here to support GPIO functionality of IT8761E super I/O chip. | 92 | Say yes here to support GPIO functionality of IT8761E super I/O chip. |
92 | 93 | ||
diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c index 461958fc2264..03d6dd5dcb77 100644 --- a/drivers/gpio/gpio-ml-ioh.c +++ b/drivers/gpio/gpio-ml-ioh.c | |||
@@ -248,7 +248,7 @@ static void ioh_gpio_setup(struct ioh_gpio *chip, int num_port) | |||
248 | static int ioh_irq_type(struct irq_data *d, unsigned int type) | 248 | static int ioh_irq_type(struct irq_data *d, unsigned int type) |
249 | { | 249 | { |
250 | u32 im; | 250 | u32 im; |
251 | u32 *im_reg; | 251 | void __iomem *im_reg; |
252 | u32 ien; | 252 | u32 ien; |
253 | u32 im_pos; | 253 | u32 im_pos; |
254 | int ch; | 254 | int ch; |
@@ -412,7 +412,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev, | |||
412 | int i, j; | 412 | int i, j; |
413 | struct ioh_gpio *chip; | 413 | struct ioh_gpio *chip; |
414 | void __iomem *base; | 414 | void __iomem *base; |
415 | void __iomem *chip_save; | 415 | void *chip_save; |
416 | int irq_base; | 416 | int irq_base; |
417 | 417 | ||
418 | ret = pci_enable_device(pdev); | 418 | ret = pci_enable_device(pdev); |
@@ -428,7 +428,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev, | |||
428 | } | 428 | } |
429 | 429 | ||
430 | base = pci_iomap(pdev, 1, 0); | 430 | base = pci_iomap(pdev, 1, 0); |
431 | if (base == 0) { | 431 | if (!base) { |
432 | dev_err(&pdev->dev, "%s : pci_iomap failed", __func__); | 432 | dev_err(&pdev->dev, "%s : pci_iomap failed", __func__); |
433 | ret = -ENOMEM; | 433 | ret = -ENOMEM; |
434 | goto err_iomap; | 434 | goto err_iomap; |
@@ -521,7 +521,7 @@ static void __devexit ioh_gpio_remove(struct pci_dev *pdev) | |||
521 | int err; | 521 | int err; |
522 | int i; | 522 | int i; |
523 | struct ioh_gpio *chip = pci_get_drvdata(pdev); | 523 | struct ioh_gpio *chip = pci_get_drvdata(pdev); |
524 | void __iomem *chip_save; | 524 | void *chip_save; |
525 | 525 | ||
526 | chip_save = chip; | 526 | chip_save = chip; |
527 | 527 | ||
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c index f0603297f829..68fa55e86eb1 100644 --- a/drivers/gpio/gpio-pch.c +++ b/drivers/gpio/gpio-pch.c | |||
@@ -231,7 +231,7 @@ static void pch_gpio_setup(struct pch_gpio *chip) | |||
231 | static int pch_irq_type(struct irq_data *d, unsigned int type) | 231 | static int pch_irq_type(struct irq_data *d, unsigned int type) |
232 | { | 232 | { |
233 | u32 im; | 233 | u32 im; |
234 | u32 *im_reg; | 234 | u32 __iomem *im_reg; |
235 | u32 ien; | 235 | u32 ien; |
236 | u32 im_pos; | 236 | u32 im_pos; |
237 | int ch; | 237 | int ch; |
@@ -376,7 +376,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev, | |||
376 | } | 376 | } |
377 | 377 | ||
378 | chip->base = pci_iomap(pdev, 1, 0); | 378 | chip->base = pci_iomap(pdev, 1, 0); |
379 | if (chip->base == 0) { | 379 | if (!chip->base) { |
380 | dev_err(&pdev->dev, "%s : pci_iomap FAILED", __func__); | 380 | dev_err(&pdev->dev, "%s : pci_iomap FAILED", __func__); |
381 | ret = -ENOMEM; | 381 | ret = -ENOMEM; |
382 | goto err_iomap; | 382 | goto err_iomap; |
diff --git a/drivers/gpio/gpio-tps65910.c b/drivers/gpio/gpio-tps65910.c index b9c1c297669e..91f45b965d1e 100644 --- a/drivers/gpio/gpio-tps65910.c +++ b/drivers/gpio/gpio-tps65910.c | |||
@@ -52,7 +52,7 @@ static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset, | |||
52 | struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio); | 52 | struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio); |
53 | 53 | ||
54 | /* Set the initial value */ | 54 | /* Set the initial value */ |
55 | tps65910_gpio_set(gc, 0, value); | 55 | tps65910_gpio_set(gc, offset, value); |
56 | 56 | ||
57 | return tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset, | 57 | return tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset, |
58 | GPIO_CFG_MASK); | 58 | GPIO_CFG_MASK); |
diff --git a/fs/inode.c b/fs/inode.c index 4fa4f0916af9..fb10d86ffad7 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -322,9 +322,6 @@ EXPORT_SYMBOL(clear_nlink); | |||
322 | void set_nlink(struct inode *inode, unsigned int nlink) | 322 | void set_nlink(struct inode *inode, unsigned int nlink) |
323 | { | 323 | { |
324 | if (!nlink) { | 324 | if (!nlink) { |
325 | printk_ratelimited(KERN_INFO | ||
326 | "set_nlink() clearing i_nlink on %s inode %li\n", | ||
327 | inode->i_sb->s_type->name, inode->i_ino); | ||
328 | clear_nlink(inode); | 325 | clear_nlink(inode); |
329 | } else { | 326 | } else { |
330 | /* Yes, some filesystems do change nlink from zero to one */ | 327 | /* Yes, some filesystems do change nlink from zero to one */ |
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index d76ca6ae2b1b..121f77cfef76 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c | |||
@@ -77,6 +77,8 @@ static int show_stat(struct seq_file *p, void *v) | |||
77 | steal += kcpustat_cpu(i).cpustat[CPUTIME_STEAL]; | 77 | steal += kcpustat_cpu(i).cpustat[CPUTIME_STEAL]; |
78 | guest += kcpustat_cpu(i).cpustat[CPUTIME_GUEST]; | 78 | guest += kcpustat_cpu(i).cpustat[CPUTIME_GUEST]; |
79 | guest_nice += kcpustat_cpu(i).cpustat[CPUTIME_GUEST_NICE]; | 79 | guest_nice += kcpustat_cpu(i).cpustat[CPUTIME_GUEST_NICE]; |
80 | sum += kstat_cpu_irqs_sum(i); | ||
81 | sum += arch_irq_stat_cpu(i); | ||
80 | 82 | ||
81 | for (j = 0; j < NR_SOFTIRQS; j++) { | 83 | for (j = 0; j < NR_SOFTIRQS; j++) { |
82 | unsigned int softirq_stat = kstat_softirqs_cpu(j, i); | 84 | unsigned int softirq_stat = kstat_softirqs_cpu(j, i); |
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 2bfd987f4853..6b009548d2e0 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -179,47 +179,33 @@ static const char *qnx4_checkroot(struct super_block *sb) | |||
179 | struct qnx4_inode_entry *rootdir; | 179 | struct qnx4_inode_entry *rootdir; |
180 | int rd, rl; | 180 | int rd, rl; |
181 | int i, j; | 181 | int i, j; |
182 | int found = 0; | ||
183 | 182 | ||
184 | if (*(qnx4_sb(sb)->sb->RootDir.di_fname) != '/') { | 183 | if (*(qnx4_sb(sb)->sb->RootDir.di_fname) != '/') |
185 | return "no qnx4 filesystem (no root dir)."; | 184 | return "no qnx4 filesystem (no root dir)."; |
186 | } else { | 185 | QNX4DEBUG((KERN_NOTICE "QNX4 filesystem found on dev %s.\n", sb->s_id)); |
187 | QNX4DEBUG((KERN_NOTICE "QNX4 filesystem found on dev %s.\n", sb->s_id)); | 186 | rd = le32_to_cpu(qnx4_sb(sb)->sb->RootDir.di_first_xtnt.xtnt_blk) - 1; |
188 | rd = le32_to_cpu(qnx4_sb(sb)->sb->RootDir.di_first_xtnt.xtnt_blk) - 1; | 187 | rl = le32_to_cpu(qnx4_sb(sb)->sb->RootDir.di_first_xtnt.xtnt_size); |
189 | rl = le32_to_cpu(qnx4_sb(sb)->sb->RootDir.di_first_xtnt.xtnt_size); | 188 | for (j = 0; j < rl; j++) { |
190 | for (j = 0; j < rl; j++) { | 189 | bh = sb_bread(sb, rd + j); /* root dir, first block */ |
191 | bh = sb_bread(sb, rd + j); /* root dir, first block */ | 190 | if (bh == NULL) |
192 | if (bh == NULL) { | 191 | return "unable to read root entry."; |
193 | return "unable to read root entry."; | 192 | rootdir = (struct qnx4_inode_entry *) bh->b_data; |
194 | } | 193 | for (i = 0; i < QNX4_INODES_PER_BLOCK; i++, rootdir++) { |
195 | for (i = 0; i < QNX4_INODES_PER_BLOCK; i++) { | 194 | QNX4DEBUG((KERN_INFO "rootdir entry found : [%s]\n", rootdir->di_fname)); |
196 | rootdir = (struct qnx4_inode_entry *) (bh->b_data + i * QNX4_DIR_ENTRY_SIZE); | 195 | if (strcmp(rootdir->di_fname, QNX4_BMNAME) != 0) |
197 | if (rootdir->di_fname != NULL) { | 196 | continue; |
198 | QNX4DEBUG((KERN_INFO "rootdir entry found : [%s]\n", rootdir->di_fname)); | 197 | qnx4_sb(sb)->BitMap = kmemdup(rootdir, |
199 | if (!strcmp(rootdir->di_fname, | 198 | sizeof(struct qnx4_inode_entry), |
200 | QNX4_BMNAME)) { | 199 | GFP_KERNEL); |
201 | found = 1; | ||
202 | qnx4_sb(sb)->BitMap = kmemdup(rootdir, | ||
203 | sizeof(struct qnx4_inode_entry), | ||
204 | GFP_KERNEL); | ||
205 | if (!qnx4_sb(sb)->BitMap) { | ||
206 | brelse (bh); | ||
207 | return "not enough memory for bitmap inode"; | ||
208 | }/* keep bitmap inode known */ | ||
209 | break; | ||
210 | } | ||
211 | } | ||
212 | } | ||
213 | brelse(bh); | 200 | brelse(bh); |
214 | if (found != 0) { | 201 | if (!qnx4_sb(sb)->BitMap) |
215 | break; | 202 | return "not enough memory for bitmap inode"; |
216 | } | 203 | /* keep bitmap inode known */ |
217 | } | 204 | return NULL; |
218 | if (found == 0) { | ||
219 | return "bitmap file not found."; | ||
220 | } | 205 | } |
206 | brelse(bh); | ||
221 | } | 207 | } |
222 | return NULL; | 208 | return "bitmap file not found."; |
223 | } | 209 | } |
224 | 210 | ||
225 | static int qnx4_fill_super(struct super_block *s, void *data, int silent) | 211 | static int qnx4_fill_super(struct super_block *s, void *data, int silent) |
@@ -270,7 +256,7 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent) | |||
270 | if (IS_ERR(root)) { | 256 | if (IS_ERR(root)) { |
271 | printk(KERN_ERR "qnx4: get inode failed\n"); | 257 | printk(KERN_ERR "qnx4: get inode failed\n"); |
272 | ret = PTR_ERR(root); | 258 | ret = PTR_ERR(root); |
273 | goto out; | 259 | goto outb; |
274 | } | 260 | } |
275 | 261 | ||
276 | ret = -ENOMEM; | 262 | ret = -ENOMEM; |
@@ -283,6 +269,8 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent) | |||
283 | 269 | ||
284 | outi: | 270 | outi: |
285 | iput(root); | 271 | iput(root); |
272 | outb: | ||
273 | kfree(qs->BitMap); | ||
286 | out: | 274 | out: |
287 | brelse(bh); | 275 | brelse(bh); |
288 | outnobh: | 276 | outnobh: |
diff --git a/fs/super.c b/fs/super.c index de41e1e46f09..6015c02296b7 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -1186,6 +1186,8 @@ int freeze_super(struct super_block *sb) | |||
1186 | printk(KERN_ERR | 1186 | printk(KERN_ERR |
1187 | "VFS:Filesystem freeze failed\n"); | 1187 | "VFS:Filesystem freeze failed\n"); |
1188 | sb->s_frozen = SB_UNFROZEN; | 1188 | sb->s_frozen = SB_UNFROZEN; |
1189 | smp_wmb(); | ||
1190 | wake_up(&sb->s_wait_unfrozen); | ||
1189 | deactivate_locked_super(sb); | 1191 | deactivate_locked_super(sb); |
1190 | return ret; | 1192 | return ret; |
1191 | } | 1193 | } |
diff --git a/include/linux/key.h b/include/linux/key.h index bfc014c57351..5253471cd2ea 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -271,7 +271,7 @@ extern int keyring_add_key(struct key *keyring, | |||
271 | 271 | ||
272 | extern struct key *key_lookup(key_serial_t id); | 272 | extern struct key *key_lookup(key_serial_t id); |
273 | 273 | ||
274 | static inline key_serial_t key_serial(struct key *key) | 274 | static inline key_serial_t key_serial(const struct key *key) |
275 | { | 275 | { |
276 | return key ? key->serial : 0; | 276 | return key ? key->serial : 0; |
277 | } | 277 | } |
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index db110b8ae030..f1539decd99d 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c | |||
@@ -634,10 +634,11 @@ static int tracepoint_module_coming(struct module *mod) | |||
634 | int ret = 0; | 634 | int ret = 0; |
635 | 635 | ||
636 | /* | 636 | /* |
637 | * We skip modules that tain the kernel, especially those with different | 637 | * We skip modules that taint the kernel, especially those with different |
638 | * module header (for forced load), to make sure we don't cause a crash. | 638 | * module headers (for forced load), to make sure we don't cause a crash. |
639 | * Staging and out-of-tree GPL modules are fine. | ||
639 | */ | 640 | */ |
640 | if (mod->taints) | 641 | if (mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP))) |
641 | return 0; | 642 | return 0; |
642 | mutex_lock(&tracepoints_mutex); | 643 | mutex_lock(&tracepoints_mutex); |
643 | tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL); | 644 | tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL); |
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index fe84bb978e3b..716802b774ea 100644 --- a/lib/mpi/mpicoder.c +++ b/lib/mpi/mpicoder.c | |||
@@ -255,6 +255,8 @@ void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign) | |||
255 | if (!n) | 255 | if (!n) |
256 | n++; /* avoid zero length allocation */ | 256 | n++; /* avoid zero length allocation */ |
257 | p = buffer = kmalloc(n, GFP_KERNEL); | 257 | p = buffer = kmalloc(n, GFP_KERNEL); |
258 | if (!p) | ||
259 | return NULL; | ||
258 | 260 | ||
259 | for (i = a->nlimbs - 1; i >= 0; i--) { | 261 | for (i = a->nlimbs - 1; i >= 0; i--) { |
260 | alimb = a->d[i]; | 262 | alimb = a->d[i]; |
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index d661afbe474c..d45061d02fee 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c | |||
@@ -99,6 +99,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule, | |||
99 | struct inode *inode, enum ima_hooks func, int mask) | 99 | struct inode *inode, enum ima_hooks func, int mask) |
100 | { | 100 | { |
101 | struct task_struct *tsk = current; | 101 | struct task_struct *tsk = current; |
102 | const struct cred *cred = current_cred(); | ||
102 | int i; | 103 | int i; |
103 | 104 | ||
104 | if ((rule->flags & IMA_FUNC) && rule->func != func) | 105 | if ((rule->flags & IMA_FUNC) && rule->func != func) |
@@ -108,7 +109,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule, | |||
108 | if ((rule->flags & IMA_FSMAGIC) | 109 | if ((rule->flags & IMA_FSMAGIC) |
109 | && rule->fsmagic != inode->i_sb->s_magic) | 110 | && rule->fsmagic != inode->i_sb->s_magic) |
110 | return false; | 111 | return false; |
111 | if ((rule->flags & IMA_UID) && rule->uid != tsk->cred->uid) | 112 | if ((rule->flags & IMA_UID) && rule->uid != cred->uid) |
112 | return false; | 113 | return false; |
113 | for (i = 0; i < MAX_LSM_RULES; i++) { | 114 | for (i = 0; i < MAX_LSM_RULES; i++) { |
114 | int rc = 0; | 115 | int rc = 0; |
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c index 69ff52c08e97..2aee3c5a3b99 100644 --- a/security/keys/user_defined.c +++ b/security/keys/user_defined.c | |||
@@ -59,7 +59,7 @@ int user_instantiate(struct key *key, const void *data, size_t datalen) | |||
59 | /* attach the data */ | 59 | /* attach the data */ |
60 | upayload->datalen = datalen; | 60 | upayload->datalen = datalen; |
61 | memcpy(upayload->data, data, datalen); | 61 | memcpy(upayload->data, data, datalen); |
62 | rcu_assign_pointer(key->payload.data, upayload); | 62 | rcu_assign_keypointer(key, upayload); |
63 | ret = 0; | 63 | ret = 0; |
64 | 64 | ||
65 | error: | 65 | error: |
@@ -98,7 +98,7 @@ int user_update(struct key *key, const void *data, size_t datalen) | |||
98 | if (ret == 0) { | 98 | if (ret == 0) { |
99 | /* attach the new data, displacing the old */ | 99 | /* attach the new data, displacing the old */ |
100 | zap = key->payload.data; | 100 | zap = key->payload.data; |
101 | rcu_assign_pointer(key->payload.data, upayload); | 101 | rcu_assign_keypointer(key, upayload); |
102 | key->expiry = 0; | 102 | key->expiry = 0; |
103 | } | 103 | } |
104 | 104 | ||
@@ -133,7 +133,7 @@ void user_revoke(struct key *key) | |||
133 | key_payload_reserve(key, 0); | 133 | key_payload_reserve(key, 0); |
134 | 134 | ||
135 | if (upayload) { | 135 | if (upayload) { |
136 | rcu_assign_pointer(key->payload.data, NULL); | 136 | rcu_assign_keypointer(key, NULL); |
137 | kfree_rcu(upayload, rcu); | 137 | kfree_rcu(upayload, rcu); |
138 | } | 138 | } |
139 | } | 139 | } |