---1463801846-415410720-1010008962=:12316
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
In the beginning of last year I reported a solid freeze problem with Linux
when I moved from UP to SMP. Some bughunting especially with kdb an hints
from AM I was able to nail it down to some SMP unsafe irq table handling
in serial.c.
I submitted the attached patch to Ted but that never made it to the
kernel. It _really_ solved the problem as I had a crash sometimes within
15 minutes and after applying it I reached uptimes over 100 days.
The problem is however that this patch applies to Linux-2.4.4 and serial.c
has had some tweaks in the meantime. Please merge it.
Kees
---1463801846-415410720-1010008962=:12316
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="patch_serial.c_spinlocks"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.33.0201022302420.12316@schoen3.schoen.nl>
Content-Description:
Content-Disposition: attachment; filename="patch_serial.c_spinlocks"
LS0tIGxpbnV4MjQ0Lm9yZy9kcml2ZXJzL2NoYXIvc2VyaWFsLmMJU2F0IEFw
ciAxNCAwNToyNjowNyAyMDAxDQorKysgbGludXgvZHJpdmVycy9jaGFyL3Nl
cmlhbC5jCVRodSBKdW4gMjggMTU6MTM6NTggMjAwMQ0KQEAgLTE4OSw2ICsx
ODksNyBAQA0KICNpbmNsdWRlIDxsaW51eC9pb3BvcnQuaD4NCiAjaW5jbHVk
ZSA8bGludXgvbW0uaD4NCiAjaW5jbHVkZSA8bGludXgvc2xhYi5oPg0KKyNp
bmNsdWRlIDxsaW51eC9zcGlubG9jay5oPg0KICNpZiAoTElOVVhfVkVSU0lP
Tl9DT0RFID49IDEzMTM0MykNCiAjaW5jbHVkZSA8bGludXgvaW5pdC5oPg0K
ICNlbmRpZg0KQEAgLTExOTYsNyArMTE5Nyw3IEBADQogCWlmICghcGFnZSkN
CiAJCXJldHVybiAtRU5PTUVNOw0KIA0KLQlzYXZlX2ZsYWdzKGZsYWdzKTsg
Y2xpKCk7DQorCXNwaW5fbG9ja19pcnFzYXZlKCAmaW5mby0+aXJxX3NwaW5s
b2NrLCBmbGFncyk7DQogDQogCWlm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2hpZnQgPSBzdGF0ZS0+
aW9tZW1fcmVnX3NoaWZ0Ow0KKwlpbmZvLT5pcnFfc3BpbmxvY2s9IChzcGlu
bG9ja190KSBTUElOX0xPQ0tfVU5MT0NLRUQ7DQogCXF1b3QgPSBzdGF0ZS0+
YmF1ZF9iYXNlIC8gYmF1ZDsNCiAJY3ZhbCA9IGNmbGFnICYgKENTSVpFIHwg
Q1NUT1BCKTsNCiAjaWYgZGVmaW5lZChfX3Bvd2VycGNfXykgfHwgZGVmaW5l
ZChfX2FscGhhX18pDQotLS0gbGludXgyNDQub3JnL2luY2x1ZGUvbGludXgv
c2VyaWFsUC5oCVNhdCBBcHIgMjggMDA6NTA6MjEgMjAwMQ0KKysrIGxpbnV4
L2luY2x1ZGUvbGludXgvc2VyaWFsUC5oCVRodSBKdW4gMjggMTU6MDc6NTQg
MjAwMQ0KQEAgLTgzLDYgKzgzLDcgQEANCiAJbG9uZwkJCXBncnA7IC8qIHBn
cnAgb2Ygb3BlbmluZyBwcm9jZXNzICovDQogIAlzdHJ1Y3QgY2lyY19idWYJ
CXhtaXQ7DQogIAlzcGlubG9ja190CQl4bWl0X2xvY2s7DQorIAlzcGlubG9j
a190CQlpcnFfc3BpbmxvY2s7DQogCXU4CQkJKmlvbWVtX2Jhc2U7DQogCXUx
NgkJCWlvbWVtX3JlZ19zaGlmdDsNCiAJaW50CQkJaW9fdHlwZTsNCg==
---1463801846-415410720-1010008962=:12316--
-
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/