Re: [PATCH] missing lock_kernel() and assorted races

Alexander Viro (viro@math.psu.edu)
Fri, 30 Apr 1999 05:31:41 -0400 (EDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-1566137451-925464701=:17081
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Fri, 30 Apr 1999, Alan Cox wrote:

> > Linus, we have several problems under arch/:
> >
> > The architectures where you made the most changes don't even compile
> > in 2.2.7 and haven't been updated in nearly half of a year :-)
>
> And some of the bugs appear to be in the relevant CVS trees too - although
> the mips doesnt do SMP so its harmless

Harmless it might be, if it would be restricted to missing lock_kernel();-/
sysirix.c in both trees has UP-affecting bugs. That is, irix_fstatvfs()
and irix_fstatvfs64() are oopsable; irix_ngetdents(), irix_getdents64()
and irix_ngetdents64() do not protect ->readdir() with semaphore. Those
bugs are present both in 1.16 (in mips tree) and 1.12 (in main tree).
I'm submitting the patch to Ralf and I've merged relevant changes into the
patch against the main tree. Patches attached.
Cheers,
Al

---559023410-1566137451-925464701=:17081
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=sysirix-patch
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.10.9904300531410.17081@weyl.math.psu.edu>
Content-Description: (mips tree)
Content-Disposition: attachment; filename=sysirix-patch

LS0tIHN5c2lyaXguYy5vbGQJU2F0IEZlYiAyMCAyMDo0MDozMyAxOTk5DQor
Kysgc3lzaXJpeC5jCUZyaSBBcHIgMzAgMDU6MTk6NTEgMTk5OQ0KQEAgLTcz
Niw2ICs3MzYsNyBAQA0KIAlpbnQgZXJyb3IsIGk7DQogDQogCS8qIFdlIGRv
bid0IHN1cHBvcnQgdGhpcyBmZWF0dXJlIHlldC4gKi8NCisJbG9ja19rZXJu
ZWwoKTsNCiAJaWYoZnNfdHlwZSkgew0KIAkJZXJyb3IgPSAtRUlOVkFMOw0K
IAkJZ290byBvdXQ7DQpAQCAtODI0LDcgKzgyNS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SBmaWxlLT5mX29wLT5yZWFkZGlyKGZpbGUsICZidWYsIGly
aXhfZmlsbGRpcjY0KTsNCisJdXAoJmlub2RlLT5pX3NlbSk7DQogCWlmIChl
cnJvciA8IDApDQogCQlnb3RvIG91dF9mOw0KIAlsYXN0ZGlyZW50ID0gYnVm
LnByZXZpb3VzOw0KQEAgLTIyMzUsNyArMjIzNiw5IEBADQogCWJ1Zi5wcmV2
aW91cyA9IE5VTEw7DQogCWJ1Zi5jb3VudCA9IGNudDsNCiAJYnVmLmVycm9y
ID0gMDsNCisJZG93bigmaW5vZGUtPmlfc2VtKTsNCiAJZXJyb3IgPSBmaWxl
LT5mX29wLT5yZWFkZGlyKGZpbGUsICZidWYsIGlyaXhfZmlsbGRpcjY0KTsN
CisJdXAoJmlub2RlLT5pX3NlbSk7DQogCWlmIChlcnJvciA8IDApDQogCQln
b3RvIG91dF9mOw0KIAlsYXN0ZGlyZW50ID0gYnVmLnByZXZpb3VzOw0K
---559023410-1566137451-925464701=:17081
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=arch-patch-2a
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.10.9904300531411.17081@weyl.math.psu.edu>
Content-Description: new variant of sysirix.c part of patch (main tree)
Content-Disposition: attachment; filename=arch-patch-2a

ZGlmZiAtdXJOIGxpbnV4LTIuMi43L2FyY2gvbWlwcy9rZXJuZWwvc3lzaXJp
eC5jIGxpbnV4LWJpcmQuYXJjaC9hcmNoL21pcHMva2VybmVsL3N5c2lyaXgu
Yw0KLS0tIGxpbnV4LTIuMi43L2FyY2gvbWlwcy9rZXJuZWwvc3lzaXJpeC5j
CVN1biBNYXIgMjggMTQ6NDU6MzMgMTk5OQ0KKysrIGxpbnV4LWJpcmQuYXJj
aC9hcmNoL21pcHMva2VybmVsL3N5c2lyaXguYwlUaHUgQXByIDI5IDIyOjU5
OjA3IDE5OTkNCkBAIC0yMyw2ICsyMyw3IEBADQogI2luY2x1ZGUgPGxpbnV4
L3Ntc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ZiwgaXJpeF9maWxsZGlyNjQpOw0KKwl1cCgmaW5vZGUt
Pmlfc2VtKTsNCiAJaWYgKGVycm9yIDwgMCkNCi0JCWdvdG8gb3V0Ow0KKwkJ
Z290byBvdXRfZjsNCiAJbGFzdGRpcmVudCA9IGJ1Zi5wcmV2aW91czsNCiAJ
aWYgKCFsYXN0ZGlyZW50KSB7DQogCQllcnJvciA9IGJ1Zi5lcnJvcjsNCi0J
CWdvdG8gb3V0Ow0KKwkJZ290byBvdXRfZjsNCiAJfQ0KIAlsYXN0ZGlyZW50
LT5kX29mZiA9ICh1NjQpIGZpbGUtPmZfcG9zOw0KICNpZmRlZiBERUJVR19H
RVRERU5UUw0KQEAgLTIyNTQsNiArMjI1MSw4IEBADQogI2VuZGlmDQogCWVy
cm9yID0gY250IC0gYnVmLmNvdW50Ow0KIA0KK291dF9mOg0KKwlmcHV0KGZp
bGUpOw0KIG91dDoNCiAJdW5sb2NrX2tlcm5lbCgpOw0KIAlyZXR1cm4gZXJy
b3I7DQo=
---559023410-1566137451-925464701=:17081--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/