Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MdeModulePkg: Add a check and close BlockIo2 protocol in DiskIoDriverBindingStart. #10755

Closed

Conversation

kanagavels97
Copy link
Contributor

MdeModulePkg: Add a check and close BlockIo2 protocol in DiskIoDriverBindingStart.

REF: #10727

The check needs to be added for the BlockIo2 protocol in the ErrorExit, and it should be closed properly if the BlockIo2 protocol is opened.

Description

During the DiskIoDriverBindingStart, both the BlockIo and BlockIo2 protocols are opened for the specified controller handle. The Instance->SharedWorkingBuffer is then allocated based on the BlockSize. If the BlockSize is zero, indicating that the handle does not support Read/Write operations, the buffer will not be allocated. A NULL check is performed on the SharedWorkingBuffer, and if it is NULL, the process jumps to the ErrorExit. In the ErrorExit section, only the BlockIo protocol is closed, while the BlockIo2 protocol remains open.

DiskIoDriverBindingStart.

REF: tianocore#10727

The check needs to be added for the BlockIo2 protocol in the ErrorExit,
and it should be closed properly if the BlockIo2 protocol is opened.
@kanagavels97
Copy link
Contributor Author

Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant