<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/rust/helpers/poll.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-14T12:12:24+00:00</updated>
<entry>
<title>poll: rust: allow poll_table ptrs to be null</title>
<updated>2025-07-14T12:12:24+00:00</updated>
<author>
<name>Alice Ryhl</name>
<email>aliceryhl@google.com</email>
</author>
<published>2025-06-23T13:57:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de747bd023c09b5b7f3bf5c952d7b1da77a9caaa'/>
<id>urn:sha1:de747bd023c09b5b7f3bf5c952d7b1da77a9caaa</id>
<content type='text'>
It's possible for a poll_table to be null. This can happen if an
end-user just wants to know if a resource has events right now without
registering a waiter for when events become available. Furthermore,
these null pointers should be handled transparently by the API, so we
should not change `from_ptr` to return an `Option`. Thus, change
`PollTable` to wrap a raw pointer rather than use a reference so that
you can pass null.

Comments mentioning `struct poll_table` are changed to just `poll_table`
since `poll_table` is a typedef. (It's a typedef because it's supposed
to be opaque.)

Reviewed-by: Benno Lossin &lt;lossin@kernel.org&gt;
Signed-off-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
</content>
</entry>
</feed>
