Author: maks
Date: Mon Oct  8 21:25:46 2007
New Revision: 9611

Log:
add stable 2.6.22.8


Added:
   dists/sid/linux-2.6/debian/patches/bugfix/2.6.22.8
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/5

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog        (original)
+++ dists/sid/linux-2.6/debian/changelog        Mon Oct  8 21:25:46 2007
@@ -29,8 +29,10 @@
     - IPV6: Fix kernel panic while send SCTP data with IP fragments
     - i386: fix lazy mode vmalloc synchronization for paravirt
   * Set abi to 3.
-  * Add stable release 2.6.22.7: CVE-2007-4573:
+  * Add stable release 2.6.22.7: (CVE-2007-4573)
     - x86_64: Zero extend all registers after ptrace in 32bit entry path.
+  * Add stable release 2.6.22.8: (CVE-2007-4571)
+    - Convert snd-page-alloc proc file to use seq_file
 
   [ Martin Michlmayr ]
   * [mips] Add a fix so qemu NE2000 will work again.
@@ -51,7 +53,7 @@
   [ dann frazier ]
   * [ia64] Enable cciss module
 
- -- maximilian attems <[EMAIL PROTECTED]>  Mon, 08 Oct 2007 23:20:03 +0200
+ -- maximilian attems <[EMAIL PROTECTED]>  Mon, 08 Oct 2007 23:24:16 +0200
 
 linux-2.6 (2.6.22-4) unstable; urgency=low
 

