diff options
author | Tony Luck <tony.luck@intel.com> | 2005-06-15 23:06:48 +0200 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-06-15 23:06:48 +0200 |
commit | f2cbb4f01936a3e4225692e03b084b78c56d386d (patch) | |
tree | f89f3d8baa250589a38a4dd2df56f84cddae3c76 /arch/um/kernel/irq_user.c | |
parent | Merge with temp tree to get David's gdb inferior calls patch (diff) | |
parent | [PATCH] update ppc64 defconfig (diff) | |
download | linux-f2cbb4f01936a3e4225692e03b084b78c56d386d.tar.xz linux-f2cbb4f01936a3e4225692e03b084b78c56d386d.zip |
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'arch/um/kernel/irq_user.c')
-rw-r--r-- | arch/um/kernel/irq_user.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/um/kernel/irq_user.c b/arch/um/kernel/irq_user.c index 6d6f9484b884..b3074cbaa479 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; |