Problem
The patch you use contains the RT patch as a large number of individual files attached to the tar archive, and then compressed into the gz file. Running zcat (or friends) in a file will unzip it and then pass the result to patch .
However, since the result after decompressing the patch file is a .tar archive, this is also what is passed to patch , which will not work.
A simple solution
Instead, use only the single-file version of the RT patch, which is just a compressed .patch file (these versions can be recognized by getting the name "patch -..." instead of "patches -...", 3.18.9-rt5 can be downloaded here: https://www.kernel.org/pub/linux/kernel/projects/rt/3.18/older/patch-3.18.9-rt5.patch.gz ).
Then follow the instructions from RT Preempt Howto : (just adjust it in your own kernel / compression version)
Kernel fix
After booting, unzip the kernel archive and change to the kernel source directory. Launch the kernel with patch level p1:
tar xfj linux-2.6.23.1.tar.bz2 cd linux-2.6.23.1 bzcat ../patch-2.6.23.1-rt11.bz2 | patch -p1
source share