From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: torvalds@transmeta.com, alan@lxorguk.ukuu.org.uk
Cc: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: [PATCH] Fix sys_mount not to free_page(0)
Date: Fri, 6 Aug 1999 16:12:32 -0700 (PDT) [thread overview]
Message-ID: <199908062312.QAA00496@google.engr.sgi.com> (raw)
Linus/Alan,
Could you please take this patch into the 2.2 and 2.3 streams? It
basically prevents sys_mount() from trying to invoke free_page(0).
Note that copy_mount_options() might return 0 both in the case
where it allocates a page, and in the case it does not.
Thanks.
Kanoj
kanoj@engr.sgi.com
--- /usr/tmp/p_rdiff_a005Eo/super.c Fri Aug 6 16:01:57 1999
+++ fs/super.c Fri Aug 6 15:00:35 1999
@@ -1037,7 +1037,8 @@
retval = do_remount(dir_name,
new_flags & ~MS_MGC_MSK & ~MS_REMOUNT,
(char *) page);
- free_page(page);
+ if (page)
+ free_page(page);
goto out;
}
@@ -1045,7 +1046,8 @@
if (retval < 0)
goto out;
fstype = get_fs_type((char *) page);
- free_page(page);
+ if (page)
+ free_page(page);
retval = -ENODEV;
if (!fstype)
goto out;
@@ -1099,7 +1101,8 @@
}
retval = do_mount(dev, dev_name, dir_name, fstype->name, flags,
(void *) page);
- free_page(page);
+ if (page)
+ free_page(page);
if (retval)
goto clean_up;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next reply other threads:[~1999-08-06 23:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-06 23:12 Kanoj Sarcar [this message]
1999-08-06 23:18 ` Linus Torvalds
1999-08-06 23:51 ` Kanoj Sarcar
1999-08-07 0:00 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199908062312.QAA00496@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox