================================================================================
You are analyzing a kernel crash report. Your task is to explore the repository using available tools and gather enough context to completely understand all possible root causes of the crash and how to fix it.

================================================================================

STEP {current step number} of {maximum steps}

================================================================================

PREVIOUS SEARCHES AND RESULTS: # The results of the search_code or search_commits queries the agent made in the previous step
Query: search_commits("{regex1}")
Results: # List of upto 5 past commits with each truncated to 100 lines

===Commits matching in code changes===

===

Commit message:
{Commit Message 1}

Patch:
{Patch 1}

===

...

===

===Commits matching in messages===

===

Commit message:
{Commit Message 2}

Patch:
{Patch 2}

===

...

===

Query: search_code("{regex2}")
Results: # List of upto 5 code snippets, each showing the matching line with 2 lines of context before and after, and a header line showing the function that line is in

3{file1}={header line number}={function signature}
--
{file1}-{context line -2 number}-{context line -2}
{file1}-{context line -1 number}-{context line -1}
{file1}-{matching line number}-{matching line}
{file1}-{context line 1 number}-{context line 1}
{file1}-{context line 2 number}-{context line 2}


===

...


===

================================================================================

MEMORY: # List of notes the agent has made about the bug so far
- {note 1}
- {note 2}

================================================================================

CURRENTLY OPEN DEFINITIONS: # The symbol definitions the agent has searched for
File: {file1}		Symbol: {symbol1}		Lines {m1} to {m2}
```c
{Body of {symbol1}'s definition.}
```

File: {file2}		Symbol: {symbol2}		Lines {n1} to {n2}
```c
{Body of {symbol2}'s definition.}
```


================================================================================

AVAILABLE ACTIONS (write one action per line with no formatting inside <actions> tags):
<actions>
close_definition(filePath, symbolName, startLine)      Close a definition that is not relevant to the bug (e.g. debug functions like dump_stack)
search_definition(filePath, symbolName)    Open the definition of a specified symbol, which can be a function name, a struct name, a constant, a union or a macro
search_definition(symbolName)              Open the definition of a symbol when you don't know its file path. Use this to search for the definiton of symbols whose file you don't know.
search_code("regex pattern")               Search through all tracked files in the repository using git grep with regex pattern. Shows 2 context lines before and after each match, limited to 5 matches total.
                                           Examples: "function_name\(" matches exact function calls
                                                      "struct \w+_info" matches struct names ending in _info
search_commits("regex pattern")            Search commit messages and code changes in the repository using git log --grep and -G with regex pattern. Shows full commit message and complete patch for each matching commit. Limited to 5 matches total.
                                           Example: "handle->size|crypto_fun\(|ptr->" matches commits that access handle->size, or call crypto_fun, or dereference ptr.
done                                       End exploration because you have gathered enough context to understand the bug and propose a fix. You must only take this action if you are satisfied with the justification you provided in the thoughts section. If unsure, continue exploring. You should also write your justification after this action inside <justification></justification> tags.
                                           (followed by justification in <justification> tags)
</actions>
You should examine the evidence and write your thoughts about the current state with respect to the overall goal in the <thoughts> tags. You should always place any insights you gain from your analysis into your memory inside <memory> tags so that they are readily available. Think of it like handing over the task to a coworker who needs to pick up from where you left off. Write everything the coworker would need.  Focus on gathering all the relevant context and understanding the bug step-by-step, through careful reasoning steps.
================================================================================