Skip to content

Commit

Permalink
net: socket: make bond ioctls go through compat_ifreq_ioctl()
Browse files Browse the repository at this point in the history
Same story as before, these use struct ifreq and thus need
to be read with the shorter version to not cause faults.

Cc: stable@vger.kernel.org
Fixes: f92d4fc ("kill bond_ioctl()")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Johannes Berg authored and David S. Miller committed Jan 30, 2019
1 parent c6c9fee commit 9840613
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -3258,16 +3258,16 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
case SIOCGMIIPHY:
case SIOCGMIIREG:
case SIOCSMIIREG:
case SIOCBONDENSLAVE:
case SIOCBONDRELEASE:
case SIOCBONDSETHWADDR:
case SIOCBONDCHANGEACTIVE:
return compat_ifreq_ioctl(net, sock, cmd, argp);

case SIOCSARP:
case SIOCGARP:
case SIOCDARP:
case SIOCATMARK:
case SIOCBONDENSLAVE:
case SIOCBONDRELEASE:
case SIOCBONDSETHWADDR:
case SIOCBONDCHANGEACTIVE:
return sock_do_ioctl(net, sock, cmd, arg);
}

Expand Down

0 comments on commit 9840613

Please sign in to comment.