diff options
author | maximilian attems <max@stro.at> | 2008-01-10 06:57:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-10 06:57:29 -0500 |
commit | 27d1cba21fcc50c37eef5042c6be9fa7135e88fc (patch) | |
tree | 1898ed4682af6e0fd7d54383825a61877d9703b9 /net | |
parent | 0bcceadceb0907094ba4e40bf9a7cd9b080f13fb (diff) |
[AX25]: Kill user triggable printks.
sfuzz can easily trigger any of those.
move the printk message to the corresponding comment: makes the
intention of the code clear and easy to pick up on an scheduled
removal. as bonus simplify the braces placement.
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ax25/af_ax25.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 8378afd54b30..ecb14ee00498 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -1109,21 +1109,19 @@ static int __must_check ax25_connect(struct socket *sock, | |||
1109 | * some sanity checks. code further down depends on this | 1109 | * some sanity checks. code further down depends on this |
1110 | */ | 1110 | */ |
1111 | 1111 | ||
1112 | if (addr_len == sizeof(struct sockaddr_ax25)) { | 1112 | if (addr_len == sizeof(struct sockaddr_ax25)) |
1113 | /* support for this will go away in early 2.5.x */ | 1113 | /* support for this will go away in early 2.5.x |
1114 | printk(KERN_WARNING "ax25_connect(): %s uses obsolete socket structure\n", | 1114 | * ax25_connect(): uses obsolete socket structure |
1115 | current->comm); | 1115 | */ |
1116 | } | 1116 | ; |
1117 | else if (addr_len != sizeof(struct full_sockaddr_ax25)) { | 1117 | else if (addr_len != sizeof(struct full_sockaddr_ax25)) |
1118 | /* support for old structure may go away some time */ | 1118 | /* support for old structure may go away some time |
1119 | * ax25_connect(): uses old (6 digipeater) socket structure. | ||
1120 | */ | ||
1119 | if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || | 1121 | if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || |
1120 | (addr_len > sizeof(struct full_sockaddr_ax25))) { | 1122 | (addr_len > sizeof(struct full_sockaddr_ax25))) |
1121 | return -EINVAL; | 1123 | return -EINVAL; |
1122 | } | ||
1123 | 1124 | ||
1124 | printk(KERN_WARNING "ax25_connect(): %s uses old (6 digipeater) socket structure.\n", | ||
1125 | current->comm); | ||
1126 | } | ||
1127 | 1125 | ||
1128 | if (fsa->fsa_ax25.sax25_family != AF_AX25) | 1126 | if (fsa->fsa_ax25.sax25_family != AF_AX25) |
1129 | return -EINVAL; | 1127 | return -EINVAL; |
@@ -1467,21 +1465,20 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1467 | goto out; | 1465 | goto out; |
1468 | } | 1466 | } |
1469 | 1467 | ||
1470 | if (addr_len == sizeof(struct sockaddr_ax25)) { | 1468 | if (addr_len == sizeof(struct sockaddr_ax25)) |
1471 | printk(KERN_WARNING "ax25_sendmsg(): %s uses obsolete socket structure\n", | 1469 | /* ax25_sendmsg(): uses obsolete socket structure */ |
1472 | current->comm); | 1470 | ; |
1473 | } | 1471 | else if (addr_len != sizeof(struct full_sockaddr_ax25)) |
1474 | else if (addr_len != sizeof(struct full_sockaddr_ax25)) { | 1472 | /* support for old structure may go away some time |
1475 | /* support for old structure may go away some time */ | 1473 | * ax25_sendmsg(): uses old (6 digipeater) |
1474 | * socket structure. | ||
1475 | */ | ||
1476 | if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || | 1476 | if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || |
1477 | (addr_len > sizeof(struct full_sockaddr_ax25))) { | 1477 | (addr_len > sizeof(struct full_sockaddr_ax25))) { |
1478 | err = -EINVAL; | 1478 | err = -EINVAL; |
1479 | goto out; | 1479 | goto out; |
1480 | } | 1480 | } |
1481 | 1481 | ||
1482 | printk(KERN_WARNING "ax25_sendmsg(): %s uses old (6 digipeater) socket structure.\n", | ||
1483 | current->comm); | ||
1484 | } | ||
1485 | 1482 | ||
1486 | if (addr_len > sizeof(struct sockaddr_ax25) && usax->sax25_ndigis != 0) { | 1483 | if (addr_len > sizeof(struct sockaddr_ax25) && usax->sax25_ndigis != 0) { |
1487 | int ct = 0; | 1484 | int ct = 0; |