[patch] mempool-2.5.1-D1

Ingo Molnar (mingo@elte.hu)
Fri, 14 Dec 2001 19:14:54 +0100 (CET)


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.

--8323328-1766233386-1008353340=:12688
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LNX.4.33.0112141909041.12688@localhost.localdomain>

there is another thinko in the mempool code, reported by Suparna
Bhattacharya. If mempool_alloc() is called from an IRQ context then we
return too early. The correct behavior is to allocate GFP_ATOMIC, if that
fails then we look at the pool and return an element, or return NULL.

Ingo

--8323328-1766233386-1008353340=:12688
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="mempool-2.5.1-D1"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.33.0112141914540.12688@localhost.localdomain>
Content-Description:
Content-Disposition: attachment; filename="mempool-2.5.1-D1"

LS0tIGxpbnV4L21tL21lbXBvb2wuYy5vcmlnCUZyaSBEZWMgMTQgMTY6NTU6
MTIgMjAwMQ0KKysrIGxpbnV4L21tL21lbXBvb2wuYwlGcmkgRGVjIDE0IDE3
OjAzOjUyIDIwMDENCkBAIC0xNzYsNyArMTc2LDggQEANCiAgKg0KICAqIHRo
aXMgZnVuY3Rpb24gb25seSBzbGVlcHMgaWYgdGhlIGFsbG9jX2ZuIGZ1bmN0
aW9uIHNsZWVwcyBvcg0KICAqIHJldHVybnMgTlVMTC4gTm90ZSB0aGF0IGR1
ZSB0byBwcmVhbGxvY2F0aW9uLCB0aGlzIGZ1bmN0aW9uDQotICogKm5ldmVy
KiBmYWlscy4NCisgKiAqbmV2ZXIqIGZhaWxzIHdoZW4gY2FsbGVkIGZyb20g
cHJvY2VzcyBjb250ZXh0cy4gKGl0IG1pZ2h0DQorICogZmFpbCBpZiBjYWxs
ZWQgZnJvbSBhbiBJUlEgY29udGV4dC4pDQogICovDQogdm9pZCAqIG1lbXBv
b2xfYWxsb2MobWVtcG9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29sX2RhdGEpOw0K
KwkJaWYgKGxpa2VseShlbGVtZW50ICE9IE5VTEwpKQ0KKwkJCXJldHVybiBl
bGVtZW50Ow0KKwl9DQogDQogCS8qDQogCSAqIEtpY2sgdGhlIFZNIGF0IHRo
aXMgcG9pbnQuDQpAQCAtMjE3LDEwICsyMTQsMTIgQEANCiAJCWxpc3RfZGVs
KHRtcCk7DQogCQllbGVtZW50ID0gdG1wOw0KIAkJcG9vbC0+Y3Vycl9uci0t
Ow0KLQkJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmcG9vbC0+bG9jaywgZmxh
Z3MpOw0KLQ0KLQkJcmV0dXJuIGVsZW1lbnQ7DQorCQlnb3RvIG91dF91bmxv
Y2s7DQogCX0NCisJLyogV2UgbXVzdCBub3Qgc2xlZXAgaW4gdGhlIEdGUF9B
VE9NSUMgY2FzZSAqLw0KKwlpZiAoZ2ZwX21hc2sgPT0gZ2ZwX25vd2FpdCkN
CisJCWdvdG8gb3V0X3VubG9jazsNCisNCiAJYWRkX3dhaXRfcXVldWVfZXhj
bHVzaXZlKCZwb29sLT53YWl0LCAmd2FpdCk7DQogCXNldF90YXNrX3N0YXRl
KGN1cnJlbnQsIFRBU0tfVU5JTlRFUlJVUFRJQkxFKTsNCiANCkBAIC0yMzYs
NiArMjM1LDkgQEANCiAJcmVtb3ZlX3dhaXRfcXVldWUoJnBvb2wtPndhaXQs
ICZ3YWl0KTsNCiANCiAJZ290byByZXBlYXRfYWxsb2M7DQorb3V0X3VubG9j
azoNCisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmcG9vbC0+bG9jaywgZmxh
Z3MpOw0KKwlyZXR1cm4gZWxlbWVudDsNCiB9DQogDQogLyoqDQo=
--8323328-1766233386-1008353340=:12688--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/