mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Daniel Phillips <phillips@innominate.de>
Cc: Nathan Scott <nathans@wobbly.melbourne.sgi.com>,
	linux-kernel@vger.kernel.org
Subject: Re: More better in mount(2)
Date: Fri, 5 Jan 2001 13:26:16 -0700 (MST)	[thread overview]
Message-ID: <200101052026.f05KQGx20058@webber.adilger.net> (raw)
In-Reply-To: <3A55DF78.F92AC570@innominate.de> "from Daniel Phillips at Jan 5, 2001 03:51:36 pm"

Daniel writes:
> [re strtok for mount option parsing]
> 
> BUGS        Never use this function. If you do, note that:  
>             This function modifies its first argument.  
>             The identity of the delimiting character is lost.  
>             This functions cannot be used on constant  strings.  
>             The  strtok() function uses a static buffer while
>             parsing, so it's not thread safe. Use  strtok_r()
>             if this matters to you.

Luckily, when mount(8) is trying to mount a filesystem, it passes the
mount options into the kernel each time, which does copy_from_user(),
so the fact that strtok() breaks the data is OK.  The only time this
is bad is with Stephen's ext3 rootflags option...

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-01-05 20:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <NBBBJGOOMDFADJDGDCPHIEPACJAA.law@sgi.com>
     [not found] ` <10101051142.ZM11680@wobbly.melbourne.sgi.com>
     [not found]   ` <01010503292006.00477@gimli>
     [not found]     ` <10101051340.ZM14895@wobbly.melbourne.sgi.com>
2001-01-05 14:51       ` Daniel Phillips
2001-01-05 20:26         ` Andreas Dilger [this message]
2001-01-08 14:06         ` xfs mount opts (was: More better in mount(2)) Nathan Scott

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=200101052026.f05KQGx20058@webber.adilger.net \
    --to=adilger@turbolinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathans@wobbly.melbourne.sgi.com \
    --cc=phillips@innominate.de \
    /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

all inboxes | Powered by JetHome®