Skip to content

Conversation

@seokhun-eom24
Copy link
Contributor

Add a break statement to the COMPIOC_DECOMPRESS case in comp_ioctl.
This fix ensures proper handling of decompression requests.

Add a break statement to the COMPIOC_DECOMPRESS case in comp_ioctl.
This fix ensures proper handling of decompression requests.

Signed-off-by: seokhun-eom <[email protected]>
Copy link
Member

@pcs1265 pcs1265 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@jeongarmy jeongarmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

return -EINVAL;
}
ret = decompress_block(comp_info->output_buffer, &comp_info->output_size, comp_info->input_buffer, &comp_info->input_size);
if (ret == ENOMEM) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error return valuse must be negative.
Could you please check return values of decompress_block and change to negative?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the decompress_block function the return of ENOMEM indicates that the output buffer was insufficient, resulting in only a portion of the data being decompressed while the remainder remained compressed.
In the LZMA algorithm this scenario is designed to return OK, whereas the MINIZ algorithm returns a Z_BUF_ERROR.
Would it be appropriate to modify this to return an error instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it from new PR.
#6911

if (ret == ENOMEM) {
bcmpdbg("Output buffer allocated is not sufficient\n");
}
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not related to this pr but please check code line where return just ERROR, it is wrong. each of ioctl should return one of errno.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for review. I'll make another PR for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a new PR from your comment.
#6911

if (ret == ENOMEM) {
bcmpdbg("Output buffer allocated is not sufficient\n");
}
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not related to this pr but please check code line where return just ERROR, it is wrong. each of ioctl should return one of errno.

Copy link
Contributor

@Sambhavi-1 Sambhavi-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR fix the required decompression reqin comp_ioctl

@jeongarmy jeongarmy merged commit 6838104 into Samsung:master Jul 29, 2025
11 checks passed
@seokhun-eom24 seokhun-eom24 deleted the 250724-fix-compress-ioctl branch August 1, 2025 02:52
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.

6 participants