<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/staging/nvec, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>staging: nvec: nvec_power: use GFP_KERNEL in probe()</title>
<updated>2026-07-17T12:18:08+00:00</updated>
<author>
<name>Igor Putko</name>
<email>igorpetindev@gmail.com</email>
</author>
<published>2026-07-10T15:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=33da57cc4a3a6f0c4accc3ec6ca26314efd1700b'/>
<id>33da57cc4a3a6f0c4accc3ec6ca26314efd1700b</id>
<content type='text'>
nvec_power_probe() calls devm_kzalloc() with GFP_NOWAIT, which
disables direct reclaim and is meant for atomic context. probe()
runs in normal process context and may sleep, so this needlessly
risks a spurious -ENOMEM under memory pressure instead of just
waiting for reclaim like every other probe() allocation does.

nvec.c's own tegra_nvec_probe() already uses GFP_KERNEL for the
identical pattern, confirming this is an oversight, not intentional.

Signed-off-by: Igor Putko &lt;igorpetindev@gmail.com&gt;
Acked-by: Marc Dietrich &lt;marvin24@gmx.de&gt;
Link: https://patch.msgid.link/20260710150113.3041-1-igorpetindev@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nvec_power_probe() calls devm_kzalloc() with GFP_NOWAIT, which
disables direct reclaim and is meant for atomic context. probe()
runs in normal process context and may sleep, so this needlessly
risks a spurious -ENOMEM under memory pressure instead of just
waiting for reclaim like every other probe() allocation does.

nvec.c's own tegra_nvec_probe() already uses GFP_KERNEL for the
identical pattern, confirming this is an oversight, not intentional.

Signed-off-by: Igor Putko &lt;igorpetindev@gmail.com&gt;
Acked-by: Marc Dietrich &lt;marvin24@gmx.de&gt;
Link: https://patch.msgid.link/20260710150113.3041-1-igorpetindev@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: nvec: remove extra space in enum declaration</title>
<updated>2026-07-07T09:23:29+00:00</updated>
<author>
<name>Dorian Catric</name>
<email>dorian.catric@gmail.com</email>
</author>
<published>2026-06-03T17:27:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d1760cc87c13c128bccfe1698e08ac7c3f66c7bb'/>
<id>d1760cc87c13c128bccfe1698e08ac7c3f66c7bb</id>
<content type='text'>
Remove extra space in 'enum nvec_msg_category  {' declaration.

Signed-off-by: Dorian Catric &lt;dorian.catric@gmail.com&gt;
Link: https://patch.msgid.link/20260603172719.398-2-dorian.catric@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove extra space in 'enum nvec_msg_category  {' declaration.

Signed-off-by: Dorian Catric &lt;dorian.catric@gmail.com&gt;
Link: https://patch.msgid.link/20260603172719.398-2-dorian.catric@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: nvec: fix typo in copyright header URL</title>
<updated>2026-07-07T09:23:29+00:00</updated>
<author>
<name>Dorian Catric</name>
<email>dorian.catric@gmail.com</email>
</author>
<published>2026-06-03T17:27:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e58a7f2ed634da84380ca38fb43d8bdfc325f490'/>
<id>e58a7f2ed634da84380ca38fb43d8bdfc325f490</id>
<content type='text'>
Fix typo 'lauchpad.net' -&gt; 'launchpad.net' in the copyright header.
The correct spelling is already used in nvec.h.

Signed-off-by: Dorian Catric &lt;dorian.catric@gmail.com&gt;
Link: https://patch.msgid.link/20260603172719.398-1-dorian.catric@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typo 'lauchpad.net' -&gt; 'launchpad.net' in the copyright header.
The correct spelling is already used in nvec.h.

