"value":"In the Linux kernel, the following vulnerability has been resolved:\n\nclk: Get runtime PM before walking tree during disable_unused\n\nDoug reported [1] the following hung task:\n\n INFO: task swapper/0:1 blocked for more than 122 seconds.\n Not tainted 5.15.149-21875-gf795ebc40eb8 #1\n \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\n task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008\n Call trace:\n __switch_to+0xf4/0x1f4\n __schedule+0x418/0xb80\n schedule+0x5c/0x10c\n rpm_resume+0xe0/0x52c\n rpm_resume+0x178/0x52c\n __pm_runtime_resume+0x58/0x98\n clk_pm_runtime_get+0x30/0xb0\n clk_disable_unused_subtree+0x58/0x208\n clk_disable_unused_subtree+0x38/0x208\n clk_disable_unused_subtree+0x38/0x208\n clk_disable_unused_subtree+0x38/0x208\n clk_disable_unused_subtree+0x38/0x208\n clk_disable_unused+0x4c/0xe4\n do_one_initcall+0xcc/0x2d8\n do_initcall_level+0xa4/0x148\n do_initcalls+0x5c/0x9c\n do_basic_setup+0x24/0x30\n kernel_init_freeable+0xec/0x164\n kernel_init+0x28/0x120\n ret_from_fork+0x10/0x20\n INFO: task kworker/u16:0:9 blocked for more than 122 seconds.\n Not tainted 5.15.149-21875-gf795ebc40eb8 #1\n \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\"disablesthismessage.\ntask:kworker/u16:0state:Dstack:0pid:9ppid:2flags:0x00000008\nWorkqueue:events_unbounddeferred_probe_work_func\nCalltrace:\n__switch_to+0xf4/0x1f4\n__schedule+0x418/0xb80\nschedule+0x5c/0x10c\nschedule_preempt_disabled+0x2c/0x48\n__mutex_lock+0x238/0x488\n__mutex_lock_slowpath+0x1c/0x28\nmutex_lock+0x50/0x74\nclk_prepare_lock+0x7c/0x9c\nclk_core_prepare_lock+0x20/0x44\nclk_prepare+0x24/0x30\nclk_bulk_prepare+0x40/0xb0\nmdss_runtime_resume+0x54/0x1c8\npm_generic_runtime_resume+0x30/0x44\n__genpd_runtime_resume+0x68/0x7c\ngenpd_runtime_resume+0x108/0x1f4\n__rpm_callback+0x84/0x144\nrpm_callback+0x30/0x88\nrpm_resume+0x1f4/0x52c\nrpm_resume+0x178/0x52c\n__pm_runtime_resume+0x58/0x98\n__device_attach+0xe0/0x170\ndevice_initial_probe+0x1c/0x28\nbus_probe_device+0x3c/0x9c\ndevice_add+0x644/0x814\nmipi_dsi_device_register_full+0xe4/0x170\ndevm_mipi_dsi_device_register_full+0x28/0x70\nti_sn_bridge_probe+0x1dc/0x2c0\nauxiliary_bus_probe+0x4c/0x94\nreally_probe+0xcc/0x2c8\n__driver_probe_device+0xa8/0x130\ndriver_probe_device+0x48/0x110\n__device_attach_driver+0xa4/0xcc\nbus_for_each_drv+0x8c/0xd8\n__device_attach+0xf8/0x170\ndevice_initial_probe+0x1c/0x28\nbus_probe_device+0x3c/0x9c\ndeferred_probe_work_func+0x9c/0xd8\nprocess_one_work+0x148/0x518\nworker_thread+0x138/0x350\nkthread+0x138/0x1e0\nret_from_fork+0x10/0x20\n\nThefirstthreadiswalkingtheclktreeandcalling\nclk_pm_runtime_get()topowerondevicesrequiredtoreadtheclk\nhardwareviastructclk_ops::is_enabled().Thisthreadholdstheclk\nprepare_lock,andistryingtoruntimePMresumeadevice,whenitfinds\nthatthedeviceisintheprocessofresumingsothethreadschedule()s\nawaywaitingforthedevicetofinishresumingbeforecontinuing.The\nsecondthreadisruntimePMresumingthesamedevice,buttheruntime\nresumecallbackiscallingclk_prepare(),tryingtograbthe\nprepare_lockwaitingonthefirstthread.\n\nThisisaclassicABBAdeadlock.Toproperlyfixthedeadlock,wemust\nneverruntimePMresumeorsuspendadevicewiththeclkprepare_lock\nheld.Actuallydoingthatisnearimpossibletodaybecausetheglobal\nprepare_lockwouldhavetobedroppedinthemiddleofthetree,the\ndeviceruntimePMresumed/suspended,andthentheprepare_lockgrabbed\nagaintoensureconsistencyoftheclktreetopology.Ifanything\nchangeswiththeclktreeinthemeantime,we'velostandwillneedto\nstarttheoperationalloveragain.\n\nLuckily,mostofthetimewe'resimplyincrementingordecrementingthe\nruntimePMcountonanactivedevice,sowedon'thavethechanceto\nscheduleawaywiththeprepare_lockheld.Let'sfixthisimmediate\nproblemtha
"value":"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: clk: Obtener PM en tiempo de ejecuci\u00f3n antes de caminar por el \u00e1rbol durante enable_unused Doug inform\u00f3 [1] la siguiente tarea colgada: INFORMACI\u00d3N: intercambio de tareas/0:1 bloqueado durante m\u00e1s de 122 segundos. No contaminado 5.15.149-21875-gf795ebc40eb8 #1 \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" desactiva este mensaje. tarea:swapper/0 estado:D pila: 0 pid: 1 ppid: 0 banderas:0x00000008 Rastreo de llamadas: __switch_to+0xf4/0x1f4 __schedule+0x418/0xb80 Schedule+0x5c/0x10c rpm_resume+0xe0/0x52c rpm_resume+0x178/0x52c __pm_run tiempo_resume+ 0x58/0x98 clk_pm_runtime_get+0x30/0xb0 clk_disable_unused_subtree+0x58/0x208 clk_disable_unused_subtree+0x38/0x208 clk_disable_unused_subtree+0x38/0x208 clk_disable_unused_subtree+0x38/0x208 _disable_unused_subtree+0x38/0x208 clk_disable_unused+0x4c/0xe4 do_one_initcall+0xcc/0x2d8 do_initcall_level+0xa4/0x148 do_initcalls+ 0x5c/0x9c do_basic_setup+0x24/0x30 kernel_init_freeable+0xec/0x164 kernel_init+0x28/0x120 ret_from_fork+0x10/0x20 INFORMACI\u00d3N: tarea kworker/u16:0:9 bloqueada durante m\u00e1s de 122 segundos. No contaminado 5.15.149-21875-gf795ebc40eb8 #1 \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\"desactivaestemensaje.tarea:kworker/u16:0estado:Dpila:0pid:9ppid:2banderas:0x00000008Coladetrabajo:events_unbounddeferred_probe_work_funcRastreodellamadas:__switch_to+0xf4/0x1f4__schedule+0x418/0xb80Schedule+0x5c/0x10cSchedule_preempt_disabled+0x2c/0x48__mutex_lock+0x238/0x488__mutex_lock_slowpath+0x1c/0x28mutex_lock+0x50/0x74clk_prepare_lock+0x7c/0x9cclk_core_prepare_lock+0x20/0x44clk_prepare+0x24/0x30clk_bulk_prepare+0x40/0xb0curr\u00edculum+0x54/0x1c8pm_generic_runtime_resume+0x30/0x44__genpd_runtime_resume+0x68/0x7cgenpd_runtime_resume+0x108/0x1f4__rpm_callback+0x84/0x144rpm_callback+0x30/0x88rpm_resume+0x1f4/0x52crpm_resume+0x178/0x52c__pm_runtime_resume+0x58/0x98__device_attach+0xe0/0x170dispositivo_initial_probe+0x1c/0x28bus_probe_device+0x3c/0x9cdispositivo_add+0x644/0x814mipi_dsi_device_register_full+0xe4/0x170devm_mipi_dsi_device_register_full+0x28/0x70ti_sn_bridge_probe+0x1dc/0x2c0auxiliar_bus_probe+0x4c/0x94very_probe+0xcc/0x2c8__driver_probe_device+0xa8/0x130driver_probe_device+0x48/0x110__device_attach_driver+0xa4/0xccbus_for_each_drv+0x8c/0xd8__device_attach+0xf8/0x170dispositivo_inicial_probe+0x1c/0x28bus_probe_device+0x3c/0x9cdeferred_probe_work_func+0x9c/0xd8Process_one_work+0x148/0x518Workers_thread+0x138/0x350kthread+0x138/0x1e0ret_from_fork+0x10/0x20Elprimerhiloest\u00e1recorriendoel\u00e1rbolclkyllamandoclk_pm_runtime_get()paraencenderdispositivosnecesariosparaleerelhardwareclkatrav\u00e9sdestructclk_ops::is_enabled().Estehilocontieneclkprepare_lockyest\u00e1intentandoejecutarPMparareanudarundispositivo,cuandodescubrequeeldispositivoest\u00e1enprocesodereanudaci\u00f3n,porloquelaprogramaci\u00f3ndelhiloest\u00e1esperandoaqueeldispositivoterminedereanudarseantesdecontinuar.ElsegundohiloesPMentiempodeejecuci\u00f3nquereanudaelmismodispositivo,peroladevoluci\u00f3ndellamadadereanudaci\u00f3nentiempodeejecuci\u00f3nllamaaclk_prepare(),intentandocapturarelprepare_lockqueesperaenelprimerhilo.Esteesuncl\u00e1sicopuntomuertodeABBA.Parasolucionarcorrectamenteelpuntomuerto,nuncadebemosreanudarelPMentiempodeejecuci\u00f3nnisuspenderundispositivoconclkprepare_lockretenido.Enrealidad,haceresoescasiimposiblehoyend\u00edaporqueelprepare_lockglobaltendr\u00edaquecolocarseenelmediodel\u00e1rbol,eltiempodeejecuci\u00f3ndeldispositivoPMsereanudar\u00eda/suspendir\u00edayluegoelprepare_locksetomar\u00edanuevamenteparagarantizarlacoherenciadelatopolog\u00edadel\u00e1rbolclk.Mientrastanto,sialgocambiaconel\u00e1rbolclk,habremosperdidoynecesitaremoscomenzarlaoperaci\u00f3ndenuevo.