<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/hwmon/nzxt-smart2.c, branch master</title>
<subtitle>Linux kernel source tree.</subtitle>
<id>https://git.ilvokhin.com/linux.git/atom/drivers/hwmon/nzxt-smart2.c?h=master</id>
<link rel='self' href='https://git.ilvokhin.com/linux.git/atom/drivers/hwmon/nzxt-smart2.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/'/>
<updated>2026-07-08T03:03:02Z</updated>
<entry>
<title>hwmon: (nzxt-smart2) Stop device IO before calling hid_hw_stop</title>
<updated>2026-07-08T03:03:02Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2026-07-08T01:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=59d104b54b0b42e30fd2a68d24ee5c49dcc54d1e'/>
<id>urn:sha1:59d104b54b0b42e30fd2a68d24ee5c49dcc54d1e</id>
<content type='text'>
Calling hid_hw_stop() does not stop the device IO.
This results in a race condition between hid_input_report() and the point
immediately following the execution of hid_device_io_start() within
the driver probe function. If the probe operation fails after "io start"
has been initiated, this race condition will result in a UAF vulnerability.

Fix the problem by calling hid_device_io_stop() before calling
hid_hw_stop().

Reported-by: Sashiko &lt;sashiko-bot@kernel.org&gt;
Fixes: 53e68c20aeb1e ("hwmon: add driver for NZXT RGB&amp;Fan Controller/Smart Device v2")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nzxt-smart2) Use devm_mutex_init()</title>
<updated>2025-09-07T23:35:18Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2025-09-07T10:20:20Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=552e369db339c4d9f29a5569ec2d661cb4353f40'/>
<id>urn:sha1:552e369db339c4d9f29a5569ec2d661cb4353f40</id>
<content type='text'>
Use devm_mutex_init() instead of hand-writing it.

This saves some LoC, improves readability and saves some space in the
generated .o file.

Before:
======
   text	   data	    bss	    dec	    hex	filename
  25878	  11329	    128	  37335	   91d7	drivers/hwmon/nzxt-smart2.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  25551	  11257	    128	  36936	   9048	drivers/hwmon/nzxt-smart2.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/f51fac0871ec7dbe4e28447ee4f774d028a53426.1757240403.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>move asm/unaligned.h to linux/unaligned.h</title>
<updated>2024-10-02T21:23:23Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-10-01T19:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=5f60d5f6bbc12e782fac78110b0ee62698f3b576'/>
<id>urn:sha1:5f60d5f6bbc12e782fac78110b0ee62698f3b576</id>
<content type='text'>
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.

auto-generated by the following:

for i in `git grep -l -w asm/unaligned.h`; do
	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
</content>
</entry>
<entry>
<title>hwmon: (nzxt-smart2) Add support for another version of NZXT RGB &amp; Fan Controller</title>
<updated>2024-05-29T22:55:35Z</updated>
<author>
<name>Aleksandr Mezin</name>
<email>mezin.alexander@gmail.com</email>
</author>
<published>2024-05-24T00:39:58Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=246e6426a87ee4dbb8cd08c9b43323263b5ab76f'/>
<id>urn:sha1:246e6426a87ee4dbb8cd08c9b43323263b5ab76f</id>
<content type='text'>
Add support for NZXT RGB &amp; Fan Controller with USB ID 1e71:2020.

Fan speed control reported to be working with existing userspace (hidraw)
software, so it should be compatible. Fan channel count is the same.
No known differences from already supported devices, at least regarding
fan speed control and initialization.

