Skip to contentSkip to conversation

-stable review

PATCH New Chris Wright 1 participant 5 messages Mar 3, 2006

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover -stable review

This is the start of the stable review cycle for the 2.6.15.6 release. There are 4 patches in this series, 2 of which are simply compile fixes for the problems with 2.6.15.5, all will be posted as a response to this one. If anyone has any issues with these being applied, please let us know. If anyone is a maintainer of the proper subsystem, and wants to add a Signed-off-by: line to the patch, please respond with it.

These patches are sent out with a number of different people on the
Cc: line. If you wish to be a reviewer, please email [email protected] to add your name to the list. If you want to be off the reviewer list, also email us.

Responses should be made by Sun Mar 5 08:00 UTC. Anything received after that time, might be too late.

thanks,
the -stable release team
--

#1 lore raw

PATCH 1/4 Dont reset rskq_defer_accept in reqsk_queue_alloc

-stable review patch. If anyone has any objections, please let us know.
------------------

In 295f7324ff8d9ea58b4d3ec93b1aaa1d80e048a9 I moved defer_accept from tcp_sock to request_queue and mistakingly reset it at reqsl_queue_alloc, causing calls to setsockopt(TCP_DEFER_ACCEPT ) to be lost after bind, the fix is to remove the zeroing of rskq_defer_accept from reqsl_queue_alloc.

Thanks to Alexandra N. Kossovsky <[email protected]> for reporting and testing the suggested fix.

---

 net/core/request_sock.c |    1 -
 1 files changed, 1 deletion(-)
net/core/request_sock.c +0 -1
@@ -52,7 +52,6 @@ int reqsk_queue_alloc(struct request_soc
 	get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd));
 	rwlock_init(&queue->syn_wait_lock);
 	queue->rskq_accept_head = queue->rskq_accept_head = NULL;
-	queue->rskq_defer_accept = 0;
 	lopt->nr_table_entries = nr_table_entries;
 
 	write_lock_bh(&queue->syn_wait_lock);

--

#2 lore raw

PATCH 2/4 die_if_kernel() can return (CVE-2006-0742)

In reply to Chris Wright

-stable review patch. If anyone has any objections, please let us know.
------------------

arch/ia64/kernel/unaligned.c erroneously marked die_if_kernel() with a "noreturn" attribute ... which is silly (it returns whenever the argument regs say that the fault happened in user mode, as one might expect given the "if_kernel" part of its name!). Thanks to Alan and Gareth for pointing this out.

---

 arch/ia64/kernel/unaligned.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/ia64/kernel/unaligned.c +1 -1
@@ -24,7 +24,7 @@
 #include <asm/uaccess.h>
 #include <asm/unaligned.h>
 
-extern void die_if_kernel(char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn));
+extern void die_if_kernel(char *str, struct pt_regs *regs, long err);
 
 #undef DEBUG_UNALIGNED_TRAP
 

--

#3 lore raw

PATCH 3/4 fs/nfs/direct.c compile fix

In reply to Chris Wright

-stable review patch. If anyone has any objections, please let us know.
------------------

Compile fix:

fs/nfs/direct.c: In function 'nfs_get_user_pages':
fs/nfs/direct.c:110: warning: implicit declaration of function 'nfs_free_user_pages' fs/nfs/direct.c: At top level:
fs/nfs/direct.c:127: warning: conflicting types for 'nfs_free_user_pages' fs/nfs/direct.c:127: error: static declaration of 'nfs_free_user_pages' follows non-static declaration fs/nfs/direct.c:110: error: previous implicit declaration of 'nfs_free_user_pages' was here

This should now be the same as fix that's going upstream.

Cc Trond Myklebust <[email protected]>

---

 fs/nfs/direct.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)
fs/nfs/direct.c +6 -1
@@ -57,6 +57,7 @@
 #define NFSDBG_FACILITY		NFSDBG_VFS
 #define MAX_DIRECTIO_SIZE	(4096UL << PAGE_SHIFT)
 
+static void nfs_free_user_pages(struct page **pages, int npages, int do_dirty);
 static kmem_cache_t *nfs_direct_cachep;
 
 /*
@@ -106,12 +107,16 @@ nfs_get_user_pages(int rw, unsigned long
 		result = get_user_pages(current, current->mm, user_addr,
 					page_count, (rw == READ), 0,
 					*pages, NULL);
+		up_read(&current->mm->mmap_sem);
+		/*
+		 * If we got fewer pages than expected from get_user_pages(),
+		 * the user buffer runs off the end of a mapping; return EFAULT.
+		 */
 		if (result >= 0 && result < page_count) {
 			nfs_free_user_pages(*pages, result, 0);
 			*pages = NULL;
 			result = -EFAULT;
 		}
-		up_read(&current->mm->mmap_sem);
 	}
 	return result;
 }

--

#4 lore raw

PATCH 4/4 mempolicy.c compile fix, make sure BITS_PER_BYTE is defined

In reply to Chris Wright

-stable review patch. If anyone has any objections, please let us know.
------------------

Gar..

mm/mempolicy.c: In function 'get_nodes':
mm/mempolicy.c:527: error: 'BITS_PER_BYTE' undeclared (first use in this function) mm/mempolicy.c:527: error: (Each undeclared identifier is reported only once mm/mempolicy.c:527: error: for each function it appears in.)

About to retry a build with the below patch which should do the trick. (How did this *ever* build?)

---

 include/linux/types.h |    1 +
 1 files changed, 1 insertion(+)
include/linux/types.h +1 -0
@@ -8,6 +8,7 @@
 	(((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
 #define DECLARE_BITMAP(name,bits) \
 	unsigned long name[BITS_TO_LONGS(bits)]
+#define BITS_PER_BYTE 8
 #endif
 
 #include <linux/posix_types.h>

--