Re: [PATCH 2/2] PCI: imx6: Remove unneeded 'goto err'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, December 04, 2013 at 07:31:57 PM, Fabio Estevam wrote:
> Hi Marek,
> 
> On Mon, Dec 2, 2013 at 6:08 AM, Marek Vasut <marex@xxxxxxx> wrote:
> > I am a bit worried about unwinding of the installation of the DABT hook:
> > 
> > 424         /* Added for PCI abort handling */
> > 425         hook_fault_code(16 + 6, imx6q_pcie_abort_handler, SIGBUS, 0,
> > 426                 "imprecise external abort");
> > 
> > This is not handled in the fail path. Instead of this patch, would it be
> > possible for you to fix the failpath to take this part into
> > consideration?
> 
> IMHO this would be subject of a separate patch. This one does not
> change any current behavior.

The current behavior is botched then. If this would be compilable as a module 
and you removed this module, this hook would also cease to exist and if 
something triggered this type of DABT, the whole kernel would explode. I suppose 
noone will compile this as a module in the first place, but let's play safe ;-)

> > Another option, and I think even a better one, would be to move this DABT
> > handler installation just before imx6_add_pcie_port() call. You'd still
> > need to handle it's de-installation in remove(), but you won't have so
> > many functions in probe() goto-ing to fail path.
> 
> How do we 'uninstall' this DABT handler installation?

I think you should call hook_fault_code() again, but this time you should 
specify the old values that were in the fault handler table before.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux