Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1429275 > unrolled thread

[BUG] au0828: dev->lock in au0828_usb_probe()

Started byAlexey Khoroshilov <khoroshilov@ispras.ru>
First post2016-06-23 01:20 +0200
Last post2016-06-23 01:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [BUG] au0828: dev->lock in au0828_usb_probe() Alexey Khoroshilov <khoroshilov@ispras.ru> - 2016-06-23 01:20 +0200

#1429275 — [BUG] au0828: dev->lock in au0828_usb_probe()

FromAlexey Khoroshilov <khoroshilov@ispras.ru>
Date2016-06-23 01:20 +0200
Subject[BUG] au0828: dev->lock in au0828_usb_probe()
Message-ID<rMZB7-1wq-21@gated-at.bofh.it>
It is not quite clear what does mutex_lock(&dev->lock) defend against.

If there is a chance that some other code can try to lock the mutex during probe(),
then 
  mutex_unlock(&dev->lock);
  kfree(dev);
looks suspicious, because when that code get control form mutex_lock(dev->lock)
the dev could be already freed.

Otherwise, dev->lock should not be acquired so early.

Another problem is that on the path going via goto done
there is no mutex_unlock(&dev->lock).

Found by Linux Driver Verification project (linuxtesting.org).

--
Alexey Khoroshilov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web