linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] kernel/watch_queue: Clean up some code
@ 2022-08-04 13:30 Siddh Raman Pant via Linux-kernel-mentees
  2022-08-04 13:30 ` [PATCH 1/3 v4] kernel/watch_queue: Remove dangling pipe reference while clearing watch_queue Siddh Raman Pant via Linux-kernel-mentees
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Siddh Raman Pant via Linux-kernel-mentees @ 2022-08-04 13:30 UTC (permalink / raw)
  To: Eric Biggers, Jonathan Corbet, David Howells, Randy Dunlap,
	Mauro Carvalho Chehab, Christophe JAILLET, Eric Dumazet
  Cc: linux-kernel-mentees, linux-kernel

There is a dangling reference to pipe in a watch_queue after clearing it.
Thus, NULL that pointer while clearing. This can be thought of as a v4 of
the patches I had sent earlier.

This change renders wqueue->defunct superfluous, as the latter is only used
to check if watch_queue is cleared. With this change, the pipe is NULL'd
while clearing, so we can just check if the pipe is NULL.

Extending comment for watch_queue->pipe in the definition of watch_queue
made the comment conventionally too long (it was already past 80 chars),
so I have changed the struct annotations to be doxygen-styled, so that
I can extend the comment mentioning that the pipe is NULL when watch_queue
is cleared.

Siddh Raman Pant (3):
  kernel/watch_queue: Remove dangling pipe reference while clearing
    watch_queue
  kernel/watch_queue: Improve struct annotation formatting
  kernel/watch_queue: Remove wqueue->defunct and use pipe for clear
    check

 include/linux/watch_queue.h | 95 +++++++++++++++++++++++++++----------
 kernel/watch_queue.c        | 11 ++---
 2 files changed, 75 insertions(+), 31 deletions(-)

-- 
2.35.1


_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

end of thread, other threads:[~2022-08-06  7:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 13:30 [PATCH 0/3] kernel/watch_queue: Clean up some code Siddh Raman Pant via Linux-kernel-mentees
2022-08-04 13:30 ` [PATCH 1/3 v4] kernel/watch_queue: Remove dangling pipe reference while clearing watch_queue Siddh Raman Pant via Linux-kernel-mentees
2022-08-04 13:30 ` [PATCH 2/3] kernel/watch_queue: Improve struct annotation formatting Siddh Raman Pant via Linux-kernel-mentees
2022-08-05  7:22   ` Eric Biggers
2022-08-05  9:35     ` Siddh Raman Pant via Linux-kernel-mentees
2022-08-04 13:30 ` [PATCH 3/3] kernel/watch_queue: Remove wqueue->defunct and use pipe for clear check Siddh Raman Pant via Linux-kernel-mentees
2022-08-04 14:41   ` [PATCH v2 " Siddh Raman Pant via Linux-kernel-mentees
2022-08-05  7:24     ` Eric Biggers
2022-08-05  9:35       ` Siddh Raman Pant via Linux-kernel-mentees
2022-08-05 18:33         ` Eric Biggers
2022-08-06  7:23           ` Siddh Raman Pant via Linux-kernel-mentees
2022-08-05  7:16 ` [PATCH 0/3] kernel/watch_queue: Clean up some code Eric Biggers
2022-08-05  9:35   ` Siddh Raman Pant via Linux-kernel-mentees

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).