A method for obtaining security between CPUs for a shared memory is provided to limit right movement between ports of a shared memory. A shared memory comprises the first and second ports and the first and second banks. The first bank is accessed by a CPU connected to the first port. The first bank is accessed by a CPU connected to the second port. The second bank is accessed by a CPU connected to the second port. An access path to the first bank of the second port is disconnected at a time when the second port is converted into the first port.