Signed-off-by: Aleksandr Mezin &lt;mezin.alexander@gmail.com&gt;
Link: https://lore.kernel.org/r/20240524004040.121044-1-mezin.alexander@gmail.com
[groeck: Adjusted subject and description]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: nzxt: constify pointers to hwmon_channel_info</title>
<updated>2023-04-19T14:08:37Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2023-04-06T20:35:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=98ce1fc134ef4450c798a9e198261b6d0b9b7cb2'/>
<id>urn:sha1:98ce1fc134ef4450c798a9e198261b6d0b9b7cb2</id>
<content type='text'>
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nzxt-smart2) handle failure of devm_add_action in nzxt_smart2_hid_probe</title>
<updated>2023-04-19T14:08:31Z</updated>
<author>
<name>Kang Chen</name>
<email>void0red@gmail.com</email>
</author>
<published>2023-02-27T09:15:34Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=dbfeafdad31c52da8965819a298ed3b0127025e7'/>
<id>urn:sha1:dbfeafdad31c52da8965819a298ed3b0127025e7</id>
<content type='text'>
1. replace the devm_add_action with devm_add_action_or_reset to ensure
the mutex lock can be destroyed when it fails.
2. use local wrapper function mutex_fini instead of mutex_destroy to
avoid undefined behaviours.
3. add a check of devm_add_action_or_reset and return early when it fails.

Link: https://lore.kernel.org/all/f5043281-9b3e-e454-16fe-ef4cde36dfdb@roeck-us.net
Signed-off-by: Kang Chen &lt;void0red@gmail.com&gt;
Link: https://lore.kernel.org/r/20230227091534.907101-1-void0red@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nzxt-smart2) add another USB ID</title>
<updated>2023-04-19T14:08:31Z</updated>
<author>
<name>Aleksandr Mezin</name>
<email>mezin.alexander@gmail.com</email>
</author>
<published>2023-02-19T10:59:19Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=4a148e9b1ee04e608263fa9536a96214d5561220'/>
<id>urn:sha1:4a148e9b1ee04e608263fa9536a96214d5561220</id>
<content type='text'>
This seems to be a new revision of the device. RGB controls have changed,
but this driver doesn't touch them anyway.

Fan speed control reported to be working with existing userspace (hidraw)
software, so I assume it's compatible. Fan channel count is the same.

Recently added (0x1e71, 0x2019) seems to be the same device.

Discovered in liquidctl project:

https://github.com/liquidctl/liquidctl/issues/541

Signed-off-by: Aleksandr Mezin &lt;mezin.alexander@gmail.com&gt;
Link: https://lore.kernel.org/r/20230219105924.333007-1-mezin.alexander@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nzxt-smart2) Add device id</title>
<updated>2023-02-03T15:30:09Z</updated>
<author>
<name>Herman Fries</name>
<email>baracoder@googlemail.com</email>
</author>
<published>2022-12-14T19:46:28Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=e247510e1baad04e9b7b8ed7190dbb00989387b9'/>
<id>urn:sha1:e247510e1baad04e9b7b8ed7190dbb00989387b9</id>
<content type='text'>
Adding support for new device id
1e71:2019 NZXT NZXT RGB &amp; Fan Controller

Signed-off-by: Herman Fries &lt;baracoder@googlemail.com&gt;
Link: https://lore.kernel.org/r/20221214194627.135692-1-baracoder@googlemail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nzxt-smart2) add another USB ID</title>
<updated>2022-09-19T13:17:06Z</updated>
<author>
<name>Aleksandr Mezin</name>
<email>mezin.alexander@gmail.com</email>
</author>
<published>2022-09-18T11:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=887b22ec07e56c680c7e5c4b6e2f47b7b28a48fc'/>
<id>urn:sha1:887b22ec07e56c680c7e5c4b6e2f47b7b28a48fc</id>
<content type='text'>
No known differences from already supported devices.

Signed-off-by: Aleksandr Mezin &lt;mezin.alexander@gmail.com&gt;
Link: https://lore.kernel.org/r/20220918115506.61870-1-mezin.alexander@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nzxt-smart2) make array detect_fans_report static const</title>
<updated>2022-01-10T01:10:58Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-01-09T19:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=00f5117c5f785b95b13663e52dcdcf684a47d4e3'/>
<id>urn:sha1:00f5117c5f785b95b13663e52dcdcf684a47d4e3</id>
<content type='text'>
Don't populate the read-only array detect_fans_report on the stack but
instead it static const. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Link: https://lore.kernel.org/r/20220109194558.45811-1-colin.i.king@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
