From: Yang Yingliang
check the alloc_workqueue return value in radeon_crtc_init()
to avoid null-ptr-deref.
Fixes: fa7f517cb26e ("drm/radeon: rework page flip handling v4")
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/radeon/radeon_display.c | 7 ++-
1 file changed, 6 insert
Add the missing unlock before return from function
amdgpu_ras_debugfs_table_read() in the error handling
case.
Fixes: 9b790694a031 ("drm/amdgpu: RAS EEPROM table is now in debugfs")
Reported-by: Hulk Robot
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_ee
: warning:
variable ‘is_dp’ set but not used [-Wunused-but-set-variable]
bool is_dp;
^
Reported-by: Hulk Robot
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc
Fix the compile warning:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:892:26: warning:
variable ‘stream’ set but not used [-Wunused-but-set-variable]
struct dc_stream_state *stream;
^~
Reported-by: Hulk Robot
Signed-off-by: Yang Yingliang
enc314_stream_encoder_dp_blank is only used in dcn314_dio_stream_encoder.c now,
change it to static.
Fixes: c9c2ff53cc20 ("drm/amd/display: Add explicit FIFO disable for DP blank")
Signed-off-by: Yang Yingliang
---
.../gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c | 2
SDMA microcode")
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
index 3949b7e3907f..43cf8632cc1a 10
e_dsc" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko]
undefined!
Fixes: 20dad3813b3c ("drm/amd/display: Add a helper to map ODM/MPC/Multi-Plane
resources")
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4
1 file changed, 4 insertions(+)
di
After commit 571c05365892 ("drm/amdgpu: switch sdma buffer function
tear down to a helper"), the variable 'ring' is not used anymore, it
can be removed.
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 --
1 file changed, 2 deletions(-)
diff --git a
If kset_register() fails, the refcount of device is not 0, the name allocated
in dev_set_name() is leaked. Fix this by calling kset_put(), so that it will
be freed in callback function kobject_cleanup().
Fixes: a6c40b178092 ("drm/amdgpu: Show IP discovery in sysfs")
Signed-off-by: Yang
Hi,
On 2022/10/19 11:37, Luben Tuikov wrote:
On 2022-10-18 04:05, Yang Yingliang wrote:
If kset_register() fails, the refcount of device is not 0, the name allocated
in dev_set_name() is leaked. Fix this by calling kset_put(), so that it will
be freed in callback function kobject_cleanup
: Show IP discovery in sysfs")
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 3993e6134914
e0
[<f51dc49f>] bus_register+0x132/0x350
[<7d91c2e5>] subsys_register+0x23/0x220
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang
---
drivers/base/bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/driv
003f8aca68>] kobject_set_name+0xab/0xe0
[<249f7816>] kset_create_and_add+0x72/0x200
Fixes: b727c702896f ("kset: add kset_create_and_add function")
Signed-off-by: Yang Yingliang
---
lib/kobject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/
know what to do here, then fixes this leaks
by calling kset_put() from callers.
Liu Shixin (1):
ubifs: Fix memory leak in ubifs_sysfs_init()
Yang Yingliang (10):
kset: fix documentation for kset_register()
kset: add null pointer check in kset_put()
bus: fix possible memory leak in
kset_put() can be called from drivers, add null pointer
check to make it more robust.
Signed-off-by: Yang Yingliang
---
include/linux/kobject.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 57fb972fea05
gt;] kstrdup+0x3a/0x70
[<ead2b281>] kstrdup_const+0x63/0x80
[<3e5cf8f7>] kvasprintf_const+0x149/0x180
[<c4d949ff>] kobject_set_name_vargs+0x56/0x150
[<44611660>] kobject_set_name+0xab/0xe0
Fixes: bf9e697ecd42 ("f2fs: e
: Show IP discovery in sysfs")
Signed-off-by: Yang Yingliang
Reviewed-by: Luben Tuikov
---
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_dis
gt;] kstrdup+0x3a/0x70
[<4a0e01d2>] kstrdup_const+0x63/0x80
[<051b6cda>] kvasprintf_const+0x149/0x180
[<4dc51dad>] kobject_set_name_vargs+0x56/0x150
[<b30f0bad>] kobject_set_name+0xab/0xe0
Fixes: 168e9a76200c ("erofs:
me+0xab/0xe0
[<700151fb>] fw_cfg_sysfs_probe+0xa5b/0x1320
Fixes: 246c46ebaeae ("firmware: create directory hierarchy for sysfs fw_cfg
entries")
Signed-off-by: Yang Yingliang
---
drivers/firmware/qemu_fw_cfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
caller, if it is called in
kset_register().
So make the function documentation more explicit about calling
kset_put() in the error path of caller.
Signed-off-by: Yang Yingliang
---
lib/kobject.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/kobject.c b/lib/kobject.c
index
it.
Fixes: 2e3cbf425804 ("ubifs: Export filesystem error counters")
Signed-off-by: Liu Shixin
Signed-off-by: Yang Yingliang
---
fs/ubifs/sysfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
index 06ad8fa1fcfb..54270ad36321 100644
--- a/fs/ubifs/sy
an up direct setting of the name of a kset")
Signed-off-by: Yang Yingliang
---
fs/ocfs2/cluster/masklog.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c
index 563881ddbf00..7f9ba816d955 100644
--- a/fs/ocfs2/clus
() in error path, because
the 'cls' will be freed in callback function class_release() and it also
freed in error path, it will cause double free.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang
---
drivers/base/class.c | 6 ++
1 file changed, 6 inserti
On 2022/10/21 13:37, Greg KH wrote:
On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote:
On 2022-10-20 22:20, Yang Yingliang wrote:
The previous discussion link:
https://lore.kernel.org/lkml/0db486eb-6927-927e-3629-958f8f211...@huawei.com/T/
The very first discussion on this was
On 2022/10/21 17:08, Luben Tuikov wrote:
On 2022-10-21 04:59, Yang Yingliang wrote:
On 2022/10/21 16:36, Greg KH wrote:
On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote:
On 2022/10/21 13:37, Greg KH wrote:
On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote:
On 2022
Hi,
On 2022/10/21 13:29, Luben Tuikov wrote:
On 2022-10-20 22:20, Yang Yingliang wrote:
The previous discussion link:
https://lore.kernel.org/lkml/0db486eb-6927-927e-3629-958f8f211...@huawei.com/T/
The very first discussion on this was here:
https://www.spinics.net/lists/dri-devel/msg368077
On 2022/10/21 13:34, Luben Tuikov wrote:
On 2022-10-20 22:20, Yang Yingliang wrote:
kset_register() is currently used in some places without calling
kset_put() in error path, because the callers think it should be
kset internal thing to do, but the driver core can not know what
caller doing
On 2022/10/21 16:36, Greg KH wrote:
On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote:
On 2022/10/21 13:37, Greg KH wrote:
On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote:
On 2022-10-20 22:20, Yang Yingliang wrote:
The previous discussion link:
https
On 2022/10/21 16:36, Greg KH wrote:
On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote:
On 2022/10/21 13:37, Greg KH wrote:
On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote:
On 2022-10-20 22:20, Yang Yingliang wrote:
The previous discussion link:
https
-20 22:20, Yang Yingliang wrote:
The previous discussion link:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F0db486eb-6927-927e-3629-958f8f211194%40huawei.com%2FT%2F&data=05%7C01%7Cluben.tuikov%40amd.com%7Cd41da3fd6449492d01f808dab33c
ister() fails.
Suggested-by: Luben Tuikov
Signed-off-by: Yang Yingliang
---
v1 -> v2:
Free name inside of kset_register() instead of calling kset_put()
in drivers.
---
lib/kobject.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/kobject.c b/lib/kobject
On 2022/10/24 21:52, Greg KH wrote:
On Mon, Oct 24, 2022 at 08:19:10PM +0800, Yang Yingliang wrote:
Inject fault while loading module, kset_register() may fail.
If it fails, the name allocated by kobject_set_name() which
is called before kset_register() is leaked, because refcount
of kobject
On 2022/10/24 22:53, Greg KH wrote:
On Mon, Oct 24, 2022 at 10:39:44PM +0800, Yang Yingliang wrote:
On 2022/10/24 21:52, Greg KH wrote:
On Mon, Oct 24, 2022 at 08:19:10PM +0800, Yang Yingliang wrote:
Inject fault while loading module, kset_register() may fail.
If it fails, the name
Hi,
On 2022/10/25 5:25, Luben Tuikov wrote:
On 2022-10-24 17:06, Luben Tuikov wrote:
On 2022-10-24 08:19, Yang Yingliang wrote:
Inject fault while loading module, kset_register() may fail.
If it fails, the name allocated by kobject_set_name() which
is called before kset_register() is leaked
will cause double free, so just call kfree_const() to free the
name and set it to NULL to avoid accessing bad pointer in callers.
With this fix, the callers don't need care about freeing the name
and may call kset_put() if kset_register() fails.
Suggested-by: Luben Tuikov
Signed-off-by:
refcount leak.
Fixes: 3f12acc8d6d4 ("drm/amdgpu: put the audio codec into suspend state before
gpu reset V3")
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Add missing mutex_unlock() in error path in
dm_handle_mst_sideband_msg_ready_event().
Fixes: 4f6d9e38c4d2 ("drm/amd/display: Add polling method to handle MST reply
packet")
Signed-off-by: Yang Yingliang
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 +
1 file
37 matches
Mail list logo