gpio: rework locking and object life-time control
Hi Bartosz Golaszewski,
I ran into a kernel crash problem when I pull the latest net-next.git, and finally it was found that is caused by this patch series merged.
The kernel crashed because I got gpio=0 when I called irq_find_mapping() and then struct irq_data *d=null, as my driver describes:
int gpio = irq_find_mapping(gc->irq.domain, hwirq); struct irq_data *d = irq_get_irq_data(gpio); txgbe_gpio_irq_ack(d);
The deeper positioning is this line in __irq_resolve_mapping().
data = rcu_dereference(domain->revmap[hwirq]);
So, is it the addition of SRCU infrastructure that causes this issue?
Thanks,
Jiawen
Quoted 4 lines · Jiawen Wu
Hi Bartosz Golaszewski,
I ran into a kernel crash problem when I pull the latest net-next.git, and finally it was found that is caused by this patch series merged.
Can you bisect further, i.e. which patch (now a commit message) is the culprit?
Quoted 8 lines
The kernel crashed because I got gpio=0 when I called
irq_find_mapping()and then structirq_data*d=null, as my driver describes:int gpio = irq_find_mapping(gc->irq.domain, hwirq); struct irq_data *d = irq_get_irq_data(gpio); txgbe_gpio_irq_ack(d);
Quoted 5 lines
The deeper positioning is this line in
__irq_resolve_mapping().data = rcu_dereference(domain->revmap[hwirq]);So, is it the addition of SRCU infrastructure that causes this issue?
Do you have a full traceback / Oops message to share?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 14 lines · Jiawen Wu
Hi Bartosz Golaszewski,
I ran into a kernel crash problem when I pull the latest net-next.git, and finally it was found that is caused by this patch series merged.
The kernel crashed because I got gpio=0 when I called
irq_find_mapping()and then structirq_data*d=null, as my driver describes:int gpio = irq_find_mapping(gc->irq.domain, hwirq); struct irq_data *d = irq_get_irq_data(gpio); txgbe_gpio_irq_ack(d);
Quoted 6 lines
The deeper positioning is this line in
__irq_resolve_mapping().data = rcu_dereference(domain->revmap[hwirq]);So, is it the addition of SRCU infrastructure that causes this issue?
This is irq-specific RCU that I did not add in the GPIO series. Please provide us with more information. Bisect to the exact commit causing the issue and post the kernel log (we don't know what kind of crash you trigger and what the stack trace is).
Bart
Quoted 22 lines · Bartosz Golaszewski
Quoted 14 lines · Jiawen Wu
Hi Bartosz Golaszewski,
I ran into a kernel crash problem when I pull the latest net-next.git, and finally it was found that is caused by this patch series merged.
The kernel crashed because I got gpio=0 when I called
irq_find_mapping()and then structirq_data*d=null, as my driver describes:int gpio = irq_find_mapping(gc->irq.domain, hwirq); struct irq_data *d = irq_get_irq_data(gpio); txgbe_gpio_irq_ack(d);Quoted 6 lines
The deeper positioning is this line in
__irq_resolve_mapping().data = rcu_dereference(domain->revmap[hwirq]);So, is it the addition of SRCU infrastructure that causes this issue?
Quoted 7 lines
This is irq-specific RCU that I did not add in the GPIO series. Please provide us with more information. Bisect to the exact commit causing the issue and post the kernel log (we don't know what kind of crash you trigger and what the stack trace is).
Bart
Hi Bartosz & Andy,
Thanks for your replies.
I'm sorry for the misunderstanding, and glad this patch doesn't cause any problems. I thought the issue was in this patch because of my mistake. It's actually caused by other patches. :)