-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant static member m_prelimEnabled
The buffer manager detected whether the KMD supports prelim interface and set `m_prelimEnabled` accordingly. Then the buffer manager diverged in some operations by checking `m_prelimEnabled`. However, `m_prelimEnabled` was a static member and kept on once it is set, which means it would cache the result of previous detection. Assuming we have two Intel GPUs, one (GPU A) supporting prelim interface while the other one (GPU B) not, if we initialize the buffer manager on GPU A first, and then initialize the buffer manager on GPU B in the same process, the program will crash because it uses incorrect result of `m_prelimEnabled`. In fact, use of m_prelimEnabled is unnecessary. We can safely derive the same semantics from checking nullness of the member `prelim` in the buffer manager -- `prelim` would be non-null if and only if the KMD supports prelim interface. So let's remove the redundant member. Tracked-On: OAM-124779 Signed-off-by: Weifeng Liu <[email protected]>
- Loading branch information
Showing
3 changed files
with
18 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters