Contents of /trunk/kernel-lts/patches-3.10/0100-3.10.1-all-fixes.patch
Parent Directory | Revision Log
Revision 2288 -
(show annotations)
(download)
Wed Sep 25 06:47:47 2013 UTC (11 years ago) by niro
Original Path: trunk/kernel-alx/patches-3.10/0100-3.10.1-all-fixes.patch
File size: 16388 byte(s)
Wed Sep 25 06:47:47 2013 UTC (11 years ago) by niro
Original Path: trunk/kernel-alx/patches-3.10/0100-3.10.1-all-fixes.patch
File size: 16388 byte(s)
-linux-3.10 patches
1 | diff --git a/MAINTAINERS b/MAINTAINERS |
2 | index ad7e322..48c7480 100644 |
3 | --- a/MAINTAINERS |
4 | +++ b/MAINTAINERS |
5 | @@ -7667,6 +7667,7 @@ STABLE BRANCH |
6 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
7 | L: stable@vger.kernel.org |
8 | S: Supported |
9 | +F: Documentation/stable_kernel_rules.txt |
10 | |
11 | STAGING SUBSYSTEM |
12 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
13 | diff --git a/Makefile b/Makefile |
14 | index e5e3ba0..b75cc30 100644 |
15 | --- a/Makefile |
16 | +++ b/Makefile |
17 | @@ -1,6 +1,6 @@ |
18 | VERSION = 3 |
19 | PATCHLEVEL = 10 |
20 | -SUBLEVEL = 0 |
21 | +SUBLEVEL = 1 |
22 | EXTRAVERSION = |
23 | NAME = Unicycling Gorilla |
24 | |
25 | diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c |
26 | index 260a919..5402c94 100644 |
27 | --- a/arch/x86/kvm/vmx.c |
28 | +++ b/arch/x86/kvm/vmx.c |
29 | @@ -3399,15 +3399,22 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu, |
30 | var->limit = vmx_read_guest_seg_limit(vmx, seg); |
31 | var->selector = vmx_read_guest_seg_selector(vmx, seg); |
32 | ar = vmx_read_guest_seg_ar(vmx, seg); |
33 | + var->unusable = (ar >> 16) & 1; |
34 | var->type = ar & 15; |
35 | var->s = (ar >> 4) & 1; |
36 | var->dpl = (ar >> 5) & 3; |
37 | - var->present = (ar >> 7) & 1; |
38 | + /* |
39 | + * Some userspaces do not preserve unusable property. Since usable |
40 | + * segment has to be present according to VMX spec we can use present |
41 | + * property to amend userspace bug by making unusable segment always |
42 | + * nonpresent. vmx_segment_access_rights() already marks nonpresent |
43 | + * segment as unusable. |
44 | + */ |
45 | + var->present = !var->unusable; |
46 | var->avl = (ar >> 12) & 1; |
47 | var->l = (ar >> 13) & 1; |
48 | var->db = (ar >> 14) & 1; |
49 | var->g = (ar >> 15) & 1; |
50 | - var->unusable = (ar >> 16) & 1; |
51 | } |
52 | |
53 | static u64 vmx_get_segment_base(struct kvm_vcpu *vcpu, int seg) |
54 | diff --git a/block/genhd.c b/block/genhd.c |
55 | index 20625ee..cdeb527 100644 |
56 | --- a/block/genhd.c |
57 | +++ b/block/genhd.c |
58 | @@ -512,7 +512,7 @@ static void register_disk(struct gendisk *disk) |
59 | |
60 | ddev->parent = disk->driverfs_dev; |
61 | |
62 | - dev_set_name(ddev, disk->disk_name); |
63 | + dev_set_name(ddev, "%s", disk->disk_name); |
64 | |
65 | /* delay uevents, until we scanned partition table */ |
66 | dev_set_uevent_suppress(ddev, 1); |
67 | diff --git a/crypto/algapi.c b/crypto/algapi.c |
68 | index 6149a6e..7a1ae87 100644 |
69 | --- a/crypto/algapi.c |
70 | +++ b/crypto/algapi.c |
71 | @@ -495,7 +495,8 @@ static struct crypto_template *__crypto_lookup_template(const char *name) |
72 | |
73 | struct crypto_template *crypto_lookup_template(const char *name) |
74 | { |
75 | - return try_then_request_module(__crypto_lookup_template(name), name); |
76 | + return try_then_request_module(__crypto_lookup_template(name), "%s", |
77 | + name); |
78 | } |
79 | EXPORT_SYMBOL_GPL(crypto_lookup_template); |
80 | |
81 | diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c |
82 | index 037288e..46b35f7 100644 |
83 | --- a/drivers/block/nbd.c |
84 | +++ b/drivers/block/nbd.c |
85 | @@ -714,7 +714,8 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, |
86 | else |
87 | blk_queue_flush(nbd->disk->queue, 0); |
88 | |
89 | - thread = kthread_create(nbd_thread, nbd, nbd->disk->disk_name); |
90 | + thread = kthread_create(nbd_thread, nbd, "%s", |
91 | + nbd->disk->disk_name); |
92 | if (IS_ERR(thread)) { |
93 | mutex_lock(&nbd->tx_lock); |
94 | return PTR_ERR(thread); |
95 | diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c |
96 | index d620b44..8a3aff7 100644 |
97 | --- a/drivers/cdrom/cdrom.c |
98 | +++ b/drivers/cdrom/cdrom.c |
99 | @@ -2882,7 +2882,7 @@ static noinline int mmc_ioctl_cdrom_read_data(struct cdrom_device_info *cdi, |
100 | if (lba < 0) |
101 | return -EINVAL; |
102 | |
103 | - cgc->buffer = kmalloc(blocksize, GFP_KERNEL); |
104 | + cgc->buffer = kzalloc(blocksize, GFP_KERNEL); |
105 | if (cgc->buffer == NULL) |
106 | return -ENOMEM; |
107 | |
108 | diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c |
109 | index fb65dec..591b6fb 100644 |
110 | --- a/drivers/cpufreq/cpufreq_stats.c |
111 | +++ b/drivers/cpufreq/cpufreq_stats.c |
112 | @@ -349,6 +349,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb, |
113 | |
114 | switch (action) { |
115 | case CPU_ONLINE: |
116 | + case CPU_ONLINE_FROZEN: |
117 | cpufreq_update_policy(cpu); |
118 | break; |
119 | case CPU_DOWN_PREPARE: |
120 | diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c |
121 | index fefc39f..98de1dd 100644 |
122 | --- a/drivers/power/charger-manager.c |
123 | +++ b/drivers/power/charger-manager.c |
124 | @@ -450,7 +450,7 @@ static void uevent_notify(struct charger_manager *cm, const char *event) |
125 | strncpy(env_str, event, UEVENT_BUF_SIZE); |
126 | kobject_uevent(&cm->dev->kobj, KOBJ_CHANGE); |
127 | |
128 | - dev_info(cm->dev, event); |
129 | + dev_info(cm->dev, "%s", event); |
130 | } |
131 | |
132 | /** |
133 | diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c |
134 | index 0fab6b5..9d86947 100644 |
135 | --- a/drivers/scsi/osd/osd_uld.c |
136 | +++ b/drivers/scsi/osd/osd_uld.c |
137 | @@ -485,7 +485,7 @@ static int osd_probe(struct device *dev) |
138 | oud->class_dev.class = &osd_uld_class; |
139 | oud->class_dev.parent = dev; |
140 | oud->class_dev.release = __remove; |
141 | - error = dev_set_name(&oud->class_dev, disk->disk_name); |
142 | + error = dev_set_name(&oud->class_dev, "%s", disk->disk_name); |
143 | if (error) { |
144 | OSD_ERR("dev_set_name failed => %d\n", error); |
145 | goto err_put_cdev; |
146 | diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c |
147 | index c1c5552..6f6a1b4 100644 |
148 | --- a/drivers/scsi/sd.c |
149 | +++ b/drivers/scsi/sd.c |
150 | @@ -142,7 +142,7 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr, |
151 | char *buffer_data; |
152 | struct scsi_mode_data data; |
153 | struct scsi_sense_hdr sshdr; |
154 | - const char *temp = "temporary "; |
155 | + static const char temp[] = "temporary "; |
156 | int len; |
157 | |
158 | if (sdp->type != TYPE_DISK) |
159 | diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c |
160 | index 26e3a97..c52948b 100644 |
161 | --- a/drivers/tty/serial/8250/8250_pci.c |
162 | +++ b/drivers/tty/serial/8250/8250_pci.c |
163 | @@ -4797,10 +4797,6 @@ static struct pci_device_id serial_pci_tbl[] = { |
164 | PCI_VENDOR_ID_IBM, 0x0299, |
165 | 0, 0, pbn_b0_bt_2_115200 }, |
166 | |
167 | - { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, |
168 | - 0x1000, 0x0012, |
169 | - 0, 0, pbn_b0_bt_2_115200 }, |
170 | - |
171 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9901, |
172 | 0xA000, 0x1000, |
173 | 0, 0, pbn_b0_1_115200 }, |
174 | diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c |
175 | index 6464029..4476682 100644 |
176 | --- a/drivers/tty/tty_io.c |
177 | +++ b/drivers/tty/tty_io.c |
178 | @@ -1618,6 +1618,8 @@ static void release_tty(struct tty_struct *tty, int idx) |
179 | tty_free_termios(tty); |
180 | tty_driver_remove_tty(tty->driver, tty); |
181 | tty->port->itty = NULL; |
182 | + if (tty->link) |
183 | + tty->link->port->itty = NULL; |
184 | cancel_work_sync(&tty->port->buf.work); |
185 | |
186 | if (tty->link) |
187 | diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c |
188 | index 9b6b2b6..be661d8 100644 |
189 | --- a/fs/ceph/xattr.c |
190 | +++ b/fs/ceph/xattr.c |
191 | @@ -675,17 +675,18 @@ ssize_t ceph_getxattr(struct dentry *dentry, const char *name, void *value, |
192 | if (!ceph_is_valid_xattr(name)) |
193 | return -ENODATA; |
194 | |
195 | - spin_lock(&ci->i_ceph_lock); |
196 | - dout("getxattr %p ver=%lld index_ver=%lld\n", inode, |
197 | - ci->i_xattrs.version, ci->i_xattrs.index_version); |
198 | |
199 | /* let's see if a virtual xattr was requested */ |
200 | vxattr = ceph_match_vxattr(inode, name); |
201 | if (vxattr && !(vxattr->exists_cb && !vxattr->exists_cb(ci))) { |
202 | err = vxattr->getxattr_cb(ci, value, size); |
203 | - goto out; |
204 | + return err; |
205 | } |
206 | |
207 | + spin_lock(&ci->i_ceph_lock); |
208 | + dout("getxattr %p ver=%lld index_ver=%lld\n", inode, |
209 | + ci->i_xattrs.version, ci->i_xattrs.index_version); |
210 | + |
211 | if (__ceph_caps_issued_mask(ci, CEPH_CAP_XATTR_SHARED, 1) && |
212 | (ci->i_xattrs.index_version >= ci->i_xattrs.version)) { |
213 | goto get_xattr; |
214 | diff --git a/fs/hpfs/map.c b/fs/hpfs/map.c |
215 | index 4acb19d..803d3da 100644 |
216 | --- a/fs/hpfs/map.c |
217 | +++ b/fs/hpfs/map.c |
218 | @@ -17,7 +17,8 @@ __le32 *hpfs_map_bitmap(struct super_block *s, unsigned bmp_block, |
219 | struct quad_buffer_head *qbh, char *id) |
220 | { |
221 | secno sec; |
222 | - if (hpfs_sb(s)->sb_chk) if (bmp_block * 16384 > hpfs_sb(s)->sb_fs_size) { |
223 | + unsigned n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14; |
224 | + if (hpfs_sb(s)->sb_chk) if (bmp_block >= n_bands) { |
225 | hpfs_error(s, "hpfs_map_bitmap called with bad parameter: %08x at %s", bmp_block, id); |
226 | return NULL; |
227 | } |
228 | diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c |
229 | index a0617e7..962e90c 100644 |
230 | --- a/fs/hpfs/super.c |
231 | +++ b/fs/hpfs/super.c |
232 | @@ -558,7 +558,13 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) |
233 | sbi->sb_cp_table = NULL; |
234 | sbi->sb_c_bitmap = -1; |
235 | sbi->sb_max_fwd_alloc = 0xffffff; |
236 | - |
237 | + |
238 | + if (sbi->sb_fs_size >= 0x80000000) { |
239 | + hpfs_error(s, "invalid size in superblock: %08x", |
240 | + (unsigned)sbi->sb_fs_size); |
241 | + goto bail4; |
242 | + } |
243 | + |
244 | /* Load bitmap directory */ |
245 | if (!(sbi->sb_bmp_dir = hpfs_load_bitmap_directory(s, le32_to_cpu(superblock->bitmaps)))) |
246 | goto bail4; |
247 | diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c |
248 | index 1fab140..2c37442 100644 |
249 | --- a/fs/nfs/nfs4state.c |
250 | +++ b/fs/nfs/nfs4state.c |
251 | @@ -228,19 +228,8 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp) |
252 | return status; |
253 | } |
254 | |
255 | -/* |
256 | - * Back channel returns NFS4ERR_DELAY for new requests when |
257 | - * NFS4_SESSION_DRAINING is set so there is no work to be done when draining |
258 | - * is ended. |
259 | - */ |
260 | -static void nfs4_end_drain_session(struct nfs_client *clp) |
261 | +static void nfs4_end_drain_slot_table(struct nfs4_slot_table *tbl) |
262 | { |
263 | - struct nfs4_session *ses = clp->cl_session; |
264 | - struct nfs4_slot_table *tbl; |
265 | - |
266 | - if (ses == NULL) |
267 | - return; |
268 | - tbl = &ses->fc_slot_table; |
269 | if (test_and_clear_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state)) { |
270 | spin_lock(&tbl->slot_tbl_lock); |
271 | nfs41_wake_slot_table(tbl); |
272 | @@ -248,6 +237,16 @@ static void nfs4_end_drain_session(struct nfs_client *clp) |
273 | } |
274 | } |
275 | |
276 | +static void nfs4_end_drain_session(struct nfs_client *clp) |
277 | +{ |
278 | + struct nfs4_session *ses = clp->cl_session; |
279 | + |
280 | + if (ses != NULL) { |
281 | + nfs4_end_drain_slot_table(&ses->bc_slot_table); |
282 | + nfs4_end_drain_slot_table(&ses->fc_slot_table); |
283 | + } |
284 | +} |
285 | + |
286 | /* |
287 | * Signal state manager thread if session fore channel is drained |
288 | */ |
289 | diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c |
290 | index 6cd86e0..582321a 100644 |
291 | --- a/fs/nfsd/nfs4xdr.c |
292 | +++ b/fs/nfsd/nfs4xdr.c |
293 | @@ -162,8 +162,8 @@ static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) |
294 | */ |
295 | memcpy(p, argp->p, avail); |
296 | /* step to next page */ |
297 | - argp->p = page_address(argp->pagelist[0]); |
298 | argp->pagelist++; |
299 | + argp->p = page_address(argp->pagelist[0]); |
300 | if (argp->pagelen < PAGE_SIZE) { |
301 | argp->end = argp->p + (argp->pagelen>>2); |
302 | argp->pagelen = 0; |
303 | diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h |
304 | index 379f715..0442c3d 100644 |
305 | --- a/include/linux/ceph/decode.h |
306 | +++ b/include/linux/ceph/decode.h |
307 | @@ -160,11 +160,6 @@ static inline void ceph_decode_timespec(struct timespec *ts, |
308 | static inline void ceph_encode_timespec(struct ceph_timespec *tv, |
309 | const struct timespec *ts) |
310 | { |
311 | - BUG_ON(ts->tv_sec < 0); |
312 | - BUG_ON(ts->tv_sec > (__kernel_time_t)U32_MAX); |
313 | - BUG_ON(ts->tv_nsec < 0); |
314 | - BUG_ON(ts->tv_nsec > (long)U32_MAX); |
315 | - |
316 | tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); |
317 | tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec); |
318 | } |
319 | diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h |
320 | index 6b4890f..feaf0c7 100644 |
321 | --- a/include/linux/hugetlb.h |
322 | +++ b/include/linux/hugetlb.h |
323 | @@ -358,6 +358,17 @@ static inline int hstate_index(struct hstate *h) |
324 | return h - hstates; |
325 | } |
326 | |
327 | +pgoff_t __basepage_index(struct page *page); |
328 | + |
329 | +/* Return page->index in PAGE_SIZE units */ |
330 | +static inline pgoff_t basepage_index(struct page *page) |
331 | +{ |
332 | + if (!PageCompound(page)) |
333 | + return page->index; |
334 | + |
335 | + return __basepage_index(page); |
336 | +} |
337 | + |
338 | #else /* CONFIG_HUGETLB_PAGE */ |
339 | struct hstate {}; |
340 | #define alloc_huge_page_node(h, nid) NULL |
341 | @@ -378,6 +389,11 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) |
342 | } |
343 | #define hstate_index_to_shift(index) 0 |
344 | #define hstate_index(h) 0 |
345 | + |
346 | +static inline pgoff_t basepage_index(struct page *page) |
347 | +{ |
348 | + return page->index; |
349 | +} |
350 | #endif /* CONFIG_HUGETLB_PAGE */ |
351 | |
352 | #endif /* _LINUX_HUGETLB_H */ |
353 | diff --git a/kernel/futex.c b/kernel/futex.c |
354 | index b26dcfc..49dacfb 100644 |
355 | --- a/kernel/futex.c |
356 | +++ b/kernel/futex.c |
357 | @@ -61,6 +61,7 @@ |
358 | #include <linux/nsproxy.h> |
359 | #include <linux/ptrace.h> |
360 | #include <linux/sched/rt.h> |
361 | +#include <linux/hugetlb.h> |
362 | |
363 | #include <asm/futex.h> |
364 | |
365 | @@ -365,7 +366,7 @@ again: |
366 | } else { |
367 | key->both.offset |= FUT_OFF_INODE; /* inode-based key */ |
368 | key->shared.inode = page_head->mapping->host; |
369 | - key->shared.pgoff = page_head->index; |
370 | + key->shared.pgoff = basepage_index(page); |
371 | } |
372 | |
373 | get_futex_key_refs(key); |
374 | diff --git a/kernel/module.c b/kernel/module.c |
375 | index cab4bce..fa53db8 100644 |
376 | --- a/kernel/module.c |
377 | +++ b/kernel/module.c |
378 | @@ -2927,7 +2927,6 @@ static struct module *layout_and_allocate(struct load_info *info, int flags) |
379 | { |
380 | /* Module within temporary copy. */ |
381 | struct module *mod; |
382 | - Elf_Shdr *pcpusec; |
383 | int err; |
384 | |
385 | mod = setup_load_info(info, flags); |
386 | @@ -2942,17 +2941,10 @@ static struct module *layout_and_allocate(struct load_info *info, int flags) |
387 | err = module_frob_arch_sections(info->hdr, info->sechdrs, |
388 | info->secstrings, mod); |
389 | if (err < 0) |
390 | - goto out; |
391 | + return ERR_PTR(err); |
392 | |
393 | - pcpusec = &info->sechdrs[info->index.pcpu]; |
394 | - if (pcpusec->sh_size) { |
395 | - /* We have a special allocation for this section. */ |
396 | - err = percpu_modalloc(mod, |
397 | - pcpusec->sh_size, pcpusec->sh_addralign); |
398 | - if (err) |
399 | - goto out; |
400 | - pcpusec->sh_flags &= ~(unsigned long)SHF_ALLOC; |
401 | - } |
402 | + /* We will do a special allocation for per-cpu sections later. */ |
403 | + info->sechdrs[info->index.pcpu].sh_flags &= ~(unsigned long)SHF_ALLOC; |
404 | |
405 | /* Determine total sizes, and put offsets in sh_entsize. For now |
406 | this is done generically; there doesn't appear to be any |
407 | @@ -2963,17 +2955,22 @@ static struct module *layout_and_allocate(struct load_info *info, int flags) |
408 | /* Allocate and move to the final place */ |
409 | err = move_module(mod, info); |
410 | if (err) |
411 | - goto free_percpu; |
412 | + return ERR_PTR(err); |
413 | |
414 | /* Module has been copied to its final place now: return it. */ |
415 | mod = (void *)info->sechdrs[info->index.mod].sh_addr; |
416 | kmemleak_load_module(mod, info); |
417 | return mod; |
418 | +} |
419 | |
420 | -free_percpu: |
421 | - percpu_modfree(mod); |
422 | -out: |
423 | - return ERR_PTR(err); |
424 | +static int alloc_module_percpu(struct module *mod, struct load_info *info) |
425 | +{ |
426 | + Elf_Shdr *pcpusec = &info->sechdrs[info->index.pcpu]; |
427 | + if (!pcpusec->sh_size) |
428 | + return 0; |
429 | + |
430 | + /* We have a special allocation for this section. */ |
431 | + return percpu_modalloc(mod, pcpusec->sh_size, pcpusec->sh_addralign); |
432 | } |
433 | |
434 | /* mod is no longer valid after this! */ |
435 | @@ -3237,6 +3234,11 @@ static int load_module(struct load_info *info, const char __user *uargs, |
436 | } |
437 | #endif |
438 | |
439 | + /* To avoid stressing percpu allocator, do this once we're unique. */ |
440 | + err = alloc_module_percpu(mod, info); |
441 | + if (err) |
442 | + goto unlink_mod; |
443 | + |
444 | /* Now module is in final location, initialize linked lists, etc. */ |
445 | err = module_unload_init(mod); |
446 | if (err) |
447 | diff --git a/mm/hugetlb.c b/mm/hugetlb.c |
448 | index e2bfbf7..5cf99bf 100644 |
449 | --- a/mm/hugetlb.c |
450 | +++ b/mm/hugetlb.c |
451 | @@ -690,6 +690,23 @@ int PageHuge(struct page *page) |
452 | } |
453 | EXPORT_SYMBOL_GPL(PageHuge); |
454 | |
455 | +pgoff_t __basepage_index(struct page *page) |
456 | +{ |
457 | + struct page *page_head = compound_head(page); |
458 | + pgoff_t index = page_index(page_head); |
459 | + unsigned long compound_idx; |
460 | + |
461 | + if (!PageHuge(page_head)) |
462 | + return page_index(page); |
463 | + |
464 | + if (compound_order(page_head) >= MAX_ORDER) |
465 | + compound_idx = page_to_pfn(page) - page_to_pfn(page_head); |
466 | + else |
467 | + compound_idx = page - page_head; |
468 | + |
469 | + return (index << compound_order(page_head)) + compound_idx; |
470 | +} |
471 | + |
472 | static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid) |
473 | { |
474 | struct page *page; |
475 | diff --git a/mm/memcontrol.c b/mm/memcontrol.c |
476 | index 1947218..fd79df5 100644 |
477 | --- a/mm/memcontrol.c |
478 | +++ b/mm/memcontrol.c |
479 | @@ -6303,8 +6303,6 @@ mem_cgroup_css_online(struct cgroup *cont) |
480 | * call __mem_cgroup_free, so return directly |
481 | */ |
482 | mem_cgroup_put(memcg); |
483 | - if (parent->use_hierarchy) |
484 | - mem_cgroup_put(parent); |
485 | } |
486 | return error; |
487 | } |
488 | diff --git a/net/ceph/auth_none.c b/net/ceph/auth_none.c |
489 | index 925ca58..8c93fa8 100644 |
490 | --- a/net/ceph/auth_none.c |
491 | +++ b/net/ceph/auth_none.c |
492 | @@ -39,6 +39,11 @@ static int should_authenticate(struct ceph_auth_client *ac) |
493 | return xi->starting; |
494 | } |
495 | |
496 | +static int build_request(struct ceph_auth_client *ac, void *buf, void *end) |
497 | +{ |
498 | + return 0; |
499 | +} |
500 | + |
501 | /* |
502 | * the generic auth code decode the global_id, and we carry no actual |
503 | * authenticate state, so nothing happens here. |
504 | @@ -106,6 +111,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = { |
505 | .destroy = destroy, |
506 | .is_authenticated = is_authenticated, |
507 | .should_authenticate = should_authenticate, |
508 | + .build_request = build_request, |
509 | .handle_reply = handle_reply, |
510 | .create_authorizer = ceph_auth_none_create_authorizer, |
511 | .destroy_authorizer = ceph_auth_none_destroy_authorizer, |