Signed-off-by: Dorian Catric &lt;dorian.catric@gmail.com&gt;
Link: https://patch.msgid.link/20260603172719.398-1-dorian.catric@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: nvec: fix unconditional pm_power_off teardown</title>
<updated>2026-05-04T14:17:10+00:00</updated>
<author>
<name>Alexandru Hossu</name>
<email>hossu.alexandru@gmail.com</email>
</author>
<published>2026-04-27T08:17:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fb2ae75b1ae5cffa11309b9ebf27aa4a2ceff9bd'/>
<id>fb2ae75b1ae5cffa11309b9ebf27aa4a2ceff9bd</id>
<content type='text'>
tegra_nvec_remove() unconditionally sets pm_power_off = NULL, even if
nvec was not the one that registered it. This breaks any other driver
that may have set pm_power_off to its own handler.

Replace the unconditional assignment with a guarded check so that
pm_power_off is only cleared if nvec was the one that set it.

Also remove the stale FIXME comment, as the guard addresses exactly
what it was asking for.

Reviewed-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Alexandru Hossu &lt;hossu.alexandru@gmail.com&gt;
Link: https://patch.msgid.link/20260427081713.3401874-3-hossu.alexandru@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tegra_nvec_remove() unconditionally sets pm_power_off = NULL, even if
nvec was not the one that registered it. This breaks any other driver
that may have set pm_power_off to its own handler.

Replace the unconditional assignment with a guarded check so that
pm_power_off is only cleared if nvec was the one that set it.

Also remove the stale FIXME comment, as the guard addresses exactly
what it was asking for.

Reviewed-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Alexandru Hossu &lt;hossu.alexandru@gmail.com&gt;
Link: https://patch.msgid.link/20260427081713.3401874-3-hossu.alexandru@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: nvec: fix use-after-free in nvec_rx_completed()</title>
<updated>2026-05-04T14:17:10+00:00</updated>
<author>
<name>Alexandru Hossu</name>
<email>hossu.alexandru@gmail.com</email>
</author>
<published>2026-04-27T08:17:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=26813881181deb3a32fbb59eadb2599cbe8423f6'/>
<id>26813881181deb3a32fbb59eadb2599cbe8423f6</id>
<content type='text'>
In nvec_rx_completed(), when an incomplete RX transfer is detected,
nvec_msg_free() is called to return the message back to the pool by
clearing its 'used' atomic flag. Immediately after this, the code
accesses nvec-&gt;rx-&gt;data[0] to check the message type.

Since nvec_msg_free() marks the pool slot as available via atomic_set(),
any concurrent or subsequent call to nvec_msg_alloc() could claim that
same slot and overwrite its data[] array. Reading nvec-&gt;rx-&gt;data[0] after
freeing the message is therefore a use-after-free.

Fix this by saving the message type byte before calling nvec_msg_free(),
then using the saved value for the battery quirk check.

Fixes: d6bdcf2e1019 ("staging: nvec: Add battery quirk to ignore incomplete responses")
Reviewed-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Alexandru Hossu &lt;hossu.alexandru@gmail.com&gt;
Link: https://patch.msgid.link/20260427081713.3401874-2-hossu.alexandru@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In nvec_rx_completed(), when an incomplete RX transfer is detected,
nvec_msg_free() is called to return the message back to the pool by
clearing its 'used' atomic flag. Immediately after this, the code
accesses nvec-&gt;rx-&gt;data[0] to check the message type.

Since nvec_msg_free() marks the pool slot as available via atomic_set(),
any concurrent or subsequent call to nvec_msg_alloc() could claim that
same slot and overwrite its data[] array. Reading nvec-&gt;rx-&gt;data[0] after
freeing the message is therefore a use-after-free.

Fix this by saving the message type byte before calling nvec_msg_free(),
then using the saved value for the battery quirk check.

Fixes: d6bdcf2e1019 ("staging: nvec: Add battery quirk to ignore incomplete responses")
Reviewed-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Alexandru Hossu &lt;hossu.alexandru@gmail.com&gt;
Link: https://patch.msgid.link/20260427081713.3401874-2-hossu.alexandru@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: nvec: fix block comment style in nvec_interrupt()</title>
<updated>2026-02-24T18:11:42+00:00</updated>
<author>
<name>Kibaek Yoo</name>
<email>psykibaek@gmail.com</email>
</author>
<published>2026-02-24T04:49:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=29e79c66b3ccb46cacd2dcd92f45291506fb5259'/>
<id>29e79c66b3ccb46cacd2dcd92f45291506fb5259</id>
<content type='text'>
Fix multi-line block comment to use the preferred kernel comment style
with leading asterisks on each line and a trailing */ on a separate
line, as reported by checkpatch.pl.

