diff -NurpP --minimal linux-2.6.15-vs2.1.0.10/kernel/vserver/limit.c linux-2.6.15-vs2.1.0.10.1/kernel/vserver/limit.c --- linux-2.6.15-vs2.1.0.10/kernel/vserver/limit.c 2006-02-11 01:32:13 +0100 +++ linux-2.6.15-vs2.1.0.10.1/kernel/vserver/limit.c 2006-02-11 10:41:16 +0100 @@ -119,6 +119,13 @@ int vc_set_rlimit(uint32_t id, void __us if (vc_data.softlimit != CRLIM_KEEP) __rlim_soft(&vxi->limit, vc_data.id) = VX_RLIM(vc_data.softlimit); + + /* clamp soft limit */ + if (__rlim_soft(&vxi->limit, vc_data.id) > + __rlim_hard(&vxi->limit, vc_data.id)) + __rlim_soft(&vxi->limit, vc_data.id) = + __rlim_hard(&vxi->limit, vc_data.id); + put_vx_info(vxi); return 0;