linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] watch_queue: Clean up some code
@ 2022-08-06  7:43 Siddh Raman Pant via Linux-kernel-mentees
  2022-08-06  7:43 ` [PATCH v2 1/2] include/linux/watch_queue: Improve documentation Siddh Raman Pant via Linux-kernel-mentees
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Siddh Raman Pant via Linux-kernel-mentees @ 2022-08-06  7:43 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 change renders wqueue->defunct superfluous, as the latter is only used
to check if watch_queue is cleared. With this change, the pipe is NULLed
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 kerneldoc-styled, so that
I can extend the comment mentioning that the pipe is NULL when watch_queue
is cleared. In the process, I have also hopefully improved documentation
by documenting things which weren't documented before.

Changes in v2:
- Merged the NULLing and removing defunct patches.
- Removed READ_ONCE barrier in lock_wqueue().
- Improved and fixed errors in struct docs.
- Better commit messages.

Siddh Raman Pant (2):
  include/linux/watch_queue: Improve documentation
  kernel/watch_queue: NULL the dangling *pipe, and use it for clear
    check

 include/linux/watch_queue.h | 100 ++++++++++++++++++++++++++----------
 kernel/watch_queue.c        |  12 ++---
 2 files changed, 79 insertions(+), 33 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] 8+ messages in thread
* [RESEND PATCH v2 0/2] watch_queue: Clean up some code
@ 2022-09-21  9:27 Siddh Raman Pant via Linux-kernel-mentees
  2022-09-21  9:27 ` [RESEND PATCH v2 1/2] include/linux/watch_queue: Improve documentation Siddh Raman Pant via Linux-kernel-mentees
  0 siblings, 1 reply; 8+ messages in thread
From: Siddh Raman Pant via Linux-kernel-mentees @ 2022-09-21  9:27 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Randy Dunlap, David Howells,
	Jonathan Corbet, Fabio M. De Francesco, Eric Dumazet,
	Christophe JAILLET, Eric Biggers
  Cc: linux-fsdevel, linux-security-module, keyrings,
	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 change renders wqueue->defunct superfluous, as the latter is only used
to check if watch_queue is cleared. With this change, the pipe is NULLed
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 kerneldoc-styled, so that
I can extend the comment mentioning that the pipe is NULL when watch_queue
is cleared. In the process, I have also hopefully improved documentation
by documenting things which weren't documented before.

Changes in v2:
- Merged the NULLing and removing defunct patches.
- Removed READ_ONCE barrier in lock_wqueue().
- Improved and fixed errors in struct docs.
- Better commit messages.

Siddh Raman Pant (2):
  include/linux/watch_queue: Improve documentation
  kernel/watch_queue: NULL the dangling *pipe, and use it for clear
    check

 include/linux/watch_queue.h | 100 ++++++++++++++++++++++++++----------
 kernel/watch_queue.c        |  12 ++---
 2 files changed, 79 insertions(+), 33 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] 8+ messages in thread

end of thread, other threads:[~2022-09-21  9:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-06  7:43 [PATCH v2 0/2] watch_queue: Clean up some code Siddh Raman Pant via Linux-kernel-mentees
2022-08-06  7:43 ` [PATCH v2 1/2] include/linux/watch_queue: Improve documentation Siddh Raman Pant via Linux-kernel-mentees
2022-09-01 20:06   ` [RESEND PATCH " Siddh Raman Pant via Linux-kernel-mentees
2022-08-06  7:43 ` [PATCH v2 2/2] kernel/watch_queue: NULL the dangling *pipe, and use it for clear check Siddh Raman Pant via Linux-kernel-mentees
2022-09-01 20:06   ` [RESEND PATCH " Siddh Raman Pant via Linux-kernel-mentees
2022-08-20 11:28 ` [PATCH v2 0/2] watch_queue: Clean up some code Siddh Raman Pant via Linux-kernel-mentees
2022-09-01 20:06 ` [RESEND PATCH " Siddh Raman Pant via Linux-kernel-mentees
2022-09-21  9:27 Siddh Raman Pant via Linux-kernel-mentees
2022-09-21  9:27 ` [RESEND PATCH v2 1/2] include/linux/watch_queue: Improve documentation 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).