Added: dists/sid/linux-2.6/debian/patches/bugfix/2.6.22.8
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/2.6.22.8  Mon Oct  8 21:25:46 2007
@@ -0,0 +1,151 @@
+diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
+index f057430..9b5656d 100644
+--- a/sound/core/memalloc.c
++++ b/sound/core/memalloc.c
+@@ -27,6 +27,7 @@
+ #include <linux/pci.h>
+ #include <linux/slab.h>
+ #include <linux/mm.h>
++#include <linux/seq_file.h>
+ #include <asm/uaccess.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/moduleparam.h>
+@@ -481,53 +482,54 @@ static void free_all_reserved_pages(void)
+ #define SND_MEM_PROC_FILE     "driver/snd-page-alloc"
+ static struct proc_dir_entry *snd_mem_proc;
+ 
+-static int snd_mem_proc_read(char *page, char **start, off_t off,
+-                           int count, int *eof, void *data)
++static int snd_mem_proc_read(struct seq_file *seq, void *offset)
+ {
+-      int len = 0;
+       long pages = snd_allocated_pages >> (PAGE_SHIFT-12);
+       struct snd_mem_list *mem;
+       int devno;
+       static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" };
+ 
+       mutex_lock(&list_mutex);
+-      len += snprintf(page + len, count - len,
+-                      "pages  : %li bytes (%li pages per %likB)\n",
+-                      pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
++      seq_printf(seq, "pages  : %li bytes (%li pages per %likB)\n",
++                 pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
+       devno = 0;
+       list_for_each_entry(mem, &mem_list_head, list) {
+               devno++;
+-              len += snprintf(page + len, count - len,
+-                              "buffer %d : ID %08x : type %s\n",
+-                              devno, mem->id, types[mem->buffer.dev.type]);
+-              len += snprintf(page + len, count - len,
+-                              "  addr = 0x%lx, size = %d bytes\n",
+-                              (unsigned long)mem->buffer.addr, 
(int)mem->buffer.bytes);
++              seq_printf(seq, "buffer %d : ID %08x : type %s\n",
++                         devno, mem->id, types[mem->buffer.dev.type]);
++              seq_printf(seq, "  addr = 0x%lx, size = %d bytes\n",
++                         (unsigned long)mem->buffer.addr,
++                         (int)mem->buffer.bytes);
+       }
+       mutex_unlock(&list_mutex);
+-      return len;
++      return 0;
++}
++
++static int snd_mem_proc_open(struct inode *inode, struct file *file)
++{
++      return single_open(file, snd_mem_proc_read, NULL);
+ }
+ 
+ /* FIXME: for pci only - other bus? */
+ #ifdef CONFIG_PCI
+ #define gettoken(bufp) strsep(bufp, " \t\n")
+ 
+-static int snd_mem_proc_write(struct file *file, const char __user *buffer,
+-                            unsigned long count, void *data)
++static ssize_t snd_mem_proc_write(struct file *file, const char __user * 
buffer,
++                                size_t count, loff_t * ppos)
+ {
+       char buf[128];
+       char *token, *p;
+ 
+-      if (count > ARRAY_SIZE(buf) - 1)
+-              count = ARRAY_SIZE(buf) - 1;
++      if (count > sizeof(buf) - 1)
++              return -EINVAL;
+       if (copy_from_user(buf, buffer, count))
+               return -EFAULT;
+-      buf[ARRAY_SIZE(buf) - 1] = '\0';
++      buf[count] = '\0';
+ 
+       p = buf;
+       token = gettoken(&p);
+       if (! token || *token == '#')
+-              return (int)count;
++              return count;
+       if (strcmp(token, "add") == 0) {
+               char *endp;
+               int vendor, device, size, buffers;
+@@ -548,7 +550,7 @@ static int snd_mem_proc_write(struct file *file, const 
char __user *buffer,
+                   (buffers = simple_strtol(token, NULL, 0)) <= 0 ||
+                   buffers > 4) {
+                       printk(KERN_ERR "snd-page-alloc: invalid proc write 
format\n");
+-                      return (int)count;
++                      return count;
+               }
+               vendor &= 0xffff;
+               device &= 0xffff;
+@@ -560,7 +562,7 @@ static int snd_mem_proc_write(struct file *file, const 
char __user *buffer,
+                               if (pci_set_dma_mask(pci, mask) < 0 ||
+                                   pci_set_consistent_dma_mask(pci, mask) < 0) 
{
+                                       printk(KERN_ERR "snd-page-alloc: cannot 
set DMA mask %lx for pci %04x:%04x\n", mask, vendor, device);
+-                                      return (int)count;
++                                      return count;
+                               }
+                       }
+                       for (i = 0; i < buffers; i++) {
+@@ -570,7 +572,7 @@ static int snd_mem_proc_write(struct file *file, const 
char __user *buffer,
+                                                       size, &dmab) < 0) {
+                                       printk(KERN_ERR "snd-page-alloc: cannot 
allocate buffer pages (size = %d)\n", size);
+                                       pci_dev_put(pci);
+-                                      return (int)count;
++                                      return count;
+                               }
+                               snd_dma_reserve_buf(&dmab, 
snd_dma_pci_buf_id(pci));
+                       }
+@@ -596,9 +598,21 @@ static int snd_mem_proc_write(struct file *file, const 
char __user *buffer,
+               free_all_reserved_pages();
+       else
+               printk(KERN_ERR "snd-page-alloc: invalid proc cmd\n");
+-      return (int)count;
++      return count;
+ }
+ #endif /* CONFIG_PCI */
++
++static const struct file_operations snd_mem_proc_fops = {
++      .owner          = THIS_MODULE,
++      .open           = snd_mem_proc_open,
++      .read           = seq_read,
++#ifdef CONFIG_PCI
++      .write          = snd_mem_proc_write,
++#endif
++      .llseek         = seq_lseek,
++      .release        = single_release,
++};
++
+ #endif /* CONFIG_PROC_FS */
+ 
+ /*
+@@ -609,12 +623,8 @@ static int __init snd_mem_init(void)
+ {
+ #ifdef CONFIG_PROC_FS
+       snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);
+-      if (snd_mem_proc) {
+-              snd_mem_proc->read_proc = snd_mem_proc_read;
+-#ifdef CONFIG_PCI
+-              snd_mem_proc->write_proc = snd_mem_proc_write;
+-#endif
+-      }
++      if (snd_mem_proc)
++              snd_mem_proc->proc_fops = &snd_mem_proc_fops;
+ #endif
+       return 0;
+ }

Modified: dists/sid/linux-2.6/debian/patches/series/5
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/5 (original)
+++ dists/sid/linux-2.6/debian/patches/series/5 Mon Oct  8 21:25:46 2007
@@ -3,3 +3,4 @@
 + bugfix/mips/fix-build-elf64.patch
 + bugfix/2.6.22.6
 + bugfix/2.6.22.7
++ bugfix/2.6.22.8

_______________________________________________
Kernel-svn-changes mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes

Reply via email to