From: Andries.Brouwer@cwi.nl
To: Andries.Brouwer@cwi.nl, COTTE@de.ibm.com,
alan@lxorguk.ukuu.org.uk, torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Re: BUG: race-cond with partition-check
Date: Fri, 8 Jun 2001 11:02:11 +0200 (MET DST) [thread overview]
Message-ID: <UTC200106080902.LAA228227.aeb@vlet.cwi.nl> (raw)
From COTTE@de.ibm.com Fri Jun 8 09:57:01 2001
>Well, among the irrelevant details you left out is the fact that
>it is not
> blk_size[dev->major] =3D NULL;
>but
> if(!dev->sizes)
> blk_size[dev->major] =3D NULL;
Well, this is absoloutely right, the behaviour to clear blk_size
when dev->sizes
is NULL looks sensible to me. But seven lines below it says
-unconditionaly-:
blk_size[dev->major] =3D NULL;
Ah, yes. This second assignment can just be deleted, I suppose.
--- partitions/check.c~ Thu May 31 22:26:56 2001
+++ partitions/check.c Fri Jun 8 10:44:02 2001
@@ -418,11 +418,10 @@
blk_size[dev->major] = NULL;
dev->part[first_minor].nr_sects = size;
- /* No Such Agen^Wdevice or no minors to use for partitions */
+ /* No such device or no minors to use for partitions */
if (!size || minors == 1)
return;
- blk_size[dev->major] = NULL;
check_partition(dev, MKDEV(dev->major, first_minor), 1 + first_minor);
/*
[In the good old days it wasn't there. It was added in 1.3.19,
don't know why, probably as a safeguard to make sure nobody
used these values while they are being set up. But someone
was bit by the assignment, since it is not undone if we take
the return, so in 2.3.48 the assignment was moved past the
return, with a conditional assignment before it. I believe
you are right, and we only want the conditional assignment.]
Andries
next reply other threads:[~2001-06-08 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-08 9:02 Andries.Brouwer [this message]
2001-06-08 9:31 ` Malcolm Beattie
2001-06-08 9:21 COTTE
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=UTC200106080902.LAA228227.aeb@vlet.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=COTTE@de.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®