LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-22-2022, 08:44 PM   #1
lolo123
LQ Newbie
 
Registered: Jun 2022
Posts: 22

Rep: Reputation: 0
Lightbulb f2fs not sure if this is a issue(checkpoint request fulfillment)


Hi dear all,
1. in f2fs_issue_checkpoint , this function will allocate a ckpt_req on the stack, and add it to issue_list then wait for ckpt_req to complete.
2. on the other hand , __checkpoint_and_complete_reqs will process the issue_list , iterate the issue_list and call complete for every entry.
3. because ckpt_req is allocated on stack, after complete is called , the ckpt_req might be freed , the next iteration might access freed memory.

Last edited by lolo123; 07-23-2022 at 03:28 AM.
 
Old 07-23-2022, 03:03 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,660

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
Quote:
Originally Posted by lolo123 View Post
Hi dear all,
1. in f2fs_issue_checkpoint , this function will allocate a ckpt_req on the stack, and add it to issue_list then wait for ckpt_req to complete.
2. on the other hand , __checkpoint_and_complete_reqs will process the issue_list , iterate the issue_list and call complete for every entry.
3. because ckpt_req is allocated on stack, after complete is called , the ckpt_req might be freed , the next iteration might access freed memory.
What version of F2FS in what kernel?
Have you read the site information about asking intelligent questions? If not, please do.
 
Old 07-25-2022, 12:14 AM   #3
lolo123
LQ Newbie
 
Registered: Jun 2022
Posts: 22

Original Poster
Rep: Reputation: 0
Hi guys,
I've created a patch for this issue , please take look , and confirm me if this is really a issue
Sorry , updated the broken link

Last edited by lolo123; 07-25-2022 at 03:44 AM.
 
Old 07-25-2022, 06:41 AM   #4
lolo123
LQ Newbie
 
Registered: Jun 2022
Posts: 22

Original Poster
Rep: Reputation: 0
confirmed , this is not a issue.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
f2fs filesystem will not grow on mdadm RAID10,o2 array with new drives added Eldarby Linux - Software 3 11-14-2017 06:09 PM
LXer: Samsung contributes F2FS NAND filesystem to Linux LXer Syndicated Linux News 0 10-08-2012 12:30 PM
LXer: Samsung Introduces New Linux File-System: F2FS LXer Syndicated Linux News 0 10-05-2012 07:10 PM
I'm not sure how this happened but I'm sure there is a lesson in there somewhere mreff555 Linux - Newbie 6 09-24-2012 02:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration