diff options
author | Peter Zijlstra <peterz@infradead.org> | 2016-11-14 18:25:17 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-01-14 11:42:46 +0100 |
commit | 3efb772c853f7bc31e38ec2b5270810ccb327e35 (patch) | |
tree | c501f1e2e10675700d6c8b4e9c6b8c82d82e601e /drivers/usb | |
parent | 6b1ffa06e59d44e7ef04132f24c791931fbb0106 (diff) | |
download | op-kernel-dev-3efb772c853f7bc31e38ec2b5270810ccb327e35.zip op-kernel-dev-3efb772c853f7bc31e38ec2b5270810ccb327e35.tar.gz |
locking/atomic, kref: Avoid more abuse
Leak references by unbalanced get, instead of poking at kref
implementation details.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/mon/mon_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c index 33ff49c..4684734 100644 --- a/drivers/usb/mon/mon_main.c +++ b/drivers/usb/mon/mon_main.c @@ -409,7 +409,7 @@ static void __exit mon_exit(void) printk(KERN_ERR TAG ": Outstanding opens (%d) on usb%d, leaking...\n", mbus->nreaders, mbus->u_bus->busnum); - atomic_set(&mbus->ref.refcount, 2); /* Force leak */ + kref_get(&mbus->ref); /* Force leak */ } mon_dissolve(mbus, mbus->u_bus); |