Hi Richard,
the previous version of my patch did contain a bug,
caused by incorrect parameter order when calling
__devfs_unregister_major. The symptom was, that
major numbers registered with devfs_register_*dev
but not allocated with devfs_alloc_major were not
freed by calling devfs_unregister_*dev. This is
now fixed. Sorry, the patch is attached (due to Notes
messing up with whitespace).
(See attached file: linux-2.4.17-devfs_fixup.diff)
Richard, I would appreciate it if you could finally
look into this.
mit freundlichem Gru=DF / with kind regards
Carsten Otte
IBM Deutschland Entwicklung GmbH
Linux for eServer development - device driver team
Phone: +49/07031/16-4076
IBM internal phone: *120-4076
-- We are Linux. Resistance indicates that you're missing the point!=--0__=4EBBE111DFD063818f9e8a93df938690918c4EBBE111DFD06381 Content-type: application/octet-stream; name="linux-2.4.17-devfs_fixup.diff" Content-Disposition: attachment; filename="linux-2.4.17-devfs_fixup.diff" Content-transfer-encoding: base64
ZGlmZiAtcnVOIGxpbnV4LTIuNC4xNy1zZG1hbnkvZnMvZGV2ZnMvYmFzZS5jIGxpbnV4LTIuNC4x Ny1zZG1hbnktZGV2ZnNfZml4dXAvZnMvZGV2ZnMvYmFzZS5jCi0tLSBsaW51eC0yLjQuMTctc2Rt YW55L2ZzL2RldmZzL2Jhc2UuYwlXZWQgRmViIDEzIDEzOjI1OjUwIDIwMDIKKysrIGxpbnV4LTIu NC4xNy1zZG1hbnktZGV2ZnNfZml4dXAvZnMvZGV2ZnMvYmFzZS5jCVR1ZSBNYXIgMTIgMjA6MTU6 NTMgMjAwMgpAQCAtMjE4Niw3ICsyMTg2LDcgQEAKIH0gICAvKiAgRW5kIEZ1bmN0aW9uIGRldmZz X2dldF9uYW1lICAqLwogCiAKLS8qKnkKKy8qKgogICoJZGV2ZnNfcmVnaXN0ZXJfY2hyZGV2IC0g T3B0aW9uYWxseSByZWdpc3RlciBhIGNvbnZlbnRpb25hbCBjaGFyYWN0ZXIgZHJpdmVyLgogICoJ QG1ham9yOiBUaGUgbWFqb3IgbnVtYmVyIGZvciB0aGUgZHJpdmVyLgogICoJQG5hbWU6IFR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sMjEgQEAKIAkJCSAgIHN0cnVjdCBibG9ja19k ZXZpY2Vfb3BlcmF0aW9ucyAqYmRvcHMpCiB7CiAgICAgdW5zaWduZWQgaW50IG5ld19tYWpvcjsK LSAgICBpZiAoYm9vdF9vcHRpb25zICYgT1BUSU9OX09OTFkpIHJldHVybiAwOwotICAgIGlmICht YWpvcikKLQluZXdfbWFqb3IgPSBtYWpvcjsKLSAgICBlbHNlCi0JbmV3X21ham9yID0gZGV2ZnNf YWxsb2NfbWFqb3IgKERFVkZTX1NQRUNJQUxfQkxLKTsKLSAgICByZXR1cm4gcmVnaXN0ZXJfYmxr ZGV2IChuZXdfbWFqb3IsIG5hbWUsIGJkb3BzKTsKKyAgICBpbnQgcmVzdWx0OworICAgIGlmIChi b290X29wdGlvbnMgJiBPUFRJT05fT05MWSkgCisJICAgIHJldHVybiAwOworICAgIG5ld19tYWpv ciA9IF9fZGV2ZnNfcmVnaXN0ZXJfbWFqb3IgKG1ham9yLCBERVZGU19TUEVDSUFMX0JMSyk7Cisg ICAgaWYgKG5ld19tYWpvciA8IDApCisJICAgIHJldHVybiBuZXdfbWFqb3I7CisgICAgcmVzdWx0 PXJlZ2lzdGVyX2Jsa2RldiAobmV3X21ham9yLCBuYW1lLCBiZG9wcyk7CisgICAgaWYgKHJlc3Vs dCA8IDApIHsKKwkgICAgX19kZXZmc191bnJlZ2lzdGVyX21ham9yIChtYWpvciwgREVWRlNfU1BF Q0lBTF9CTEspOworCSAgICByZXR1cm4gcmVzdWx0OworICAgIH0KKyAgICBpZiAobWFqb3IpIAor CSAgICByZXR1cm4gMDsKKyAgICBlbHNlIAorCSAgICByZXR1cm4gbmV3X21ham9yOwogfSAgIC8q ICBFbmQgRnVuY3Rpb24gZGV2ZnNfcmVnaXN0ZXJfYmxrZGV2ICAqLwogCiAKQEAgLTIyNDYsOCAr MjI2NCw5IEBACiAKIGludCBkZXZmc191bnJlZ2lzdGVyX2NocmRldiAodW5zaWduZWQgaW50IG1h am9yLCBjb25z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bmQgZG9lcyBub3Qg YmxvY2suCisgKi8KKwordm9pZCBfX2RldmZzX3VucmVnaXN0ZXJfbWFqb3IgKGludCBtYWpvciwg Y2hhciB0eXBlKQoreworICAgIHN0cnVjdCBtYWpvcl9saXN0ICpsaXN0OworCisgICAgaWYgKG1h am9yIDwgMCkgCisJICAgIHJldHVybjsKKyAgICBsaXN0ID0gKHR5cGUgPT0gREVWRlNfU1BFQ0lB TF9DSFIpID8gJmNoYXJfbWFqb3JfbGlzdCA6ICZibG9ja19tYWpvcl9saXN0OworICAgIHNwaW5f bG9jayAoJmxpc3QtPmxvY2spOworICAgIHN3aXRjaCAobGlzdC0+c3RhdGVbbWFqb3JdKSB7Cisg ICAgY2FzZSBERVZGU19NQUpPUl9GUkVFOgorCSAgICBwcmludGsgKEtFUk5fRVJSIF9fRlVOQ1RJ T05fXyAiKCk6IG1ham9yICVkIHdhcyBmcmVlXG4iLAorCQkgICAgbWFqb3IpOworCSAgICBicmVh azsKKyAgICBjYXNlIERFVkZTX01BSk9SX0FMTE9DRUQ6CisgICAgY2FzZSBERVZGU19NQUpPUl9T VEFUSUM6CisJICAgIC8qIG1ham9yIGlzIHN0aWxsIGluIHVzZSAtPiBkbyBub3QgZnJlZSAqLwor CSAgICBicmVhazsKKyAgICBjYXNlIERFVkZTX01BSk9SX1JFR0lTVEVSRUQ6CisJICAgIGxpc3Qt PnN0YXRlW21ham9yXSA9IERFVkZTX01BSk9SX0ZSRUU7CisJICAgIGJyZWFrOworICAgIGRlZmF1 bHQ6CisJICAgIC8qIGluY29uc2lzdGVuY3kgaW4gbGlzdC0+c3RhdGUgYXJyYXkgKi8KKwkgICAg c3Bpbl91bmxvY2sgKCZsaXN0LT5sb2NrKTsKKwkgICAgQlVHKCk7CisgICAgfQorICAgIHNwaW5f dW5sb2NrICgmbGlzdC0+bG9jayk7Cit9ICAgLyogIEVuZCBGdW5jdGlvbiBkZXZmc191bnJlZ2lz dGVyX21ham9yICAqLworCiAKIHN0cnVjdCBta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JU1RFUkVE IDMKIAogI2lmZGVmIENPTkZJR19CTEtfREVWX0lOSVRSRAogIyAgZGVmaW5lIFJPT1RfREVWSUNF X05BTUUgKChyZWFsX3Jvb3RfZGV2ID09Uk9PVF9ERVYpID8gcm9vdF9kZXZpY2VfbmFtZTpOVUxM KQpAQCAtMTE1LDggKzExOCwxMSBAQAogCQkJCSAgIHVuc2lnbmVkIGludCBmbGFncywgdW5zaWdu ZWQgaW50IG1ham9yLAogCQkJCSAgIHVuc2lnbmVkIGludCBtaW5vcl9zdGFydCwKIAkJCQkgICB1 bW9kZV90IG1vZGUsIHZvaWQgKm9wcywgdm9pZCAqaW5mbyk7CitleHRlcm4gdm9pZCBkZXZmc19p bml0X21ham9yX2xpc3RzICh2b2lkKTsKIGV4dGVybiBpbnQgZGV2ZnNfYWxsb2NfbWFqb3IgKGNo YXIgdHlwZSk7CiBleHRlcm4gdm9pZCBkZXZmc19kZWFsbG9jX21ham9yIChjaGFyIHR5cGUsIGlu dCBtYWpvcik7CitleHRlcm4gaW50IF9fZGV2ZnNfcmVnaXN0ZXJfbWFqb3IgKGludCBtYWpvciwg Y2hhciB0eXBlKTsKK2V4dGVybiB2b2lkIF9fZGV2ZnNfdW5yZWdpc3Rlcl9tYWpvciAoaW50IG1h am9yLCBjaGFyIHR5cGUpOwogZXh0ZXJuIGtkZXZfdCBkZXZmc19hbGxvY19kZXZudW0gKGNoYXIg dHlwZSk7CiBleHRlcm4gdm9pZCBkZXZmc19kZWFsbG9jX2Rldm51bSAoY2hhciB0eXBlLCBrZGV2 X3QgZGV2bnVtKTsKIGV4dGVybiBpbnQgZGV2ZnNfYWxsb2NfdW5pcXVlX251bWJlciAoc3RydWN0 IHVuaXF1ZV9udW1zcGFjZSAqc3BhY2UpOwo=
--0__=4EBBE111DFD063818f9e8a93df938690918c4EBBE111DFD06381--
- 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/