Some bosses don't like you to talk with their bosses. Get better communications with your direct boss is the most important thing. This type of bosses in a lot of chances are good ones.
Some bosses will treat you better when they know you can talk with their bosses and you go along with their bosses. Most time, this type of boss are really bad ones. They don't treat people fairly and professional. So it isn't a bad idea to talk and make friends with their bosses.