pipe: fix limit checking in alloc_pipe_info()