Try flashing philz which is a safe kernel.
The above response is correct but I will help you with details :3
First go to settings >about and check the baseband version
the last 5 letters are what you are looking for.
Now download the philz kernel corresponding to your version
You can download tar.md5 file for odin
here is a small list of philz I found
link and this thread
link
Steps:
1. turn off your phone
2. Put phone in download mode (Volume down + menu + power simultaneously) it will ask you to press volume up to continue. Do it
3. Connect phone to PC using USB and open Odin. It should say "Added"
4. The "Auto reboot" and "F. reset time" must be checked ONLY
5. now click the PDA button and search for your md5 file of the kernel
6. click start
7. It will complete on its own and now the phone should reboot and work fine
If any questions, do ask and I will help if I can