]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/unix/af_unix.c
gso: Fix support for linear packets
[linux-2.6-omap-h63xx.git] / net / unix / af_unix.c
index c6250d0055d2f1badce36d7d27e2f4edeed3bf00..baac91049b0ea0efcafb0259ff4146cc2d0e41f6 100644 (file)
@@ -836,7 +836,11 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
                err = mnt_want_write(nd.path.mnt);
                if (err)
                        goto out_mknod_dput;
+               err = security_path_mknod(&nd.path, dentry, mode, 0);
+               if (err)
+                       goto out_mknod_drop_write;
                err = vfs_mknod(nd.path.dentry->d_inode, dentry, mode, 0);
+out_mknod_drop_write:
                mnt_drop_write(nd.path.mnt);
                if (err)
                        goto out_mknod_dput;
@@ -1174,8 +1178,7 @@ out_unlock:
                unix_state_unlock(other);
 
 out:
-       if (skb)
-               kfree_skb(skb);
+       kfree_skb(skb);
        if (newsk)
                unix_release_sock(newsk, 0);
        if (other)