Signed-off-by: Kibaek Yoo &lt;psykibaek@gmail.com&gt;
Reviewed-by: Ethan Tidmore &lt;ethantidmore06@gmail.com&gt;
Link: https://patch.msgid.link/20260224044946.54022-1-psykibaek@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix multi-line block comment to use the preferred kernel comment style
with leading asterisks on each line and a trailing */ on a separate
line, as reported by checkpatch.pl.

Signed-off-by: Kibaek Yoo &lt;psykibaek@gmail.com&gt;
Reviewed-by: Ethan Tidmore &lt;ethantidmore06@gmail.com&gt;
Link: https://patch.msgid.link/20260224044946.54022-1-psykibaek@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: nvec: propagate error codes in tegra_nvec_probe()</title>
<updated>2026-02-23T14:44:44+00:00</updated>
<author>
<name>Artem Lytkin</name>
<email>iprintercanon@gmail.com</email>
</author>
<published>2026-02-16T20:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b8232ea5d1612cde68563075bfaf2ead304b9cd5'/>
<id>b8232ea5d1612cde68563075bfaf2ead304b9cd5</id>
<content type='text'>
Several error paths in tegra_nvec_probe() return -ENODEV instead of
propagating the actual error code from the called function. This
prevents probe deferral from working correctly when a dependency
(clock, IRQ) is not yet available.

Fix this for platform_get_irq(), devm_clk_get(), and
devm_request_irq() by propagating their return values. Use
dev_err_probe() for the latter two to suppress log messages during
deferred probing.

The remaining -ENODEV returns for missing device tree node and
slave-addr property are left unchanged as those are permanent
configuration errors unrelated to probe deferral.

Signed-off-by: Artem Lytkin &lt;iprintercanon@gmail.com&gt;
Link: https://patch.msgid.link/20260216202011.1806-1-iprintercanon@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several error paths in tegra_nvec_probe() return -ENODEV instead of
propagating the actual error code from the called function. This
prevents probe deferral from working correctly when a dependency
(clock, IRQ) is not yet available.

Fix this for platform_get_irq(), devm_clk_get(), and
devm_request_irq() by propagating their return values. Use
dev_err_probe() for the latter two to suppress log messages during
deferred probing.

The remaining -ENODEV returns for missing device tree node and
slave-addr property are left unchanged as those are permanent
configuration errors unrelated to probe deferral.

Signed-off-by: Artem Lytkin &lt;iprintercanon@gmail.com&gt;
Link: https://patch.msgid.link/20260216202011.1806-1-iprintercanon@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: nvec: apply udelay only after the first byte has been sent</title>
<updated>2026-01-11T12:53:56+00:00</updated>
<author>
<name>Marc Dietrich</name>
<email>marvin24@gmx.de</email>
</author>
<published>2026-01-03T10:14:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=db9b736bce3dd897fe4602c8279f9811112fd82a'/>
<id>db9b736bce3dd897fe4602c8279f9811112fd82a</id>
<content type='text'>
Due to a HW bug in the Tegra20 SoC a udelay needs to be added after
the first byte has been sent to the EC (I2C master). Move it to the
correct position and add a comment that it should not be replaced by
usleep_range.

Signed-off-by: Marc Dietrich &lt;marvin24@gmx.de&gt;
Link: https://patch.msgid.link/20260103101439.14863-1-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to a HW bug in the Tegra20 SoC a udelay needs to be added after
the first byte has been sent to the EC (I2C master). Move it to the
correct position and add a comment that it should not be replaced by
usleep_range.

Signed-off-by: Marc Dietrich &lt;marvin24@gmx.de&gt;
Link: https://patch.msgid.link/20260103101439.14863-1-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
