linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* using sparse to catch refcount leaks
@ 2020-07-09 15:50 Aurélien Aptel
  2020-07-09 18:48 ` Luc Van Oostenryck
  2020-07-10  8:59 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Aurélien Aptel @ 2020-07-09 15:50 UTC (permalink / raw)
  To: linux-sparse

Hi,

I was thinking the same mechanism for lock checks (lock() has matching
unlock()) could be used for detecting refcount leaks (get() has matching
put()).

This could be used to catch bugs like that:

https://lore.kernel.org/linux-cifs/CAH2r5mtJg0OONLuAYmcggj=M3euDDxRa3Y5-_W1=qxwbeZypqA@mail.gmail.com/T/#mf0e0397aa0b63043d7b3bb0981f0b7323713bfdc

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-13 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 15:50 using sparse to catch refcount leaks Aurélien Aptel
2020-07-09 18:48 ` Luc Van Oostenryck
2020-07-10  8:59 ` Dan Carpenter
2020-07-13 10:50   ` Aurélien Aptel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).