linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manish Narani <MNARANI@xilinx.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"knaack.h@gmx.de" <knaack.h@gmx.de>,
	"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
	Michal Simek <michals@xilinx.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Anirudha Sarangi <anirudh@xilinx.com>, Srinivas Goud <sgoud@xilinx.com>
Subject: RE: [PATCH 4/4] iio: adc: xilinx: Use devm_ functions while requesting irq
Date: Mon, 23 Jul 2018 09:27:03 +0000	[thread overview]
Message-ID: <SN6PR02MB4959DB7E5C4D148D21F81E42C1560@SN6PR02MB4959.namprd02.prod.outlook.com> (raw)
In-Reply-To: <32791313-d317-c9c3-0760-34d4a4a691f9@metafoo.de>

Hi Lars,

> -----Original Message-----
> From: Lars-Peter Clausen [mailto:lars@metafoo.de]
> Sent: Thursday, July 19, 2018 10:08 PM
> To: Manish Narani <MNARANI@xilinx.com>; jic23@kernel.org;
> knaack.h@gmx.de; pmeerw@pmeerw.net; Michal Simek
> <michals@xilinx.com>; linux-iio@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Cc: Anirudha Sarangi <anirudh@xilinx.com>; Srinivas Goud
> <sgoud@xilinx.com>
> Subject: Re: [PATCH 4/4] iio: adc: xilinx: Use devm_ functions while requesting
> irq
> 
> > @@ -1310,7 +1308,6 @@ static int xadc_remove(struct platform_device
> > *pdev)  {
> >  	struct iio_dev *indio_dev = platform_get_drvdata(pdev);
> >  	struct xadc *xadc = iio_priv(indio_dev);
> > -	int irq = platform_get_irq(pdev, 0);
> >
> >  	iio_device_unregister(indio_dev);
> >  	if (xadc->ops->flags & XADC_FLAGS_BUFFERED) { @@ -1318,7 +1315,6
> @@
> > static int xadc_remove(struct platform_device *pdev)
> >  		iio_trigger_free(xadc->convst_trigger);
> >  		iio_triggered_buffer_cleanup(indio_dev);
> >  	}
> > -	free_irq(irq, indio_dev);
> 
> This opens up a race condition. The IRQ needs to be freed before any of these
> other things below the free_irq() are executed.
Will look into it and send with taking care of the same.

> 
> >  	clk_disable_unprepare(xadc->clk);
> >  	cancel_delayed_work(&xadc->zynq_unmask_work);
> >  	kfree(xadc->data);
> >

Thanks,
Manish

      reply	other threads:[~2018-07-23  9:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 11:12 [PATCH 0/4] iio: adc: xilinx: XADC driver enhancements and bug fixes Manish Narani
2018-07-18 11:12 ` [PATCH 1/4] iio: adc: xilinx: Rename 'channels' variable name to 'iio_xadc_channels' Manish Narani
2018-07-18 11:18   ` Lars-Peter Clausen
2018-07-18 11:52     ` Manish Narani
2018-07-19  8:22     ` Michal Simek
2018-07-21 16:18       ` Jonathan Cameron
2018-07-21 16:22         ` Joe Perches
2018-07-21 16:33           ` Jonathan Cameron
2018-07-18 11:12 ` [PATCH 2/4] iio: adc: xilinx: Remove dead code from xadc_zynq_setup Manish Narani
2018-07-21 16:22   ` Jonathan Cameron
2018-07-18 11:12 ` [PATCH 3/4] iio: adc: xilinx: Check for return values in clk related functions Manish Narani
2018-07-19 16:40   ` Lars-Peter Clausen
2018-07-21 16:24     ` Jonathan Cameron
2018-07-23  9:34       ` Manish Narani
2018-07-18 11:12 ` [PATCH 4/4] iio: adc: xilinx: Use devm_ functions while requesting irq Manish Narani
2018-07-19 16:37   ` Lars-Peter Clausen
2018-07-23  9:27     ` Manish Narani [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR02MB4959DB7E5C4D148D21F81E42C1560@SN6PR02MB4959.namprd02.prod.outlook.com \
    --to=mnarani@xilinx.com \
    --cc=anirudh@xilinx.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michals@xilinx.com \
    --cc=pmeerw@pmeerw.net \
    --cc=sgoud@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).