Editing
Delta-compile-fix01.diff
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
diff -Nurp linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/drivers/block/vroot.c linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/drivers/block/vroot.c --- linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/drivers/block/vroot.c 2007-12-24 21:57:17.000000000 +0100 +++ linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/drivers/block/vroot.c 2007-12-26 15:41:42.000000000 +0100 @@ -257,8 +257,7 @@ void vroot_exit(void) del_gendisk(disks[i]); put_disk(disks[i]); } - if (unregister_blkdev(VROOT_MAJOR, "vroot")) - printk(KERN_WARNING "vroot: cannot unregister blkdev\n"); + unregister_blkdev(VROOT_MAJOR, "vroot"); kfree(disks); kfree(vroot_dev); diff -Nurp linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/fs/proc/base.c linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/fs/proc/base.c --- linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/fs/proc/base.c 2007-12-24 22:00:57.000000000 +0100 +++ linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/fs/proc/base.c 2007-12-26 15:41:28.000000000 +0100 @@ -2501,7 +2501,7 @@ int proc_pid_readdir(struct file * filp, iter.task; iter.tgid += 1, iter = next_tgid(ns, iter)) { filp->f_pos = iter.tgid + TGID_OFFSET; - if (!vx_proc_task_visible(task)) + if (!vx_proc_task_visible(iter.task)) continue; if (proc_pid_fill_cache(filp, dirent, filldir, iter) < 0) { put_task_struct(iter.task); diff -Nurp linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/ipc/mqueue.c linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/ipc/mqueue.c --- linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/ipc/mqueue.c 2007-12-24 21:57:20.000000000 +0100 +++ linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/ipc/mqueue.c 2007-12-26 15:40:47.000000000 +0100 @@ -73,6 +73,7 @@ struct mqueue_inode_info { struct sigevent notify; struct pid* notify_owner; struct user_struct *user; /* user who created, for accounting */ + struct vx_info *vxi; struct sock *notify_sock; struct sk_buff *notify_cookie; @@ -121,6 +122,7 @@ static struct inode *mqueue_get_inode(st struct mqueue_inode_info *info; struct task_struct *p = current; struct user_struct *u = p->user; + struct vx_info *vxi = p->vx_info; unsigned long mq_bytes, mq_msg_tblsz; inode->i_fop = &mqueue_file_operations; @@ -135,6 +137,7 @@ static struct inode *mqueue_get_inode(st info->notify_owner = NULL; info->qsize = 0; info->user = NULL; /* set when all is ok */ + info->vxi = NULL; memset(&info->attr, 0, sizeof(info->attr)); info->attr.mq_maxmsg = DFLT_MSGMAX; info->attr.mq_msgsize = DFLT_MSGSIZEMAX; @@ -150,24 +153,25 @@ static struct inode *mqueue_get_inode(st if (u->mq_bytes + mq_bytes < u->mq_bytes || u->mq_bytes + mq_bytes > p->signal->rlim[RLIMIT_MSGQUEUE].rlim_cur || - !vx_ipcmsg_avail(p->vx_info, mq_bytes)) { + !vx_ipcmsg_avail(vxi, mq_bytes)) { spin_unlock(&mq_lock); goto out_inode; } u->mq_bytes += mq_bytes; - vx_ipcmsg_add(p->vx_info, u, mq_bytes); + vx_ipcmsg_add(vxi, u, mq_bytes); spin_unlock(&mq_lock); info->messages = kmalloc(mq_msg_tblsz, GFP_KERNEL); if (!info->messages) { spin_lock(&mq_lock); u->mq_bytes -= mq_bytes; - vx_ipcmsg_sub(p->vx_info, u, mq_bytes); + vx_ipcmsg_sub(vxi, u, mq_bytes); spin_unlock(&mq_lock); goto out_inode; } /* all is ok */ info->user = get_uid(u); + info->vxi = get_vx_info(vxi); } else if (S_ISDIR(mode)) { inc_nlink(inode); /* Some things misbehave if size == 0 on a directory */ @@ -258,7 +262,7 @@ static void mqueue_delete_inode(struct i (info->attr.mq_maxmsg * info->attr.mq_msgsize)); user = info->user; if (user) { - struct vx_info *vxi = lookup_vx_info(user->xid); + struct vx_info *vxi = info->vxi; spin_lock(&mq_lock); user->mq_bytes -= mq_bytes;
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information