aboutsummaryrefslogtreecommitdiff
path: root/arch/um/kernel/irq_user.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-05-17 09:10:20 -0700
committerTony Luck <tony.luck@intel.com>2005-05-17 09:10:20 -0700
commitd0dac8082cbc2b234917ec53eb591b1ddbec80bb (patch)
tree105651af2db033de4803b91cc029381a1b9b39d2 /arch/um/kernel/irq_user.c
parentbfd68594082d8384781c242aa72a7950b5cf51aa (diff)
parentff96b3d4b840e8aa126e0a60fd743417ffdee178 (diff)
Merge with linus
Diffstat (limited to 'arch/um/kernel/irq_user.c')
-rw-r--r--arch/um/kernel/irq_user.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/um/kernel/irq_user.c b/arch/um/kernel/irq_user.c
index 6d6f9484b88..b3074cbaa47 100644
--- a/arch/um/kernel/irq_user.c
+++ b/arch/um/kernel/irq_user.c
@@ -236,9 +236,15 @@ static void free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg)
(*prev)->fd, pollfds[i].fd);
goto out;
}
- memcpy(&pollfds[i], &pollfds[i + 1],
- (pollfds_num - i - 1) * sizeof(pollfds[0]));
+
pollfds_num--;
+
+ /* This moves the *whole* array after pollfds[i] (though
+ * it doesn't spot as such)! */
+
+ memmove(&pollfds[i], &pollfds[i + 1],
+ (pollfds_num - i) * sizeof(pollfds[0]));
+
if(last_irq_ptr == &old_fd->next)
last_irq_ptr = prev;
*prev = (*prev)->next;