Let $X$ be a Banach space, $H\subseteq X$ be a dense hyperplane, and $f$ be a **continuous** linear functional defined on $H$. Then $f$ is uniformly continuous and hence it admits a unique continuous extension to $X$.


However, let us instead choose a **discontinuous** linear functional $g$ extending $f$ to the whole of $X$.


One cannot say that $g$ is too bad since, after all, its restriction to a big subspace, namely $H$, is continuous.



> 
> Does every Banach space admit a linear functional which is either zero or
> discontinuous when restricted to every infinite dimensional subspace?
> 
> 
> 


The kernel of such a functional will then have a dense intersection with every infinite dimensional subspace.



Wildly discontinuous linear functionals
No non zero linear functional has the property you ask for. Suppose $F$ is a non zero linear functional. Choose $x$ s.t. $F(x)=1$. Let $G$ be a continuous linear functional s.t. $G(x)=1$. Let $Y$ be the intersection of the kernels of $F$ and $G$, so that $Y$ has codimension $2$. Then $F$ is continuous on the linear span of $Y$ and $x$ since $F$ agrees with $G$ on this codimension one subspace.


