diff for duplicates of <20100225203834.GD10960@localhost.localdomain> diff --git a/a/1.txt b/N1/1.txt index ed66389..036b00a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,36 +1,27 @@ On Thu, Feb 25, 2010 at 03:29:34PM -0500, Andrew Lutomirski wrote: -> On Thu, Feb 25, 2010 at 3:23 PM, Josef Bacik <josef@redhat.com> wrote= -: +> On Thu, Feb 25, 2010 at 3:23 PM, Josef Bacik <josef@redhat.com> wrote: > > On Thu, Feb 25, 2010 at 03:01:08PM -0500, Andrew Lutomirski wrote: -> >> Mounting btrfs corrupts memory and causes nasty crashes within a f= -ew -> >> seconds. =A0This seems to happen even if the mount fails (note the -> >> unrecognized mount option). =A0This is a regression from 2.6.32, a= -nd +> >> Mounting btrfs corrupts memory and causes nasty crashes within a few +> >> seconds. This seems to happen even if the mount fails (note the +> >> unrecognized mount option). This is a regression from 2.6.32, and > >> I've attached an example. > >> > > -> > And it only happens when you mount a btrfs fs? =A0Can you show me a= - trace of when -> > you mount a btrfs fs with valid mount options? =A0I'd like to see i= -f we're not -> > cleaning up something properly or what. =A0Thanks, ->=20 +> > And it only happens when you mount a btrfs fs? Can you show me a trace of when +> > you mount a btrfs fs with valid mount options? I'd like to see if we're not +> > cleaning up something properly or what. Thanks, +> > Seems OK. Or maybe I just got lucky, but it's crashed every time I > tried to mount with 'acl' before. ->=20 +> > I even went through a couple iterations of trying to mount with > 'xattr' and 'user_xattr', both of which failed. ->=20 +> -Ok it looks like we have a problem kfree'ing the wrong stuff. we kstrd= -up the -options string, but then strsep screws with the pointer, so when we kfr= -ee() it, -we're not giving it the right pointer. Please try this patch, and moun= -t with -o -acl and other such garbage to make sure it actually worked (acl isn't a= - valid +Ok it looks like we have a problem kfree'ing the wrong stuff. we kstrdup the +options string, but then strsep screws with the pointer, so when we kfree() it, +we're not giving it the right pointer. Please try this patch, and mount with -o +acl and other such garbage to make sure it actually worked (acl isn't a valid mount option btw). Let me know if it works. Thanks, Josef @@ -40,27 +31,24 @@ diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 8a1ea6e..f8b4521 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c -@@ -128,7 +128,7 @@ int btrfs_parse_options(struct btrfs_root *root, ch= -ar *options) +@@ -128,7 +128,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) { - struct btrfs_fs_info *info =3D root->fs_info; + struct btrfs_fs_info *info = root->fs_info; substring_t args[MAX_OPT_ARGS]; - char *p, *num; + char *p, *num, *orig; int intarg; - int ret =3D 0; -=20 -@@ -143,6 +143,7 @@ int btrfs_parse_options(struct btrfs_root *root, ch= -ar *options) + int ret = 0; + +@@ -143,6 +143,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) if (!options) return -ENOMEM; -=20 -+ orig =3D options; -=20 - while ((p =3D strsep(&options, ",")) !=3D NULL) { + ++ orig = options; + + while ((p = strsep(&options, ",")) != NULL) { int token; -@@ -280,7 +281,7 @@ int btrfs_parse_options(struct btrfs_root *root, ch= -ar *options) +@@ -280,7 +281,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) } } out: @@ -68,4 +56,3 @@ ar *options) + kfree(orig); return ret; } -=20 diff --git a/a/content_digest b/N1/content_digest index c8a0292..f2da74c 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -11,38 +11,29 @@ "\00:1\0" "b\0" "On Thu, Feb 25, 2010 at 03:29:34PM -0500, Andrew Lutomirski wrote:\n" - "> On Thu, Feb 25, 2010 at 3:23 PM, Josef Bacik <josef@redhat.com> wrote=\n" - ":\n" + "> On Thu, Feb 25, 2010 at 3:23 PM, Josef Bacik <josef@redhat.com> wrote:\n" "> > On Thu, Feb 25, 2010 at 03:01:08PM -0500, Andrew Lutomirski wrote:\n" - "> >> Mounting btrfs corrupts memory and causes nasty crashes within a f=\n" - "ew\n" - "> >> seconds. =A0This seems to happen even if the mount fails (note the\n" - "> >> unrecognized mount option). =A0This is a regression from 2.6.32, a=\n" - "nd\n" + "> >> Mounting btrfs corrupts memory and causes nasty crashes within a few\n" + "> >> seconds. \302\240This seems to happen even if the mount fails (note the\n" + "> >> unrecognized mount option). \302\240This is a regression from 2.6.32, and\n" "> >> I've attached an example.\n" "> >>\n" "> >\n" - "> > And it only happens when you mount a btrfs fs? =A0Can you show me a=\n" - " trace of when\n" - "> > you mount a btrfs fs with valid mount options? =A0I'd like to see i=\n" - "f we're not\n" - "> > cleaning up something properly or what. =A0Thanks,\n" - ">=20\n" + "> > And it only happens when you mount a btrfs fs? \302\240Can you show me a trace of when\n" + "> > you mount a btrfs fs with valid mount options? \302\240I'd like to see if we're not\n" + "> > cleaning up something properly or what. \302\240Thanks,\n" + "> \n" "> Seems OK. Or maybe I just got lucky, but it's crashed every time I\n" "> tried to mount with 'acl' before.\n" - ">=20\n" + "> \n" "> I even went through a couple iterations of trying to mount with\n" "> 'xattr' and 'user_xattr', both of which failed.\n" - ">=20\n" + "> \n" "\n" - "Ok it looks like we have a problem kfree'ing the wrong stuff. we kstrd=\n" - "up the\n" - "options string, but then strsep screws with the pointer, so when we kfr=\n" - "ee() it,\n" - "we're not giving it the right pointer. Please try this patch, and moun=\n" - "t with -o\n" - "acl and other such garbage to make sure it actually worked (acl isn't a=\n" - " valid\n" + "Ok it looks like we have a problem kfree'ing the wrong stuff. we kstrdup the\n" + "options string, but then strsep screws with the pointer, so when we kfree() it,\n" + "we're not giving it the right pointer. Please try this patch, and mount with -o\n" + "acl and other such garbage to make sure it actually worked (acl isn't a valid\n" "mount option btw). Let me know if it works. Thanks,\n" "\n" "Josef\n" @@ -52,34 +43,30 @@ "index 8a1ea6e..f8b4521 100644\n" "--- a/fs/btrfs/super.c\n" "+++ b/fs/btrfs/super.c\n" - "@@ -128,7 +128,7 @@ int btrfs_parse_options(struct btrfs_root *root, ch=\n" - "ar *options)\n" + "@@ -128,7 +128,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)\n" " {\n" - " \tstruct btrfs_fs_info *info =3D root->fs_info;\n" + " \tstruct btrfs_fs_info *info = root->fs_info;\n" " \tsubstring_t args[MAX_OPT_ARGS];\n" "-\tchar *p, *num;\n" "+\tchar *p, *num, *orig;\n" " \tint intarg;\n" - " \tint ret =3D 0;\n" - "=20\n" - "@@ -143,6 +143,7 @@ int btrfs_parse_options(struct btrfs_root *root, ch=\n" - "ar *options)\n" + " \tint ret = 0;\n" + " \n" + "@@ -143,6 +143,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)\n" " \tif (!options)\n" " \t\treturn -ENOMEM;\n" - "=20\n" - "+\torig =3D options;\n" - "=20\n" - " \twhile ((p =3D strsep(&options, \",\")) !=3D NULL) {\n" + " \n" + "+\torig = options;\n" + " \n" + " \twhile ((p = strsep(&options, \",\")) != NULL) {\n" " \t\tint token;\n" - "@@ -280,7 +281,7 @@ int btrfs_parse_options(struct btrfs_root *root, ch=\n" - "ar *options)\n" + "@@ -280,7 +281,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)\n" " \t\t}\n" " \t}\n" " out:\n" "-\tkfree(options);\n" "+\tkfree(orig);\n" " \treturn ret;\n" - " }\n" - =20 + } -9ad0321219feb25522d94ebc89cd0534ff156e01f9e99bcbc1515c8ad6aee8b3 +a938565c48e9c5961c58020ff065620b34b1f413c2d4ab7c9348a65e397a1813
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.