[NETLINK] Fix for Alexey's netlink lookup recursion fixWhen CONFIG_IP_MULTIPLE_TABLES is enabled, the code in nl_fib_lookup()
needs to initialize the res.r field before fib_res_put(&res) - unlike
fib_lookup(), a direct call to ->tb_lookup does not set this field.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
---
net/ipv4/fib_frontend.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
On Wed, 25 Apr 2007 22:29:12 -0700 Greg KH wrote...
[PATCH] Make speedstep centrino cpufreq driver use wr/rdmsr_on_cpu() speedstep-centrino cpufreq driver was using set_cpus_allowed() and checks for smp_processor_id() to confine itself to given CPU.Switch to rdmsr_on_cpu/wrmsr_on_cpu() infrastructure.
Closes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420708
[VZDQ] prohibit chown of a file if owner doesn't have ugid struct Prohibit chown a file if its owner does not have ugid record. This might happen if we somehow exceeded the UID/GID (e.g. set ugidlimit less than number of users).Bug #79553
[NETLINK] VE netlink message should go into VE logWhen parsing netlink arguments kernel may printk that
some bytes left unparsed. Make this info appear in VE log,
instead of global one.
[PATCH] TASK_IO_ACCOUNTING breaks menu config 1. Move TASK_IO_ACCOUNTING out of EMBEDDED menu cf placement in mainline. 2. As side effect, EMBEDDED menu will be shown on same level as designed, not returning to top level after SYSCTL option.http://bugzilla.openvz.org/show_bug.cgi?id=550
[PATCH] stack overflow in netlink (mainstream)Reply to NETLINK_FIB_LOOKUP messages were misrouted back to kernel,
which resulted in infinite recursion and stack overflow.
The bug is present in all kernel versions since the feature appeared.
(linux 2.6.13, Jun 20th, 2005,
commit 246955fe4c38bd706ae30e37c64892c94213775d,
[NETLINK]: fib_lookup() via netlink)
The patch also makes some minimal cleanup:
1. Return something consistent (-E...
[SCHED] Select some vcpu instead of idle even if all vcpus are hot We have to use oldest vcpu if all vcpu's are hot. In current kernel an idle_vcpu is used and CPU can idle instead of doing some job.Bug #79676
[IOPRIO] forced dispatching when CONFIG_UBC_IO_PRIO off If CONFIG_UBC_IO_PRIO is off, then no beancounters are in active list, consequently we have a bug in forced dispatching case.http://bugzilla.openvz.org/show_bug.cgi?id=528
[PATCH] modification of allow merge policy in cfq (mainstream) Jens Axboe rewrited allow merge policy one more time after we reported the problem and fixed the problem we face curently when some tasks experience I/O starvations.This is an incremental patch to the previous patch
diff-ms-cfq-allow-merge-20070117 ported to OpenVZ.
This patch is cumulative of
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=719d34027e1a186e46a3952e8a24bf91ecc33837
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ec8acb6904fabb8e741f741ec99bb1c18f2b3dee
Bug #79594
[MEMINFO] sysctl for selecting UsedMem sourceAdds sysctl to choose base ubc parameter for memory usage inside a VE.
Sets PRIVVMPAGES beancounter to be used by default instead of OOMGUARPAGES.
Bug #78088
[SCHED] cleanup: removed unused variablestruct rq *rq was used before fairsched patch to compare
tasks with rq->idle. With fairsched idle task is bound to
pcpu, not vcpu and thus struct rq *rq is simply not needed.
[PATCH] loopback: oops on loopback mount/umount (mainstream)After LOOP_SET_FD/LOOP_CLR_FD combo loop device's queue gets request
handler which is persistent.
After, say
mount -t iso9660 /dev/loop0 /mnt # sic
this request handler is called directly with
a) ->lo_state being Lo_unbound
b) ->lo_pending being zero
Error path in loop_make_request() completes ->lo_bh_done completion
which is persistent as well.
Now, let's start worker thread as usual. It...
[CPT] thread groups with exited leader did not migrateThe bug is simple and stupid, it is very strange nobody saw this.
When thread group leader exits, its mm/files/fs/namespace are released
but zombie process remain frozen until all the threads exit.
Restore was not able to restore such configuration.
Solution is simple: when chackpointing save not real (NULL)
mm/files/fs/namespace, but mm/files/fs/namespace of this thread group.
[CPT] restore rcv queue on netlink sockets and unbound netlink socketsCode restoring queues was forgotten. This fixes bug #79723.
Unbound sockets were restored incorrectly, they were outbound
to some post, which prevented subsequent bind by application.
This fixes bug #79724.
The patch overrides previous patch with subj:
"[CPT] restore rcv queue on netlink sockets", which fixed only bug #79723.
[IOPRIO] Oops on IO-prioritization disablingIf io-prioritization is suddenly turned off via
/sys/block/<dev>/queue/iosched/virt_mode cfqq owner BC does not equal
current io context. It is right to get beancounter obtained from queue,
but not from current IO context.
[CPT] retry checkpointing if VE has active netlink callbackReturn -EAGAIN instead of -EBUSY if netlink socket has active callback.
In this case we will try to freeze VE 3 times.
[PATCH] Invalid return value of execve() resulting in oopses (mainstream) Invalid return value of execve() resulting in oopses (mainstream)When elf loader fails to map executable (due to memory shortage
or because binary is malformed), it can return 0. Normally, this is invisible
because process is killed with SIGKILL and it never returns to user space.
But if exec() is called from kernel thread (hotplug, whatever) consequences
are more interesting and vary depending on architecture.
i386. Nothing especially interesting, execve(...
[CPT] tux is missing on vanilla kernelsCompilation bug was introduced by
http://git.openvz.org/?p=linux-2.6.18-openvz;a=commitdiff;h=f90c2c318467829ecde43919ad38f326527f533b
fixes
http://bugzilla.openvz.org/show_bug.cgi?id=545
[PATCH] Revert fatal signal processing logic Revert diff-ms-fatal-signal-20070413. It's wrong. Forbids SIGKILL in some cases. Instead we should check whether the receiver is init and whether signal is from VE or VE0.Original patch comment:
This patch changes fatal signal processing logic.
The SIGKILL should be raised only for all threads in the groups
*EXCEPT* recipient one.
http://bugzilla.openvz.org/show_bug.cgi?id=533
[IOACCT] Fix ioacct race When page becomes dirty there's no time to store a context on it - page may become clean immediately.Thus we had a race in accounting when a page became clean
before we set a context on it and this context got lost and
not freed.
Handle the context the other way - in case we're going to
set a new context on a page that already has one - free it
and account written bytes in case the page became clean.
When removing a context from a page - handle the case when
a page does not have one due to th...
[PATCH] Fatal signal processing logicThis patch changes fatal signal processing logic.
The SIGKILL should be raised only for all threads in the groups
*EXCEPT* recipient one.
http://bugzilla.openvz.org/show_bug.cgi?id=533
[SCHED] Reduce starvation of some VCPUs in case of cpu limits Change logic of choosing best_vcpu to schedule to. There are two potential problems:a) if a vcpu is hot, and last used physical CPU of this vcpu is equal to
smp_processor_id() it will be always chosen. This is not a good
decision, because there is no guarantee, that _all_ physical CPU's must
take vcpu's from a vsched. For example, if cpulimit for a vsched is
small, this vsched can be run only on one physical CPU forever.
b) Also now newer 'cold' vcpu's are chosen first,
becau...
[CPT] alternative way to migrate zombie processesIn older 2.6.8 kernels do_exit() was very simple, essentially
it disposed m etc, which is done automatically while checkpointing,
and did some work on notifying parent. So that it was natural
to move restored process to zombie state by hands.
In 2.6.18 do_exit makes _lots_ of work.
Seems, it is easier to invert logic. We introduce new flag
PF_RESTART_EXIT, which suppresses the work which was ...
[CPT] Fix lockdep warning on socket dump CPT locks all the sockets it finds for dumping. This is OK, but lockdep thinks as if it were a circular locking.It happens each time we migrate a VE with more than
one socked aboard.
[PATCH] pthead_mutex_lock deadlock inside VEThis patch replaces diff-ve-futex-EDEADLK-bypass-20061225
and previous small patch reparing user-level deadlock in pthread_mutex_lock()
happening because value 0 was not "virtual".
It undoes unnatural tests for virtuality of pid supplied by user.
Naively, this can result in kernel warning if user mangles
pid doing something like:
syscall(__NR_futex, &l, FUTEX_LOCK_PI, 0, 0);
l...
[STOPMACHINE] Fix possible live-lock problem found by Vasily (vvs@) & Kirill (dev@): a possible situation in stop_machine: - stopmachine_state == STOPMACHINE_WAIT; - STOPPER (stop_machine()) is in state SM_STOPPER_WAITING, calling yield() in a loop; - SLAVES (stopmachine()) also call yield() in a loop.This leads to the fairsched_lock suffering on all CPUs and in case of unfair
getting lock rules (for example on NUMA node), some CPUs can wait for the lock
forever/for a long time, causing a hang of the node.
This patch replaces yield() by msleep(10).
Mainstream kernel is affected as well, though it is harder to trigger:
One CPU does yield() taking/releasing rq->lock,
while another CPU should ...
[BRIDGE] Unaligned access on IA64 when compare ether addrPatch fixes unaligned access that takes place on ia64 in compare_ether_addr()
compare_ether_addr() requires address to be aligned on 2-byte boundary,
while addresses declared in bridges are aligned on 1-byte.
[PATCH] kconfig: security depends on !veMany people have CONFIG_SECURITY enabled in their configs.
When they try to do `make oldconfig` for OpenVZ kernels with such
configs, no questions appear concerning CONFIG_VE and friends, and
people have OpenVZ kernels with virtualization features disabled.
Fix it. Reverse the dependency of VE/SECURITY.
[VZDQ] Fix sleep under inode_lock The calltrace: vzdq_aquotq_lookup iget5_locked() get_new_inode() `- spin_lock(&inode_lock); find_inode() ->set() /* == vzdq_aquotq_lookset */ vdq_aquot_lookset() user_get_super() `- down_read(...)So it may sleep with inode_lock taken.
Move all the sleeping operations out of the lock.
[BC] Check correct user_beancounter passed first in ub_page_uncharge()If page accidentally has a not-removed page_beancounter kernel will
oops dereferencing ub->ub_percpu(). Move the BUG_ON upper to be sure
we work with user_beancounter.
[BC] vmguar_enough_memory() oopses if called form kernel threadIf vmguar_enough_memory() function is called by kernel thread, it oopses
due to task_struct->mm equals NULL. Such situation was encountered when
aufs was over ramfs.
[LOCKDEP] Fix wrong deadlock report in neigh tableLockdep detects a fake deadlock in the calltrace:
neigh_proxy_process()
`- lock(neigh_table->proxy_queue.lock);
arp_process (tbl->proxy_redo)
neigh_event_ns
neigh_update
skb_purge_queue
`- lock(neighbour->arp_queue.lock);
Actually there is no deadlock as the first lock and the second
one are different skb_buff_head's locks, but they are initialized
both in skb_queue_head_init() and thus ha...
[SCHED] VCPU should be initialized completely before deletion There is a race in vsched_del_vcpu() - we can kill migration_thread() even if it has not started yet, i.e. migration_thread() function is not called at all. So, migrate_live_tasks() and migrate_dead_tasks() will not be called on this vcpu while migration thread is killed. But there can be some tasks, that have already migrated on thi...This bug can be easily reproduced. On a busy host with many running
tasks user can run:
In this case, after the second vzctl, migration thread on VCPU 2 will be
created and just waked up, but it can be not really started (scheduled)
yet if there are a lot of other more priority tasks running on the host.
If it will not be scheduled before the third vzctl call, there will be
kernel bug in vsche...