From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu) Date: Tue, 05 Jun 2018 10:33:21 -0400 Subject: develoment workflow: how to avoid duplicate work ? In-Reply-To: <20180605142016.GA2334@hle-laptop.local> References: <80132.1527564735@turing-police.cc.vt.edu> <20180530025657.GB1919@hle-laptop.local> <22501.1527692619@turing-police.cc.vt.edu> <20180531014432.GA3722@hle-laptop.local> <20180603192336.GV14048@gavran.carpriv.carnet.hr> <20180603222556.GB20060@hle-laptop.local> <20180604033303.GX14048@gavran.carpriv.carnet.hr> <12368.1528128607@turing-police.cc.vt.edu> <20180604223131.GA1981@hle-laptop.local> <68638.1528178148@turing-police.cc.vt.edu> <20180605142016.GA2334@hle-laptop.local> Message-ID: <179873.1528209201@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Tue, 05 Jun 2018 10:20:16 -0400, Hugo Lefeuvre said: > Thanks. I think I'll have to read the source code to fully understand > what happens. Do you know what piece of code handles this reference > duplication ? It's not duplication, it's increment/decrement of a counter. Look for functions with 'get' and 'put' in their names. > As a conclusion we can assume that ioctl and release never run > concurrently, and as such the lock introduced in my patch is useless. Well, they *shouldn't* do so. What the code actually does, however.... > Concerning the TODO at line 876, I think I've misunderstood it. I'll > think a bit more about it and come back with an updated patch later. I haven't looked at the code - there's an outside chance that the driver isn't doing reference counting correctly. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 486 bytes Desc: not available URL: