In the Linux kernel, the following vulnerability has been resolved:
gpio: xilinx: Convert gpio_lock to raw spinlock
irq_chip functions may be called in raw spinlock context. Therefore, we must also use a raw spinlock for our own internal locking.
This fixes the following lockdep splat:
[ 5.349336] ============================= [ 5.353349] [ BUG: Invalid wait context ] [ 5.357361] 6.13.0-rc5+ #69 Tainted: G W [ 5.363031] ----------------------------- [ 5.367045] kworker/u17:1/44 is trying to lock: [ 5.371587] ffffff88018b02c0 (&chip->gpiolock){....}-{3:3}, at: xgpioirqunmask (drivers/gpio/gpio-xilinx.c:433 (discriminator 8)) [ 5.380079] other info that might help us debug this: [ 5.385138] context-{5:5} [ 5.387762] 5 locks held by kworker/u17:1/44: [ 5.392123] #0: ffffff8800014958 ((wqcompletion)eventsunbound){+.+.}-{0:0}, at: processonework (kernel/workqueue.c:3204) [ 5.402260] #1: ffffffc082fcbdd8 (deferredprobework){+.+.}-{0:0}, at: processonework (kernel/workqueue.c:3205) [ 5.411528] #2: ffffff880172c900 (&dev->mutex){....}-{4:4}, at: _deviceattach (drivers/base/dd.c:1006) [ 5.419929] #3: ffffff88039c8268 (requestclass#2){+.+.}-{4:4}, at: _setupirq (kernel/irq/internals.h:156 kernel/irq/manage.c:1596) [ 5.428331] #4: ffffff88039c80c8 (lockclass#2){....}-{2:2}, at: _setupirq (kernel/irq/manage.c:1614) [ 5.436472] stack backtrace: [ 5.439359] CPU: 2 UID: 0 PID: 44 Comm: kworker/u17:1 Tainted: G W 6.13.0-rc5+ #69 [ 5.448690] Tainted: [W]=WARN [ 5.451656] Hardware name: xlnx,zynqmp (DT) [ 5.455845] Workqueue: eventsunbound deferredprobeworkfunc [ 5.461699] Call trace: [ 5.464147] showstack+0x18/0x24 C [ 5.467821] dumpstacklvl (lib/dumpstack.c:123) [ 5.471501] dumpstack (lib/dumpstack.c:130) [ 5.474824] _lockacquire (kernel/locking/lockdep.c:4828 kernel/locking/lockdep.c:4898 kernel/locking/lockdep.c:5176) [ 5.478758] lockacquire (arch/arm64/include/asm/percpu.h:40 kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851 kernel/locking/lockdep.c:5814) [ 5.482429] rawspinlockirqsave (include/linux/spinlockapismp.h:111 kernel/locking/spinlock.c:162) [ 5.486797] xgpioirqunmask (drivers/gpio/gpio-xilinx.c:433 (discriminator 8)) [ 5.490737] irqenable (kernel/irq/internals.h:236 kernel/irq/chip.c:170 kernel/irq/chip.c:439 kernel/irq/chip.c:432 kernel/irq/chip.c:345) [ 5.494060] _irqstartup (kernel/irq/internals.h:241 kernel/irq/chip.c:180 kernel/irq/chip.c:250) [ 5.497645] irqstartup (kernel/irq/chip.c:270) [ 5.501143] _setupirq (kernel/irq/manage.c:1807) [ 5.504728] requestthreadedirq (kernel/irq/manage.c:2208)
[ { "signature_type": "Line", "id": "CVE-2025-21684-1f9d0239", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d25041d4a3b2af64c888cf762362b2528ba59294", "signature_version": "v1", "target": { "file": "drivers/gpio/gpio-xilinx.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "36577113429260731815539050538499089066", "57731281564082494024622424673918937845", "30712996402458094276535486870472848181", "292724401881860451791482011878306985981", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "205158481864158712203254511122991852191", "108245910028306980528143340781237774535", "84307160934361478481328574672811250440", "38931405409408267019791356288593093790", "86093858632075076526932186649142492436", "258759546054174381504334341886089713627", "30781382185263433881464409521980261845", "333600065126860037070430946961623232821", "94828429395554001113691559398634052905", "31957116968287485929865845288262576986", "304443839146079047196803002061451872803", "93135969683593191588235666549837618129", "53740860133010927698257225967625125934", "106427376469073988548865795021625299118", "66098356566332145524382663363859170823", "331512057996311325574109585308351846356", "297494820780918782333088979735036009776", "54635359200846355535910606311934592479", "149300042032973621741290922490391775459", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "206263261126949893423521505252694143945", "88842526928484933901612614981816730181", "337173301503066430937686982551035480841", "54635359200846355535910606311934592479", "109897805701330659737110842564047981513", "8850554122583971678573021783634723755", "56661491734103551576112077461810344880", "326009834991332076942237937621136518008", "100498786835414361370194841838904474170", "56387549758909525632221375335801274064", "51959452941539945850334822572135081285", "119741051033394675231541511097428062627", "250049579374107074894518458153545544061", "47503050134432272928631419965595217052", "196082398594161140253613540149851282570", "229731164382786703061027514807117429273", "304982506679810616004969433805145486578", "275876386605866073194355326442787192412", "225088547288062149855223688124278491736", "257778165128559086541644036069621999779", "107482785974297808073195331721693434534", "223273602876017704543875507546583681068", "149849325837901688668836009179146802842", "278505542685952892517465637039435308529", "247199480954378762939120947810880068668", "123592544657165435556097908136663991993", "299199438967307294365319373789054020104", "142696315990712526136234237538251751523", "185369584715879969592967822039956056384", "146811091541090515806390256182890543500", "219908604216858568436511422984343856412", "104954109987672801427706588361165214295", "71555538138936714694612220132262365578" ] }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21684-3858f16e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9860370c2172704b6b4f0075a0c2a29fd84af96a", "signature_version": "v1", "target": { "file": "drivers/gpio/gpio-xilinx.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "36577113429260731815539050538499089066", "57731281564082494024622424673918937845", "317849442038599412013440057278040469540", "216462075648567794903621647004012348053", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "205158481864158712203254511122991852191", "108245910028306980528143340781237774535", "84307160934361478481328574672811250440", "38931405409408267019791356288593093790", "86093858632075076526932186649142492436", "258759546054174381504334341886089713627", "30781382185263433881464409521980261845", "333600065126860037070430946961623232821", "94828429395554001113691559398634052905", "31957116968287485929865845288262576986", "304443839146079047196803002061451872803", "93135969683593191588235666549837618129", "53740860133010927698257225967625125934", "106427376469073988548865795021625299118", "66098356566332145524382663363859170823", "331512057996311325574109585308351846356", "297494820780918782333088979735036009776", "54635359200846355535910606311934592479", "149300042032973621741290922490391775459", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "206263261126949893423521505252694143945", "88842526928484933901612614981816730181", "337173301503066430937686982551035480841", "54635359200846355535910606311934592479", "109897805701330659737110842564047981513", "8850554122583971678573021783634723755", "56661491734103551576112077461810344880", "326009834991332076942237937621136518008", "100498786835414361370194841838904474170", "56387549758909525632221375335801274064", "317914775864186317470457742623845432970", "186170532468072336798359261403106562352", "213966366364038336618174432162206615144", "305399545956638360231247400546610826994", "138900521598997592338171077746837956693", "71748929157442006271522290687571401225", "304982506679810616004969433805145486578", "275876386605866073194355326442787192412", "225088547288062149855223688124278491736", "257778165128559086541644036069621999779", "107482785974297808073195331721693434534", "223273602876017704543875507546583681068", "149849325837901688668836009179146802842", "278505542685952892517465637039435308529", "247199480954378762939120947810880068668", "123592544657165435556097908136663991993", "299199438967307294365319373789054020104", "142696315990712526136234237538251751523", "185369584715879969592967822039956056384", "146811091541090515806390256182890543500", "219908604216858568436511422984343856412", "104954109987672801427706588361165214295", "257514195857996817054433510622204588418" ] }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21684-492d6c84", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0111650ee596219bb5defa0ce1a1308e6e77ccf", "signature_version": "v1", "target": { "file": "drivers/gpio/gpio-xilinx.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "36577113429260731815539050538499089066", "57731281564082494024622424673918937845", "317849442038599412013440057278040469540", "216462075648567794903621647004012348053", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "205158481864158712203254511122991852191", "108245910028306980528143340781237774535", "84307160934361478481328574672811250440", "38931405409408267019791356288593093790", "86093858632075076526932186649142492436", "258759546054174381504334341886089713627", "30781382185263433881464409521980261845", "333600065126860037070430946961623232821", "94828429395554001113691559398634052905", "31957116968287485929865845288262576986", "304443839146079047196803002061451872803", "93135969683593191588235666549837618129", "53740860133010927698257225967625125934", "106427376469073988548865795021625299118", "66098356566332145524382663363859170823", "331512057996311325574109585308351846356", "297494820780918782333088979735036009776", "54635359200846355535910606311934592479", "149300042032973621741290922490391775459", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "206263261126949893423521505252694143945", "88842526928484933901612614981816730181", "337173301503066430937686982551035480841", "54635359200846355535910606311934592479", "109897805701330659737110842564047981513", "8850554122583971678573021783634723755", "56661491734103551576112077461810344880", "326009834991332076942237937621136518008", "100498786835414361370194841838904474170", "56387549758909525632221375335801274064", "317914775864186317470457742623845432970", "186170532468072336798359261403106562352", "213966366364038336618174432162206615144", "305399545956638360231247400546610826994", "138900521598997592338171077746837956693", "71748929157442006271522290687571401225", "304982506679810616004969433805145486578", "275876386605866073194355326442787192412", "225088547288062149855223688124278491736", "257778165128559086541644036069621999779", "107482785974297808073195331721693434534", "223273602876017704543875507546583681068", "149849325837901688668836009179146802842", "278505542685952892517465637039435308529", "247199480954378762939120947810880068668", "123592544657165435556097908136663991993", "299199438967307294365319373789054020104", "142696315990712526136234237538251751523", "185369584715879969592967822039956056384", "146811091541090515806390256182890543500", "219908604216858568436511422984343856412", "104954109987672801427706588361165214295", "71555538138936714694612220132262365578" ] }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21684-81470b6c", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0ed2d0abc021f56fa27dc6d0770535c1851a43b", "signature_version": "v1", "target": { "file": "drivers/gpio/gpio-xilinx.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "36577113429260731815539050538499089066", "57731281564082494024622424673918937845", "317849442038599412013440057278040469540", "216462075648567794903621647004012348053", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "205158481864158712203254511122991852191", "108245910028306980528143340781237774535", "84307160934361478481328574672811250440", "38931405409408267019791356288593093790", "86093858632075076526932186649142492436", "258759546054174381504334341886089713627", "30781382185263433881464409521980261845", "333600065126860037070430946961623232821", "94828429395554001113691559398634052905", "31957116968287485929865845288262576986", "304443839146079047196803002061451872803", "93135969683593191588235666549837618129", "53740860133010927698257225967625125934", "106427376469073988548865795021625299118", "66098356566332145524382663363859170823", "331512057996311325574109585308351846356", "297494820780918782333088979735036009776", "54635359200846355535910606311934592479", "149300042032973621741290922490391775459", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "206263261126949893423521505252694143945", "88842526928484933901612614981816730181", "337173301503066430937686982551035480841", "54635359200846355535910606311934592479", "109897805701330659737110842564047981513", "8850554122583971678573021783634723755", "56661491734103551576112077461810344880", "326009834991332076942237937621136518008", "100498786835414361370194841838904474170", "56387549758909525632221375335801274064", "317914775864186317470457742623845432970", "186170532468072336798359261403106562352", "213966366364038336618174432162206615144", "305399545956638360231247400546610826994", "138900521598997592338171077746837956693", "71748929157442006271522290687571401225", "304982506679810616004969433805145486578", "275876386605866073194355326442787192412", "225088547288062149855223688124278491736", "257778165128559086541644036069621999779", "107482785974297808073195331721693434534", "223273602876017704543875507546583681068", "149849325837901688668836009179146802842", "278505542685952892517465637039435308529", "247199480954378762939120947810880068668", "123592544657165435556097908136663991993", "299199438967307294365319373789054020104", "142696315990712526136234237538251751523", "185369584715879969592967822039956056384", "146811091541090515806390256182890543500", "219908604216858568436511422984343856412", "104954109987672801427706588361165214295", "71555538138936714694612220132262365578" ] }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21684-83cf56e7", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9c035105c5537d2ecad6b9415e9417a1ffbd0a62", "signature_version": "v1", "target": { "file": "drivers/gpio/gpio-xilinx.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "36577113429260731815539050538499089066", "57731281564082494024622424673918937845", "317849442038599412013440057278040469540", "216462075648567794903621647004012348053", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "205158481864158712203254511122991852191", "108245910028306980528143340781237774535", "84307160934361478481328574672811250440", "38931405409408267019791356288593093790", "86093858632075076526932186649142492436", "258759546054174381504334341886089713627", "30781382185263433881464409521980261845", "333600065126860037070430946961623232821", "94828429395554001113691559398634052905", "31957116968287485929865845288262576986", "304443839146079047196803002061451872803", "93135969683593191588235666549837618129", "53740860133010927698257225967625125934", "106427376469073988548865795021625299118", "66098356566332145524382663363859170823", "331512057996311325574109585308351846356", "297494820780918782333088979735036009776", "54635359200846355535910606311934592479", "149300042032973621741290922490391775459", "53740860133010927698257225967625125934", "289428813473192538404736743492516604114", "9116511634633075116920372035937762892", "206263261126949893423521505252694143945", "88842526928484933901612614981816730181", "337173301503066430937686982551035480841", "54635359200846355535910606311934592479", "109897805701330659737110842564047981513", "8850554122583971678573021783634723755", "56661491734103551576112077461810344880", "326009834991332076942237937621136518008", "100498786835414361370194841838904474170", "56387549758909525632221375335801274064", "317914775864186317470457742623845432970", "186170532468072336798359261403106562352", "213966366364038336618174432162206615144", "305399545956638360231247400546610826994", "138900521598997592338171077746837956693", "71748929157442006271522290687571401225", "304982506679810616004969433805145486578", "275876386605866073194355326442787192412", "225088547288062149855223688124278491736", "257778165128559086541644036069621999779", "107482785974297808073195331721693434534", "223273602876017704543875507546583681068", "149849325837901688668836009179146802842", "278505542685952892517465637039435308529", "247199480954378762939120947810880068668", "123592544657165435556097908136663991993", "299199438967307294365319373789054020104", "142696315990712526136234237538251751523", "185369584715879969592967822039956056384", "146811091541090515806390256182890543500", "219908604216858568436511422984343856412", "104954109987672801427706588361165214295", "71555538138936714694612220132262365578" ] }, "deprecated": false } ]