]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
2 .25 patches added
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 28 Jul 2008 18:46:35 +0000 (11:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 28 Jul 2008 18:46:35 +0000 (11:46 -0700)
queue-2.6.25/isofs-fix-minor-filesystem-corruption.patch [new file with mode: 0644]
queue-2.6.25/quota-fix-possible-infinite-loop-in-quota-code.patch [new file with mode: 0644]
queue-2.6.25/series [new file with mode: 0644]

diff --git a/queue-2.6.25/isofs-fix-minor-filesystem-corruption.patch b/queue-2.6.25/isofs-fix-minor-filesystem-corruption.patch
new file mode 100644 (file)
index 0000000..bbf2053
--- /dev/null
@@ -0,0 +1,88 @@
+From stable-bounces@linux.kernel.org Fri Jul 25 11:15:18 2008
+From: James Bottomley <jejb@kernel.org>
+Date: Fri, 25 Jul 2008 18:15:11 GMT
+Subject: isofs: fix minor filesystem corruption
+To: jejb@kernel.org, stable@kernel.org
+Message-ID: <200807251815.m6PIFBwR029783@hera.kernel.org>
+
+From: Adam Greenblatt <adam.greenblatt@gmail.com>
+
+commit c0a1633b6201ef79e31b7da464d44fdf5953054d upstream
+
+Some iso9660 images contain files with rockridge data that is either
+incorrect or incompletely parsed.  Prior to commit
+f2966632a134e865db3c819346a1dc7d96e05309 ("[PATCH] rock: handle directory
+overflows") (included with kernel 2.6.13) the kernel ignored the rockridge
+data for these files, while still allowing the files to be accessed under
+their non-rockridge names.  That commit inadvertently changed things so
+that files with invalid rockridge data could not be accessed at all.  (I
+ran across the problem when comparing some old CDs with hard disk copies I
+had made long ago under kernel 2.4: a few of the files on the hard disk
+copies were no longer visible on the CDs.)
+
+This change reverts to the pre-2.6.13 behavior.
+
+Signed-off-by: Adam Greenblatt <adam.greenblatt@gmail.com>
+Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/isofs/rock.c |   22 ++++++++++++++++++++--
+ 1 file changed, 20 insertions(+), 2 deletions(-)
+
+--- a/fs/isofs/rock.c
++++ b/fs/isofs/rock.c
+@@ -209,6 +209,11 @@ repeat:
+       while (rs.len > 2) { /* There may be one byte for padding somewhere */
+               rr = (struct rock_ridge *)rs.chr;
++              /*
++               * Ignore rock ridge info if rr->len is out of range, but
++               * don't return -EIO because that would make the file
++               * invisible.
++               */
+               if (rr->len < 3)
+                       goto out;       /* Something got screwed up here */
+               sig = isonum_721(rs.chr);
+@@ -216,8 +221,12 @@ repeat:
+                       goto eio;
+               rs.chr += rr->len;
+               rs.len -= rr->len;
++              /*
++               * As above, just ignore the rock ridge info if rr->len
++               * is bogus.
++               */
+               if (rs.len < 0)
+-                      goto eio;       /* corrupted isofs */
++                      goto out;       /* Something got screwed up here */
+               switch (sig) {
+               case SIG('R', 'R'):
+@@ -307,6 +316,11 @@ parse_rock_ridge_inode_internal(struct i
+ repeat:
+       while (rs.len > 2) { /* There may be one byte for padding somewhere */
+               rr = (struct rock_ridge *)rs.chr;
++              /*
++               * Ignore rock ridge info if rr->len is out of range, but
++               * don't return -EIO because that would make the file
++               * invisible.
++               */
+               if (rr->len < 3)
+                       goto out;       /* Something got screwed up here */
+               sig = isonum_721(rs.chr);
+@@ -314,8 +328,12 @@ repeat:
+                       goto eio;
+               rs.chr += rr->len;
+               rs.len -= rr->len;
++              /*
++               * As above, just ignore the rock ridge info if rr->len
++               * is bogus.
++               */
+               if (rs.len < 0)
+-                      goto eio;       /* corrupted isofs */
++                      goto out;       /* Something got screwed up here */
+               switch (sig) {
+ #ifndef CONFIG_ZISOFS         /* No flag for SF or ZF */
diff --git a/queue-2.6.25/quota-fix-possible-infinite-loop-in-quota-code.patch b/queue-2.6.25/quota-fix-possible-infinite-loop-in-quota-code.patch
new file mode 100644 (file)
index 0000000..228e627
--- /dev/null
@@ -0,0 +1,60 @@
+From stable-bounces@linux.kernel.org Fri Jul 25 11:15:18 2008
+From: James Bottomley <jejb@kernel.org>
+Date: Fri, 25 Jul 2008 18:15:07 GMT
+Subject: quota: fix possible infinite loop in quota code
+To: jejb@kernel.org, stable@kernel.org
+Message-ID: <200807251815.m6PIF7RA029745@hera.kernel.org>
+
+From: Jan Kara <jack@suse.cz>
+
+commit b48d380541f634663b71766005838edbb7261685 upstream
+
+When quota structure is going to be dropped and it is dirty, quota code tries
+to write it.  If the write fails for some reason (e.  g.  transaction cannot
+be started because the journal is aborted), we try writing again and again and
+again...  Fix the problem by clearing the dirty bit even if the write failed.
+
+(akpm: for 2.6.27, 2.6.26.x and 2.6.25.x)
+
+Signed-off-by: Jan Kara <jack@suse.cz>
+Reviewed-by: dingdinghua <dingdinghua85@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/dquot.c |   16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+--- a/fs/dquot.c
++++ b/fs/dquot.c
+@@ -554,6 +554,8 @@ static struct shrinker dqcache_shrinker 
+  */
+ static void dqput(struct dquot *dquot)
+ {
++      int ret;
++
+       if (!dquot)
+               return;
+ #ifdef __DQUOT_PARANOIA
+@@ -586,7 +588,19 @@ we_slept:
+       if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && dquot_dirty(dquot)) {
+               spin_unlock(&dq_list_lock);
+               /* Commit dquot before releasing */
+-              dquot->dq_sb->dq_op->write_dquot(dquot);
++              ret = dquot->dq_sb->dq_op->write_dquot(dquot);
++              if (ret < 0) {
++                      printk(KERN_ERR "VFS: cannot write quota structure on "
++                              "device %s (error %d). Quota may get out of "
++                              "sync!\n", dquot->dq_sb->s_id, ret);
++                      /*
++                       * We clear dirty bit anyway, so that we avoid
++                       * infinite loop here
++                       */
++                      spin_lock(&dq_list_lock);
++                      clear_dquot_dirty(dquot);
++                      spin_unlock(&dq_list_lock);
++              }
+               goto we_slept;
+       }
+       /* Clear flag in case dquot was inactive (something bad happened) */
diff --git a/queue-2.6.25/series b/queue-2.6.25/series
new file mode 100644 (file)
index 0000000..820573c
--- /dev/null
@@ -0,0 +1,2 @@
+quota-fix-possible-infinite-loop-in-quota-code.patch
+isofs-fix-minor-filesystem-corruption.patch