lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190220113453.22d8fcd2@archlinux>
Date:   Wed, 20 Feb 2019 11:34:53 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Martin Kelly <mkelly@...o.com>
Cc:     Mathieu Othacehe <m.othacehe@...il.com>,
        "knaack.h@....de" <knaack.h@....de>,
        "lars@...afoo.de" <lars@...afoo.de>,
        "pmeerw@...erw.net" <pmeerw@...erw.net>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: trigger: Print an error if there is no available
 irq

On Wed, 13 Feb 2019 22:19:16 +0000
Martin Kelly <mkelly@...o.com> wrote:

> On 2/13/19 5:17 AM, Mathieu Othacehe wrote:
> > If there are more trigger consumers than
> > CONFIG_IIO_CONSUMERS_PER_TRIGGER, iio_trigger_attach_poll_func will
> > silently fail. Add an error message to inform the user that
> > CONFIG_IIO_CONSUMERS_PER_TRIGGER limit might be exceeded.
> > 
> > Signed-off-by: Mathieu Othacehe <m.othacehe@...il.com>
> > ---
> >   drivers/iio/industrialio-trigger.c | 6 +++++-
> >   1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> > index ce66699c7fcc..801986c21467 100644
> > --- a/drivers/iio/industrialio-trigger.c
> > +++ b/drivers/iio/industrialio-trigger.c
> > @@ -254,8 +254,12 @@ static int iio_trigger_attach_poll_func(struct iio_trigger *trig,
> >   
> >   	/* Get irq number */
> >   	pf->irq = iio_trigger_get_irq(trig);
> > -	if (pf->irq < 0)
> > +	if (pf->irq < 0) {
> > +		pr_err("Could not find an available irq for trigger %s, "
> > +			"CONFIG_IIO_CONSUMERS_PER_TRIGGER limit "
> > +			"might be exceeded\n", trig->name);
> >   		goto out_put_module;
> > +	}
> >   
> >   	/* Request irq */
> >   	ret = request_threaded_irq(pf->irq, pf->h, pf->thread,
> >   
> 
> This seems useful! I think it would be good to print the value of 
> CONFIG_IIO_CONSUMERS_PER_TRIGGER too. Also, it appears this is 
> triggering a checkpatch warning:
> 
> WARNING: quoted string split across lines
Agreed, with both comments.  Sensible change though. I'll admit
I'm a bit embarrassed that I wrote it without that warning in the
first place :(

Thanks,

Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