Skip to contentSkip to conversation

isofs: fix minor filesystem corruption

PATCH In review Adam Greenblatt 2 participants 2 messages Jul 16, 2008 Isofs filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isofs: fix minor filesystem corruption

Some iso9660 images contain files with rockridge data that is either incorrect or incompletely parsed. Prior to commit f2966632a134e865db3c819346a1dc7d96e05309, (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.

---

fs/isofs/rock.c 2008-07-15 18:16:56.000000000 -1000 renamed from fs/isofs/rock.c.orig 2008-07-15 18:19:36.000000000 -1000 +1 -1
@@ -217,7 +217,7 @@ repeat:
               rs.chr += rr->len;
               rs.len -= rr->len;
               if (rs.len < 0)
-                       goto eio;       /* corrupted isofs */
+                       goto out;       /* corrupted isofs */
 
               switch (sig) {
               case SIG('R', 'R'):
#1 lore raw

Hi Adam,

Quoted 23 lines · Adam Greenblatt

Some iso9660 images contain files with rockridge data that is either incorrect or
incompletely parsed. Prior to commit f2966632a134e865db3c819346a1dc7d96e05309,
(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.

---

fs/isofs/rock.c 2008-07-15 18:16:56.000000000 -1000 repeat: · line 223

Quoted 8 lines
fs/isofs/rock.c 2008-07-15 18:16:56.000000000 -1000 renamed from fs/isofs/rock.c.orig 2008-07-15 18:19:36.000000000 -1000 +1 -1
@@ -217,7 +217,7 @@ repeat:
              rs.chr += rr->len;
              rs.len -= rr->len;
              if (rs.len < 0)
-                       goto eio;       /* corrupted isofs */
+                       goto out;       /* corrupted isofs */
 
              switch (sig) {
              case SIG('R', 'R'):

I suppose you want to fix parse_rock_ridge_inode_internal() also for consistency and add a comment there why we don't fail for that case.