🇰🇷 한글 설명
리눅스 커널의 fsl-edma 드라이버에서 .remove() 함수가 자동으로 관리되는 클록을 명시적으로 비활성화하여 경고 메시지를 발생시키는 결함이 있습니다. 이는 devm_clk_get_enabled()로 할당된 리소스를 중복 해제함으로써 시스템 로그에 불필요한 경고와 추적 정보를 남깁니다.
💡 쉬운 설명
드라이버가 제거될 때 이미 자동으로 정리된 클록을 다시 끄려다 오류가 발생하는 문제입니다. 이는 시스템 성능에는 직접적인 영향을 주지 않지만, 로그를 혼란스럽게 하고 잠재적인 불안정성을 초래할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: fsl-edma: don't explicitly disable clocks in .remove()
The clocks in fsl_edma_engine::muxclk are allocated and enabled with
devm_clk_get_enabled(), which automatically cleans these resources up,
but these clocks are also manually disabled in fsl_edma_remove(). This
causes warnings on driver removal for each clock:
edma_module already disabled
WARNING: CPU: 0 PID: 418 at drivers/clk/clk.c:1200 clk_core_disable+0x198/0x1c8
[...]
Call trace:
clk_core_disable+0x198/0x1c8 (P)
clk_disable+0x34/0x58
fsl_edma_remove+0x74/0xe8 [fsl_edma]
[...]
---[ end trace 0000000000000000 ]---
edma_module already unprepared
WARNING: CPU: 0 PID: 418 at drivers/clk/clk.c:1059 clk_core_unprepare+0x1f8/0x220
[...]
Call trace:
clk_core_unprepare+0x1f8/0x220 (P)
clk_unprepare+0x34/0x58
fsl_edma_remove+0x7c/0xe8 [fsl_edma]
[...]
---[ end trace 0000000000000000 ]---
Fix these warnings by removing the unnecessary fsl_disable_clocks() call
in fsl_edma_remove().
📍 영향받는 시스템
Linux kernel (fsl-edma 드라이버 사용 시스템)
⚔️ 공격 벡터
로컬 드라이버 제거 시 경고 발생 (악용 가능성 낮음)
🛡️ 대응 방법
fsl_edma_remove() 함수에서 불필요한 fsl_disable_clocks() 호출을 제거하는 커널 패치 적용
🔧 검증 코드
명령어 실행 후 결과가 없으면 패치가 적용된 상태이며, 결과가 나오면 패치가 필요함을 의미합니다.
grep -r 'fsl_disable_clocks' drivers/dma/fsl-edma.c 2>/dev/null