FS#59119 - [linux] no exposure setting on webcams using uvcvideo

Attached to Project: Arch Linux
Opened by Stanislav (safocl) - Saturday, 23 June 2018, 11:47 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 04 July 2018, 01:35 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Tobias Powalowski (tpowa)
Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: no exposure setting on webcams using uvcvideo


Additional info:
* package version(s) 4.17.2-1


Steps to reproduce:
a small amount of the buffer was added to the commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-4.17.y&id=859086ae3636eae0bf9f0fbbce2daf4d41ae9474 in the function description uvc_ctrl_get_flags (data = kmalloc (1, GFP_KERNEL); and ret = uvc_query_ctrl (dev, UVC_GET_INFO, ctrl-> entity-> id, dev-> intfnum, info-> selector, data, 1);) and it turned out that when reassigning variable ret through the specified function in function uvc_ctrl_fill_xu_info the size did not suffice what to contain exposition settings as I think.
After increasing the buffer size to 2 bytes, the exposure setting appeared again.
link to the Russian-speaking forum archlinux: https://archlinux.org.ru/forum/topic/18581/

patch:

--- a/drivers/media/usb/uvc/uvc_ctrl.c 2018-06-23 15:12:25.948081416 +0400
+++ b/drivers/media/usb/uvc/uvc_ctrl.c 2018-06-23 14:57:52.462048382 +0400
@@ -1600,12 +1600,12 @@
u8 *data;
int ret;

- data = kmalloc(1, GFP_KERNEL);
+ data = kmalloc(2, GFP_KERNEL);
if (data == NULL)
return -ENOMEM;

ret = uvc_query_ctrl(dev, UVC_GET_INFO, ctrl->entity->id, dev->intfnum,
- info->selector, data, 1);
+ info->selector, data, 2);
if (!ret)
info->flags = UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX
| UVC_CTRL_FLAG_GET_RES | UVC_CTRL_FLAG_GET_DEF
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 04 July 2018, 01:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 4.17.3-1
Comment by Stanislav (safocl) - Sunday, 24 June 2018, 17:06 GMT
By the way, he has discovered the solution of the bug by the developers themselves in the master branch, although this fix has not yet been included in the main stable branch.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=0dc68cabdb626e33d02561529e6a4c681b72a784
Comment by loqs (loqs) - Monday, 25 June 2018, 12:52 GMT Comment by Stanislav (safocl) - Monday, 25 June 2018, 14:14 GMT
Oh, already included, excellent.
Comment by loqs (loqs) - Tuesday, 03 July 2018, 12:31 GMT
@safocl can you confirm linux 4.17.3-1 resolved the issue?
Comment by Stanislav (safocl) - Tuesday, 03 July 2018, 14:41 GMT
yes, resolved

Loading...