ALSA: hda - Fix pending unsol events at shutdown
[linux-2.6-block.git] / fs / ext4 / super.c
index 3db5f17228b7691f9208252e937c16349d486e12..dd654e53ba3d982d99c05b2336dd4de9132b0978 100644 (file)
@@ -1878,6 +1878,13 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
        } else if (token == Opt_commit) {
                if (arg == 0)
                        arg = JBD2_DEFAULT_MAX_COMMIT_AGE;
+               else if (arg > INT_MAX / HZ) {
+                       ext4_msg(sb, KERN_ERR,
+                                "Invalid commit interval %d, "
+                                "must be smaller than %d",
+                                arg, INT_MAX / HZ);
+                       return -1;
+               }
                sbi->s_commit_interval = HZ * arg;
        } else if (token == Opt_debug_want_extra_isize) {
                sbi->s_want_extra_isize = arg;