Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1257718

Re: [PATCH 6/6] dmaengine: tegra-apb: Disable interrupts on removal

From Vinod Koul <vinod.koul@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 6/6] dmaengine: tegra-apb: Disable interrupts on removal
Date 2015-10-28 08:00 +0100
Message-ID <qosSe-7CB-5@gated-at.bofh.it> (permalink)
References (1 earlier) <qk8yL-FP-21@gated-at.bofh.it> <qk91N-1e0-27@gated-at.bofh.it> <qk9uP-22l-21@gated-at.bofh.it> <qkaKg-3Nh-73@gated-at.bofh.it> <qkaTT-3YR-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Oct 16, 2015 at 11:57:02AM +0100, Jon Hunter wrote:
> >>> How about just calling free_irq()? That's how you'd typically handle this.
> >>
> >> Yes, however, the interrupt is requested by devm_request_irq(). I guess
> >> I could call devm_free_irq() here?
> > 
> > Just use request_irq() instead of devm_request_irq(). You have the same
> > issue on the error path in the probe function anyway and also need to add
> > the free_irq() before the tasklet_kill() there as well.
> 
> I was wondering about that but the tasklets should never be scheduled if
> the probe does not succeed, so I think it is ok.

This is actually very racy, if probe fails but due to devm_ calls your irq
is alive till it freed by core

And a faulty device triggering irq can complicate matters, so for irq IMHO
we don't get much benefit with devm_ variant

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH 6/6] dmaengine: tegra-apb: Disable interrupts on removal Vinod Koul <vinod.koul@intel.com> - 2015-10-28 08:00 +0100
  Re: [PATCH 6/6] dmaengine: tegra-apb: Disable interrupts on removal Jon Hunter <jonathanh@nvidia.com> - 2015-10-28 14:40 +0100

csiph-web