public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Torleiv Sundre <torleiv@huddly.com>
Cc: linux-media@vger.kernel.org
Subject: Re: Bug: media device controller node not removed when uvc device is unplugged
Date: Fri, 08 Jun 2018 15:34:10 +0300	[thread overview]
Message-ID: <1907945.zi1qWH88q7@avalon> (raw)
In-Reply-To: <fc69c83d-fbd6-d955-2e07-3960c052cb49@huddly.com>

Hi Torleiv,

On Thursday, 7 June 2018 15:07:24 EEST Torleiv Sundre wrote:
> Hi,
> 
> Every time I plug in a UVC camera, a media controller node is created at
> /dev/media<N>.
> 
> In Ubuntu 17.10, running kernel 4.13.0-43, the media controller device
> node is removed when the UVC camera is unplugged.
> 
> In Ubuntu 18.10, running kernel 4.15.0-22, the media controller device
> node is not removed. For every time I plug the device, a new device node
> with incremented minor number is created, leaving me with a growing list
> of media controller device nodes. If I repeat for long enough, I get the
> following error:
> "media: could not get a free minor"
> I also tried building a kernel from mainline, with the same result.

Thank you for the report. I'm sorry about that :-S It's a known issue, and a 
fix is already present in Linus' tree, on its way to v4.18-rc1.

commit f9ffcb0a21e1fa8e64d09ed613d884e054ae8191
Author: Philipp Zabel <philipp.zabel@gmail.com>
Date:   Mon May 21 06:24:58 2018 -0400

    media: uvcvideo: Fix driver reference counting

It should then get backported to stable releases.

If you have time, could you try to apply that commit on top of mainline and 
see if it fixes the problem for you ?

> I'm running on x86_64.

-- 
Regards,

Laurent Pinchart

      parent reply	other threads:[~2018-06-08 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 12:07 Bug: media device controller node not removed when uvc device is unplugged Torleiv Sundre
2018-06-07 15:30 ` Nicolas Dufresne
2018-06-08 12:34 ` Laurent Pinchart [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=1907945.zi1qWH88q7@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=torleiv@huddly.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