If you accidentally lock your rear wheel while braking on a good traction surface, you should:

If you accidentally lock the rear brake on a good traction surface, keep it locked until you have completely stopped. Even with a locked rear wheel, you should still be able to control your motorcycle if it is upright and traveling in a straight line.
DMV Writen Test