PURPOSE: This phase I trial is studying the side effects and best dose of vorinostat when given together with lenalidomide in treating patients with relapsed or refractory Hodgkin lymphoma or non-Hodgkin lymphoma.