]> www.infradead.org Git - users/mchehab/rasdaemon.git/commit
ras-events: quit loop in read_ras_event when kbuf data is broken
authorhubin <hubin73@huawei.com>
Thu, 18 May 2023 08:14:41 +0000 (16:14 +0800)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 23 Oct 2023 08:43:26 +0000 (10:43 +0200)
commit794530fbf270eae9f6f43c6d0bbd3ec6f2b210f3
tree67cd45d35624b10d01b488188898b691f9263439
parenta247baf7110ab6427259eb1421a103e2021a8735
ras-events: quit loop in read_ras_event when kbuf data is broken

when kbuf data is broken, kbuffer_next_event() may move kbuf->index back to
the current kbuf->index position, causing dead loop.

In this situation, rasdaemon will repeatedly parse an invalid event, and
print warning like "ug! negative record size -8!", pushing cpu utilization
rate to 100%.

when kbuf data is broken, discard current page and continue reading next page
kbuf.

Signed-off-by: hubin <hubin73@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
ras-events.c