Bug 8474 - i2c: Fix a potential use after free
Summary: i2c: Fix a potential use after free
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-19
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: daichx
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-11 09:55 UTC by daichx
Modified: 2024-04-18 09:39 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daichx inspur_group 2024-03-11 09:55:14 UTC
Free the adap structure only after we are done using it.
This patch just moves the put_device() down a bit to avoid the
use after free.
Comment 1 小龙 admin 2024-03-11 10:24:55 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2842
Comment 2 Joseph Qi alibaba_cloud_group 2024-04-18 09:39:42 UTC
(In reply to 小龙 from comment #1)
> The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2842

merged