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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 01 May 2015 18:12:14 +0200
From:	Gabriele Mazzotta <gabriele.mzt@...il.com>
To:	unlisted-recipients:; (no To-header on input)
Cc:	jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
	pmeerw@...erw.net, marxin.liska@...il.com, marex@...x.de,
	rui.zhang@...el.com, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org
Subject: Re: [PATCH] iio: acpi: Add ACPI0008 Ambient Light Sensor

Hi,

probably this is not completely related to this driver, but I
noticed something while testing it.

When I load acpi-als, /sys/bus/iio/devices/iio:device0/buffer/enable
is 0. If I try to set it to 1, I get the following error:
"Buffer not started: buffer parameter update failed (-22)"

After I got the error, I can successfully toggle "enable".

What I found is that the first time iio_request_update_kfifo() is
called, __iio_allocate_kfifo() gets called. Since bytes_per_datum
is 0 (as set iio_compute_scan_bytes()), it returns -EINVAL and so
does iio_request_update_kfifo(), causing the error above.

Subsequent calls of iio_request_update_kfifo() will return 0 as
update_needed is false, so "enable" can be toggled with no errors.

Isn't there something wrong here?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