Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc330fb1

Browse files
KAGA-KOKOjgross1
authored andcommitted
XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt
XEN data pointer which contains XEN specific information.handler data is meant for interrupt handlers and not for storing irq chipspecific information as some devices require handler data to store internalper interrupt information, e.g. pinctrl/GPIO chained interrupt handlers.This obviously creates a conflict of interests and crashes the machinebecause the XEN pointer is overwritten by the driver pointer.As the XEN data is not handler specific it should be stored inirqdesc::irq_data::chip_data instead.A simple sed s/irq_[sg]et_handler_data/irq_[sg]et_chip_data/ cures that.Cc: stable@vger.kernel.orgReported-by: Roman Shaposhnik <roman@zededa.com>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>Tested-by: Roman Shaposhnik <roman@zededa.com>Reviewed-by: Juergen Gross <jgross@suse.com>Link:https://lore.kernel.org/r/87lfi2yckt.fsf@nanos.tec.linutronix.deSigned-off-by: Juergen Gross <jgross@suse.com>
1 parentee87e15 commitc330fb1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎drivers/xen/events/events_base.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ int get_evtchn_to_irq(evtchn_port_t evtchn)
156156
/* Get info for IRQ */
157157
structirq_info*info_for_irq(unsignedirq)
158158
{
159-
returnirq_get_handler_data(irq);
159+
returnirq_get_chip_data(irq);
160160
}
161161

162162
/* Constructors for packed IRQ information. */
@@ -377,7 +377,7 @@ static void xen_irq_init(unsigned irq)
377377
info->type=IRQT_UNBOUND;
378378
info->refcnt=-1;
379379

380-
irq_set_handler_data(irq,info);
380+
irq_set_chip_data(irq,info);
381381

382382
list_add_tail(&info->list,&xen_irq_list_head);
383383
}
@@ -426,14 +426,14 @@ static int __must_check xen_allocate_irq_gsi(unsigned gsi)
426426

427427
staticvoidxen_free_irq(unsignedirq)
428428
{
429-
structirq_info*info=irq_get_handler_data(irq);
429+
structirq_info*info=irq_get_chip_data(irq);
430430

431431
if (WARN_ON(!info))
432432
return;
433433

434434
list_del(&info->list);
435435

436-
irq_set_handler_data(irq,NULL);
436+
irq_set_chip_data(irq,NULL);
437437

438438
WARN_ON(info->refcnt>0);
439439

@@ -603,7 +603,7 @@ EXPORT_SYMBOL_GPL(xen_irq_from_gsi);
603603
staticvoid__unbind_from_irq(unsignedintirq)
604604
{
605605
evtchn_port_tevtchn=evtchn_from_irq(irq);
606-
structirq_info*info=irq_get_handler_data(irq);
606+
structirq_info*info=irq_get_chip_data(irq);
607607

608608
if (info->refcnt>0) {
609609
info->refcnt--;
@@ -1108,7 +1108,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi,
11081108

11091109
voidunbind_from_irqhandler(unsignedintirq,void*dev_id)
11101110
{
1111-
structirq_info*info=irq_get_handler_data(irq);
1111+
structirq_info*info=irq_get_chip_data(irq);
11121112

11131113
if (WARN_ON(!info))
11141114
return;
@@ -1142,7 +1142,7 @@ int evtchn_make_refcounted(evtchn_port_t evtchn)
11421142
if (irq==-1)
11431143
return-ENOENT;
11441144

1145-
info=irq_get_handler_data(irq);
1145+
info=irq_get_chip_data(irq);
11461146

11471147
if (!info)
11481148
return-ENOENT;
@@ -1170,7 +1170,7 @@ int evtchn_get(evtchn_port_t evtchn)
11701170
if (irq==-1)
11711171
gotodone;
11721172

1173-
info=irq_get_handler_data(irq);
1173+
info=irq_get_chip_data(irq);
11741174

11751175
if (!info)
11761176
gotodone;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp