<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/platform/loongarch, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/platform/loongarch?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/platform/loongarch?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-29T08:29:31Z</updated>
<entry>
<title>platform/loongarch: laptop: Fix possible UAF and simplify generic_acpi_laptop_init()</title>
<updated>2022-10-29T08:29:31Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-10-29T08:29:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d81916910f7498fe7a768697e0101d488f9fe665'/>
<id>urn:sha1:d81916910f7498fe7a768697e0101d488f9fe665</id>
<content type='text'>
Currently the return value of 'sub_driver-&gt;init' is not checked. If
sparse_keymap_setup() called in the init function fails, 'generic_
inputdev' is freed, then it will lead a UAF when using it in generic_
acpi_laptop_init(). Fix it by checking the return value and setting
generic_inputdev to NULL after free, so as to avoid double free it.

The error code in generic_subdriver_init() is always negative, so the
return of generic_subdriver_init() can be simplified.

Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>platform/loongarch: laptop: Adjust resume order for loongson_hotkey_resume()</title>
<updated>2022-10-29T08:29:31Z</updated>
<author>
<name>Huacai Chen</name>
<email>chenhuacai@loongson.cn</email>
</author>
<published>2022-10-29T08:29:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fbe605ab157b174385b3f19ce33928d3548a9b09'/>
<id>urn:sha1:fbe605ab157b174385b3f19ce33928d3548a9b09</id>
<content type='text'>
Some laptops don't support SW_LID, but still have backlight control,
move backlight resuming before SW_LID event handling so as to avoid
backlight mistake due to early return.

Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>LoongArch: Add ACPI-based generic laptop driver</title>
<updated>2022-10-12T08:36:20Z</updated>
<author>
<name>Jianmin Lv</name>
<email>lvjianmin@loongson.cn</email>
</author>
<published>2022-10-12T08:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6246ed09111fbb17168619006b4380103c6673c3'/>
<id>urn:sha1:6246ed09111fbb17168619006b4380103c6673c3</id>
<content type='text'>
This add ACPI-based generic laptop driver for Loongson-3. Some of the
codes are derived from drivers/platform/x86/thinkpad_acpi.c.

Signed-off-by: Jianmin Lv &lt;lvjianmin@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
</feed>
