Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
authorLinus Torvalds <torvalds@woody.osdl.org>
Wed, 29 Nov 2006 01:27:11 +0000 (17:27 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Wed, 29 Nov 2006 01:27:11 +0000 (17:27 -0800)
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix Bonito bootup message.

arch/x86_64/kernel/early_printk.c
drivers/mtd/chips/cfi_cmdset_0001.c
fs/ecryptfs/crypto.c
include/scsi/libsas.h
kernel/kmod.c
net/bridge/br_ioctl.c

index e22ecd54870d8e818dc0bc2563a8194a7699def2..47b6d90349da905f226709aaf29c9ff48e501741 100644 (file)
@@ -224,7 +224,7 @@ static int __init setup_early_printk(char *buf)
                return 0;
        early_console_initialized = 1;
 
-       if (!strcmp(buf,"keep"))
+       if (strstr(buf, "keep"))
                keep_early = 1;
 
        if (!strncmp(buf, "serial", 6)) {
index 7ea49a0d5ec32490633e27a3219e9b2335c3024b..296159ec5189eafc0e6c68d118bde8772725ac95 100644 (file)
@@ -1087,7 +1087,7 @@ static int inval_cache_and_wait_for_operation(
                }
                spin_lock(chip->mutex);
 
-               if (chip->state != chip_state) {
+               while (chip->state != chip_state) {
                        /* Someone's suspended the operation: sleep */
                        DECLARE_WAITQUEUE(wait, current);
                        set_current_state(TASK_UNINTERRUPTIBLE);
index 136175a693321300743e02a7dd1f663e3ff41c4d..f63a7755fe8697ea7469182b1baa487fd1b48c7a 100644 (file)
@@ -820,7 +820,8 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)
        crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0,
                                                 CRYPTO_ALG_ASYNC);
        kfree(full_alg_name);
-       if (!crypt_stat->tfm) {
+       if (IS_ERR(crypt_stat->tfm)) {
+               rc = PTR_ERR(crypt_stat->tfm);
                ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): "
                                "Error initializing cipher [%s]\n",
                                crypt_stat->cipher);
index 9582e8401669b89ceba0d555499c0d3e263c8e30..1d77b63c5ea4c64882b3e7d37d0c650941729f4a 100644 (file)
@@ -35,6 +35,7 @@
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_cmnd.h>
 #include <scsi/scsi_transport_sas.h>
+#include <asm/scatterlist.h>
 
 struct block_device;
 
index bb4e29d924e4ff29567a962e7b643e0c1c875896..2b76dee284964c82ca42a81b2ddd1463f72d001d 100644 (file)
@@ -307,14 +307,14 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp,
                return 0;
 
        f = create_write_pipe();
-       if (!f)
-               return -ENOMEM;
+       if (IS_ERR(f))
+               return PTR_ERR(f);
        *filp = f;
 
        f = create_read_pipe(f);
-       if (!f) {
+       if (IS_ERR(f)) {
                free_write_pipe(*filp);
-               return -ENOMEM;
+               return PTR_ERR(f);
        }
        sub_info.stdin = f;
 
index 4e4119a1213925568b8a1acdef9bf52b98b19da3..4c61a7e0a86e1ae9e16867f9f8e4b0412b8edbaf 100644 (file)
@@ -58,12 +58,13 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf,
 {
        int num;
        void *buf;
-       size_t size = maxnum * sizeof(struct __fdb_entry);
+       size_t size;
 
-       if (size > PAGE_SIZE) {
-               size = PAGE_SIZE;
+       /* Clamp size to PAGE_SIZE, test maxnum to avoid overflow */
+       if (maxnum > PAGE_SIZE/sizeof(struct __fdb_entry))
                maxnum = PAGE_SIZE/sizeof(struct __fdb_entry);
-       }
+
+       size = maxnum * sizeof(struct __fdb_entry);
 
        buf = kmalloc(size, GFP_USER);
        if (!buf)