- 12 Nov, 2009 1 commit
-
-
Thadeu Lima de Souza Cascardo authored
the same name, for example), the current implementation does not clear the bit for the allocated minor and that number is lost for future allocations. Second, the test currently in misc_deregister is broken, since it does not test for the 0 minor. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 09 Oct, 2009 1 commit
-
-
Andrew Morton authored
/usr/src/devel/arch/x86/Makefile:82: stack protector enabled but no compiler support In file included from crypto/api.c:18: include/linux/err.h: In function 'IS_ERR_OR_NULL': include/linux/err.h:39: error: 'NULL' undeclared (first use in this function) include/linux/err.h:39: error: (Each undeclared identifier is reported only once include/linux/err.h:39: error: for each function it appears in.) Cc: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 29 Sep, 2009 1 commit
-
-
Phil Carmody authored
against NULL and against the errno range, handling both cases identically. This additional helper function would simplify such code. Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 10 Nov, 2009 6 commits
-
-
Alexey Dobriyan authored
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Andrew Morton authored
Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Joe Perches <joe@perches.com> Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Andrew Morton authored
#42: FILE: include/linux/kernel.h:427: + printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)$ ERROR: code indent should use tabs where possible #44: FILE: include/linux/kernel.h:429: + printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)$ ERROR: code indent should use tabs where possible #46: FILE: include/linux/kernel.h:431: + printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)$ ERROR: code indent should use tabs where possible #48: FILE: include/linux/kernel.h:433: + printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)$ ERROR: code indent should use tabs where possible #50: FILE: include/linux/kernel.h:435: + printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)$ ERROR: code indent should use tabs where possible #52: FILE: include/linux/kernel.h:437: + printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)$ ERROR: code indent should use tabs where possible #54: FILE: include/linux/kernel.h:439: + printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)$ total: 7 errors, 0 warnings, 50 lines checked ./patches/kernelh-add-printk_ratelimited-and-pr_level_rl.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Joe Perches <joe@perches.com> Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Joe Perches authored
ratelimit_state so that multiple subsystems output messages are not suppressed by a global __ratelimit state. Signed-off-by: Joe Perches <joe@perches.com> Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Helge Deller authored
allow to switch processes at runtime from big-endian to little-endian mode (and vice versa) on PowerPC processors. Since the other architectures don't support this feature, they currently will just fail and return -EINVAL. This patch adds just minimal overhead and implements the PR_GET_ENDIAN call for all other architectures by returning the native endianess of the architecture. Furthermore, calling prctl(PR_SET_ENDIAN) with the native endianess of the architecture will succeed, while trying to set another (not-supported) endianess, will fail. The patch can be tested with the following program: #include <stdio.h> #include <linux/prctl.h> int main(int argc, char **argv) { int endian, ret; ret = prctl(PR_GET_ENDIAN, &endian); if (ret) perror("prctl(PR_GET_ENDIAN) not implemented"); printf("current process/machine is running in %s endian mode (%d)\n", endian == PR_ENDIAN_LITTLE ? "little":"big", endian); /* setting native endianess should succeed */ ret = prctl(PR_SET_ENDIAN, endian); printf("prctl(PR_SET_ENDIAN,%d) should succeed: %s\n", endian, ret == 0 ? "OK":"FAIL"); /* setting foreign endianess should fail */ endian = (endian == PR_ENDIAN_LITTLE) ? PR_ENDIAN_BIG : PR_ENDIAN_LITTLE; ret = prctl(PR_SET_ENDIAN, endian); printf("prctl(PR_SET_ENDIAN,%d) should fail: %s\n", endian, ret == 0 ? "OK":"FAIL"); } Signed-off-by: Helge Deller <deller@gmx.de> Cc: Anton Blanchard <anton@samba.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Thadeu Lima de Souza Cascardo authored
pmu_device_init call from misc_init, but unlike other similar commits, has not removed its declaration. Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 03 Nov, 2009 1 commit
-
-
H Hartley Sweeten authored
for (...) do ... while If curly braces do not surround the inner loop the following warning is generated by sparse: warning: do-while statement is not a compound statement Fix the warning by adding the braces. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 15 Oct, 2009 1 commit
-
-
Amerigo Wang authored
print_fn_descriptor_symbol(). And a quick grep shows that it no longer has any callers. Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 16 Oct, 2009 2 commits
-
-
Andrew Morton authored
Cc: Amerigo Wang <amwang@redhat.com> Cc: Ben Woodard <bwoodard@llnl.gov> Cc: Brian Behlendorf <behlendorf1@llnl.gov> Cc: David Howells <dhowells@redhat.com> Cc: WANG Cong <amwang@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Amerigo Wang authored
->activity consistent. However, the code in __rwsem_do_wake() breaks this rule, it updates ->activity after _all_ readers waken up, this may give some reader a wrong ->activity value, thus cause rwsem_is_locked() behaves wrong. Quote from Andrew: " - we have one or more processes sleeping in down_read(), waiting for access. - we wake one or more processes up without altering ->activity - they start to run and they do rwsem_is_locked(). This incorrectly returns "false", because the waker process is still crunching away in __rwsem_do_wake(). - the waker now alters ->activity, but it was too late. " So we need get a spinlock to protect this. And rwsem_is_locked() should not block, thus we use spin_trylock_irqsave(). Reported-by: Brian Behlendorf <behlendorf1@llnl.gov> Cc: Ben Woodard <bwoodard@llnl.gov> Cc: David Howells <dhowells@redhat.com> Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 14 Oct, 2009 1 commit
-
-
Amerigo Wang authored
__init_rwsem() is an exception, because init_rwsem(), which is a macro, is used. Signed-off-by: WANG Cong <amwang@redhat.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 09 Nov, 2009 1 commit
-
-
Joe Perches authored
data. defconfig before: $size vmlinux text data bss dec hex filename 6976022 679572 1359668 9015262 898fde vmlinux defconfig after: $size vmlinux text data bss dec hex filename 6976006 679508 1359700 9015214 898fae vmlinux Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 13 Oct, 2009 2 commits
-
-
H Hartley Sweeten authored
symbol name is used locally by a couple functions and produces the following sparse warnings: warning: symbol 'call' shadows an earlier one Fix this noise by renaming the local symbols. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Daniel Mack authored
> On Wednesday, October 07, 2009 1:01 PM, Daniel Mack wrote: > > This is actually too trivial to publish, but to export the function of > > that chip to the userspace, a module like this is needed. > > > > Signed-off-by: Daniel Mack <daniel@caiaq.de> > > Cc: Andrew Morton <akpm@linux-foundation.org> > > Cc: David Brownell <dbrownell@users.sourceforge.net> > > Cc: spi-devel-general@lists.sourceforge.net > > --- > > [snip] > > > +static ssize_t dac7512_store_val(struct device *dev, > > + struct device_attribute *attr, > > + const char *buf, size_t count) > > +{ > > + struct spi_device *spi = to_spi_device(dev); > > + unsigned char tmp[2]; > > + unsigned long val; > > + > > + if (strict_strtoul(buf, 10, &val) < 0) > > + return -EINVAL; > > + > > + tmp[0] = val >> 8; > > + tmp[1] = val & 0xff; > > + spi_write(spi, tmp, sizeof(tmp)); > > + return count; > > +} > > + > > +static DEVICE_ATTR(value, S_IWUSR | S_IRUGO, > > + NULL, dac7512_store_val); > > You have declared the "value" device attribute with mode S_IWUSR | S_IRUGO > but have not provided a show callback. Sorry, forget my last mail, I got you wrong. You're of course right, S_IRUGO shouldn't be set for write-only attributes. Updates patch below. Thanks, Daniel >From ab18a967e55d2bb1d39559333bca81a01c2838f0 Mon Sep 17 00:00:00 2001 Date: Thu, 8 Oct 2009 03:55:46 +0800 Subject: [PATCH] drivers/misc: add driver for Texas Instruments DAC7512 This is actually too trivial to publish, but to export the function of that chip to the userspace, a module like this is needed. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: "H Hartley Sweeten" <hartleys@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 26 Oct, 2009 1 commit
-
-
Daniel Mack authored
Cc: "H Hartley Sweeten" <hartleys@visionengravers.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 24 Sep, 2009 1 commit
-
-
Xiao Guangrong authored
generic_smp_call_function_interrupt(), It's no need to disable preempt, because we must call generic_smp_call_function_interrupt() with interrupts disabled. Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 09 Oct, 2009 1 commit
-
-
Michael Hennerich authored
AD5258, AD5259, AD5251, AD5252, AD5253, AD5254, and AD5255 It provides a sysfs interface to each device for reading/writing which is documented in Documentation/misc-devices/ad525x_dpot.txt. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Chris Verges <chrisv@cyberswitching.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 09 Nov, 2009 1 commit
-
-
Joe Perches authored
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/kernel.h> dynamic_debug.h will duplicate KBUILD_MODNAME in the output string. Remove the use of KBUILD_MODNAME from the output format string generated by dynamic_debug.h If CONFIG_DYNAMIC_DEBUG is not enabled, no compile-time check is done to printk/dev_printk arguments. Add it. Signed-off-by: Joe Perches <joe@perches.com> Cc: Jason Baron <jbaron@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 30 Sep, 2009 2 commits
-
-
Cesar Eduardo Barros authored
for boolean flag") changed printk_once() to use bool instead of int for its guard variable. Do the same change to WARN_ONCE() and WARN_ON_ONCE(), for the same reasons. This resulted in a reduction of 1462 bytes on a x86-64 defconfig: text data bss dec hex filename 8101271 1207116 992764 10301151 9d2edf vmlinux.before 8100553 1207148 991988 10299689 9d2929 vmlinux.after Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net> Cc: Roland Dreier <rolandd@cisco.com> Cc: Daniel Walker <dwalker@fifo99.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Barry Song authored
ktime_add() in timecompare_update() will overflow a half earlier. As a result, wrong offset will be gotten, then cause some strange problems. Signed-off-by: Barry Song <21cnbao@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Patrick Ohly <patrick.ohly@intel.com> Cc: David S. Miller <davem@davemloft.net> Cc: John Stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 28 Oct, 2009 1 commit
-
-
Andrew Lunn authored
first enabled with the call to activate_fd(). The irq handler is then registered with request_irq(). What can happen is that directly after activate_fd() the SIGIO goes off and the IRQ source is disabled at the low level, the pollfd is set to -1. Since no irq handler has yet been registered, the interrupt it left disabled at the low level. The interrupt handler is then registered, but its too late, the interrupt source has been disabled at the lower level and is never re-enabled. To fix this race condition i swapped the order. First request_irq() then activate_fd() the interrupt sources. There is a second bug. In 2.6.31 there was a change to the way __do_IRQ() and friends work for chained interrupt sources. The old way was that all chained interrupt handlers were called. The new way is that the chain is walked only until a handler returns IRQ_HANDLED or IRQ_WAKE_THREAD. uml_net_interrupt() would always return IRQ_HANDLED, irrespective of if the device really did receive an interrupt or not. This mean with the new code only the first device on a chained interrupt ever got its interrupts handled. The second/third/... device never got any interrupts processed. I changed uml_net_interrupt() to always return IRQ_NONE so that all handlers get called on a chained interrupt. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Cc: Jeff Dike <jdike@addtoit.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 12 Oct, 2009 1 commit
-
-
Andrew Morton authored
Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 13 Oct, 2009 1 commit
-
-
Arjan van de Ven authored
In function `copy_from_user', inlined from `fd_copyin' at drivers/block/floppy.c:3080, inlined from `fd_ioctl' at drivers/block/floppy.c:3503: /home/arjan/linux/arch/x86/include/asm/uaccess_32.h:211: warning: call to `copy_from_user_overflow' declared with attribute warning: copy_from_user buffer size is not provably correct And frankly, as a human I have a hard time proving the same more or less (the size comes from the ioctl argument. humpf. maybe. the code isn't very nice) This patch adds an explicit check to make 100% sure it's safe, better than finding out later that there indeed was a gap. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 12 Oct, 2009 1 commit
-
-
Roel Kluin authored
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 23 Jul, 2009 1 commit
-
-
john stultz authored
reducing the amount of arch specific code we need to maintain. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 03 Nov, 2009 1 commit
-
-
Julia Lawall authored
test. If ldev can somehow be NULL, then the initialization of last_idx should be moved below the test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 09 Nov, 2009 1 commit
-
-
Alexey Dobriyan authored
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 03 Nov, 2009 1 commit
-
-
Jie Zhang authored
is what we want in the default case, all memory allocation from userspace under NOMMU has to go through this interface, including malloc() which is allowed to return uninitialized memory. This can easily be a significant performance penalty. So for constrained embedded systems were security is irrelevant, allow people to avoid clearing memory unnecessarily. This also alters the ELF-FDPIC binfmt such that it obtains uninitialised memory for the brk and stack region. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 14 Feb, 2009 2 commits
-
-
Andrew Morton authored
#23: FILE: arch/frv/kernel/gdb-stub.c:1883: + gdbstub_strcpy(output_buffer,"E02"); ^ ERROR: space required after that ',' (ctx:VxV) #32: FILE: arch/frv/kernel/gdb-stub.c:1911: + gdbstub_strcpy(output_buffer,"E02"); ^ total: 2 errors, 0 warnings, 16 lines checked ./patches/frv-duplicate-output_buffer-of-e03.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Roel Kluin authored
two. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 09 Nov, 2009 1 commit
-
-
H Hartley Sweeten authored
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 14 Nov, 2009 1 commit
-
-
Andrew Morton authored
Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Andi Kleen <andi@firstfloor.org> Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 13 Nov, 2009 5 commits
-
-
Hugh Dickins authored
to the page while the node exists. Put a pointer to the stable_node into the ksm page's ->mapping. Then we don't need get_ksm_page() while traversing the stable tree: the page to compare against is sure to be present and correct, even if it's no longer visible through any of its existing rmap_items. And we can handle the forked ksm page case more efficiently: no need to memcmp our way through the tree to find its match. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Izik Eidus <ieidus@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Hugh Dickins authored
separate tree_item at the node, for several reasons it becomes awkward to keep rmap_items in the stable tree without a separate stable_node: lack of space in the nicely-sized rmap_item, the need for an anchor as rmap_items are removed, the need for a node even when temporarily no rmap_items are attached to it. So declare struct stable_node (rb_node to place it in the tree and hlist_head for the rmap_items hanging off it), and convert stable tree handling to use it: without yet taking advantage of it. Note how one stable_tree_insert() of a node now has _two_ stable_tree_append()s of the two rmap_items being merged. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Izik Eidus <ieidus@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Hugh Dickins authored
singly-linked list: we always traverse that list sequentially, and we don't even lose any prefetches (but should consider adding a few later). Name it rmap_list throughout. Do we need to free up that pointer? Not immediately, and in the end, we could continue to avoid it with a union; but having done the conversion, let's keep it this way, since there's no downside, and maybe we'll want more in future (struct rmap_item is a cache-friendly 32 bytes on 32-bit and 64 bytes on 64-bit, so we shall want to avoid expanding it). Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Izik Eidus <ieidus@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Hugh Dickins authored
down to replace_page(), so that it's easier to follow the rmap_item's page and the matching tree_page and the merged kpage through that code. In some places, e.g. break_cow(), pass rmap_item instead of separate mm and address. cmp_and_merge_page() initialize tree_page to NULL, to avoid a "may be used uninitialized" warning seen in one config by Anil SB. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Izik Eidus <ieidus@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Hugh Dickins authored
vm_page_prot must already be write-protected for an anonymous page (see mm/memory.c do_anonymous_page() for similar reliance on vm_page_prot). There is no need for try_to_merge_one_page() to get_page and put_page on newpage and oldpage: in every case we already hold a reference to each of them. But some instinct makes me move try_to_merge_one_page()'s unlock_page of oldpage down after replace_page(): that doesn't increase contention on the ksm page, and makes thinking about the transition easier. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Izik Eidus <ieidus@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-