Uplink resource allocation in Device-to-Device (D2D) enabled cellular systems is studied. The sum-rate maximization problem is transformed into a concise Binary Integer Programming (BIP) problem, which is NP-hard. Then based on the Canonical duality theory, a dual problem is obtained. The dual problem is a convex problem in a continuous domain. Under appropriate conditions, the dual method attains the global optimal solution of the primal problem with zero duality gap. An algorithm based on the Barrier method is proposed to solve the dual problem. Simulation results show that the proposed algorithm performs close to optimal and outperforms the existing algorithm.