From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH v1 8/8] iio: meter: ade7758: Fix indio_dev->trig assignment
Date: Mon, 25 Aug 2014 21:50:58 +0100 [thread overview]
Message-ID: <53FBA1B2.50701@kernel.org> (raw)
In-Reply-To: <53F83C03.50202@metafoo.de>
On 23/08/14 08:00, Lars-Peter Clausen wrote:
> On 08/22/2014 10:48 PM, Srinivas Pandruvada wrote:
>> This can result in wrong reference count for trigger device, call
>> iio_trigger_get to increment reference.
>> Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion
>> with Jonathan.
>>
>> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
>
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the fixes-togreg branch of iio.git
Whole series marked for stable. I debated whether this mades sense, but
concluded that it did given the nasty effect of the double free this
prevents.
Thanks,
J
>
> Thanks.
>
>> ---
>> drivers/staging/iio/meter/ade7758_trigger.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/iio/meter/ade7758_trigger.c b/drivers/staging/iio/meter/ade7758_trigger.c
>> index ea01b8f..6f45ce0 100644
>> --- a/drivers/staging/iio/meter/ade7758_trigger.c
>> +++ b/drivers/staging/iio/meter/ade7758_trigger.c
>> @@ -85,7 +85,7 @@ int ade7758_probe_trigger(struct iio_dev *indio_dev)
>> ret = iio_trigger_register(st->trig);
>>
>> /* select default trigger */
>> - indio_dev->trig = st->trig;
>> + indio_dev->trig = iio_trigger_get(st->trig);
>> if (ret)
>> goto error_free_irq;
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-08-25 20:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 20:48 [PATCH v1 0/8] Fix iio_dev->trig assignment Srinivas Pandruvada
2014-08-22 20:48 ` [PATCH v1 1/8] iio:trigger: modify return value for iio_trigger_get Srinivas Pandruvada
2014-08-25 20:35 ` Jonathan Cameron
2014-08-22 20:48 ` [PATCH v1 2/8] iio: accel: bma180: Fix indio_dev->trig assignment Srinivas Pandruvada
2014-08-25 20:41 ` Jonathan Cameron
2014-08-22 20:48 ` [PATCH v1 3/8] iio: adc: ad_sigma_delta: " Srinivas Pandruvada
2014-08-23 7:00 ` Lars-Peter Clausen
2014-08-25 20:41 ` Jonathan Cameron
2014-08-22 20:48 ` [PATCH v1 4/8] iio: hid_sensor_hub: " Srinivas Pandruvada
2014-08-25 20:42 ` Jonathan Cameron
2014-08-22 20:48 ` [PATCH v1 5/8] iio: st_sensors: " Srinivas Pandruvada
2014-08-25 20:43 ` Jonathan Cameron
2014-08-22 20:48 ` [PATCH v1 6/8] iio: gyro: itg3200: " Srinivas Pandruvada
2014-08-25 20:44 ` Jonathan Cameron
2014-08-22 20:48 ` [PATCH v1 7/8] iio: inv_mpu6050: " Srinivas Pandruvada
2014-08-25 20:45 ` Jonathan Cameron
2014-08-22 20:48 ` [PATCH v1 8/8] iio: meter: ade7758: " Srinivas Pandruvada
2014-08-23 7:00 ` Lars-Peter Clausen
2014-08-25 20:50 ` Jonathan Cameron [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=53FBA1B2.50701@kernel.org \
--to=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.