packages: kernel/kernel-grsec_full.patch - revert last commit and drop only...

arekm arekm at pld-linux.org
Thu Nov 25 19:53:33 CET 2010


Author: arekm                        Date: Thu Nov 25 18:53:33 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- revert last commit and drop only first hunk (already in 2.6.36.1)

---- Files affected:
packages/kernel:
   kernel-grsec_full.patch (1.50 -> 1.51) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-grsec_full.patch
diff -u packages/kernel/kernel-grsec_full.patch:1.50 packages/kernel/kernel-grsec_full.patch:1.51
--- packages/kernel/kernel-grsec_full.patch:1.50	Mon Nov 22 21:42:01 2010
+++ packages/kernel/kernel-grsec_full.patch	Thu Nov 25 19:53:28 2010
@@ -33165,6 +33165,132 @@
  	newattrs.ia_valid =  ATTR_CTIME;
  	if (user != (uid_t) -1) {
  		newattrs.ia_valid |= ATTR_UID;
+diff -urNp linux-2.6.36/fs/pipe.c linux-2.6.36/fs/pipe.c
+--- linux-2.6.36/fs/pipe.c	2010-10-20 16:30:22.000000000 -0400
++++ linux-2.6.36/fs/pipe.c	2010-11-06 18:58:50.000000000 -0400
+@@ -420,9 +420,9 @@ redo:
+ 		}
+ 		if (bufs)	/* More to do? */
+ 			continue;
+-		if (!pipe->writers)
++		if (!atomic_read(&pipe->writers))
+ 			break;
+-		if (!pipe->waiting_writers) {
++		if (!atomic_read(&pipe->waiting_writers)) {
+ 			/* syscall merging: Usually we must not sleep
+ 			 * if O_NONBLOCK is set, or if we got some data.
+ 			 * But if a writer sleeps in kernel space, then
+@@ -481,7 +481,7 @@ pipe_write(struct kiocb *iocb, const str
+ 	mutex_lock(&inode->i_mutex);
+ 	pipe = inode->i_pipe;
+ 
+-	if (!pipe->readers) {
++	if (!atomic_read(&pipe->readers)) {
+ 		send_sig(SIGPIPE, current, 0);
+ 		ret = -EPIPE;
+ 		goto out;
+@@ -530,7 +530,7 @@ redo1:
+ 	for (;;) {
+ 		int bufs;
+ 
+-		if (!pipe->readers) {
++		if (!atomic_read(&pipe->readers)) {
+ 			send_sig(SIGPIPE, current, 0);
+ 			if (!ret)
+ 				ret = -EPIPE;
+@@ -616,9 +616,9 @@ redo2:
+ 			kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
+ 			do_wakeup = 0;
+ 		}
+-		pipe->waiting_writers++;
++		atomic_inc(&pipe->waiting_writers);
+ 		pipe_wait(pipe);
+-		pipe->waiting_writers--;
++		atomic_dec(&pipe->waiting_writers);
+ 	}
+ out:
+ 	mutex_unlock(&inode->i_mutex);
+@@ -685,7 +685,7 @@ pipe_poll(struct file *filp, poll_table 
+ 	mask = 0;
+ 	if (filp->f_mode & FMODE_READ) {
+ 		mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0;
+-		if (!pipe->writers && filp->f_version != pipe->w_counter)
++		if (!atomic_read(&pipe->writers) && filp->f_version != pipe->w_counter)
+ 			mask |= POLLHUP;
+ 	}
+ 
+@@ -695,7 +695,7 @@ pipe_poll(struct file *filp, poll_table 
+ 		 * Most Unices do not set POLLERR for FIFOs but on Linux they
+ 		 * behave exactly like pipes for poll().
+ 		 */
+-		if (!pipe->readers)
++		if (!atomic_read(&pipe->readers))
+ 			mask |= POLLERR;
+ 	}
+ 
+@@ -709,10 +709,10 @@ pipe_release(struct inode *inode, int de
+ 
+ 	mutex_lock(&inode->i_mutex);
+ 	pipe = inode->i_pipe;
+-	pipe->readers -= decr;
+-	pipe->writers -= decw;
++	atomic_sub(decr, &pipe->readers);
++	atomic_sub(decw, &pipe->writers);
+ 
+-	if (!pipe->readers && !pipe->writers) {
++	if (!atomic_read(&pipe->readers) && !atomic_read(&pipe->writers)) {
+ 		free_pipe_info(inode);
+ 	} else {
+ 		wake_up_interruptible_sync(&pipe->wait);
+@@ -802,7 +802,7 @@ pipe_read_open(struct inode *inode, stru
+ 
+ 	if (inode->i_pipe) {
+ 		ret = 0;
+-		inode->i_pipe->readers++;
++		atomic_inc(&inode->i_pipe->readers);
+ 	}
+ 
+ 	mutex_unlock(&inode->i_mutex);
+@@ -819,7 +819,7 @@ pipe_write_open(struct inode *inode, str
+ 
+ 	if (inode->i_pipe) {
+ 		ret = 0;
+-		inode->i_pipe->writers++;
++		atomic_inc(&inode->i_pipe->writers);
+ 	}
+ 
+ 	mutex_unlock(&inode->i_mutex);
+@@ -837,9 +837,9 @@ pipe_rdwr_open(struct inode *inode, stru
+ 	if (inode->i_pipe) {
+ 		ret = 0;
+ 		if (filp->f_mode & FMODE_READ)
+-			inode->i_pipe->readers++;
++			atomic_inc(&inode->i_pipe->readers);
+ 		if (filp->f_mode & FMODE_WRITE)
+-			inode->i_pipe->writers++;
++			atomic_inc(&inode->i_pipe->writers);
+ 	}
+ 
+ 	mutex_unlock(&inode->i_mutex);
+@@ -931,7 +931,7 @@ void free_pipe_info(struct inode *inode)
+ 	inode->i_pipe = NULL;
+ }
+ 
+-static struct vfsmount *pipe_mnt __read_mostly;
++struct vfsmount *pipe_mnt __read_mostly;
+ 
+ /*
+  * pipefs_dname() is called from d_path().
+@@ -959,7 +959,8 @@ static struct inode * get_pipe_inode(voi
+ 		goto fail_iput;
+ 	inode->i_pipe = pipe;
+ 
+-	pipe->readers = pipe->writers = 1;
++	atomic_set(&pipe->readers, 1);
++	atomic_set(&pipe->writers, 1);
+ 	inode->i_fop = &rdwr_pipefifo_fops;
+ 
+ 	/*
 diff -urNp linux-2.6.36/fs/proc/array.c linux-2.6.36/fs/proc/array.c
 --- linux-2.6.36/fs/proc/array.c	2010-10-20 16:30:22.000000000 -0400
 +++ linux-2.6.36/fs/proc/array.c	2010-11-06 18:58:50.000000000 -0400
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-grsec_full.patch?r1=1.50&r2=1.51&f=u



More information about the pld-cvs-commit mailing list