lkml.org 
[lkml]   [2017]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[tip:locking/core 37/41] drivers/block//drbd/drbd_receiver.c:1159:1: warning: the frame size of 1072 bytes is larger than 1024 bytes
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head: e26f34a407aec9c65bce2bc0c838fabe4f051fc6
commit: d0541b0fa64b36665d6261079974a26943c75009 [37/41] locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING
config: s390-default_defconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d0541b0fa64b36665d6261079974a26943c75009
# save the attached .config to linux build tree
make.cross ARCH=s390

All warnings (new ones prefixed by >>):

drivers/block//drbd/drbd_receiver.c: In function 'conn_connect':
>> drivers/block//drbd/drbd_receiver.c:1159:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
}
^

vim +1159 drivers/block//drbd/drbd_receiver.c

b411b3637 Philipp Reisner 2009-09-25 923
b411b3637 Philipp Reisner 2009-09-25 924 /*
b411b3637 Philipp Reisner 2009-09-25 925 * return values:
b411b3637 Philipp Reisner 2009-09-25 926 * 1 yes, we have a valid connection
b411b3637 Philipp Reisner 2009-09-25 927 * 0 oops, did not work out, please try again
b411b3637 Philipp Reisner 2009-09-25 928 * -1 peer talks different language,
b411b3637 Philipp Reisner 2009-09-25 929 * no point in trying again, please go standalone.
b411b3637 Philipp Reisner 2009-09-25 930 * -2 We do not have a network config...
b411b3637 Philipp Reisner 2009-09-25 931 */
bde89a9e1 Andreas Gruenbacher 2011-05-30 932 static int conn_connect(struct drbd_connection *connection)
b411b3637 Philipp Reisner 2009-09-25 933 {
7da358625 Philipp Reisner 2011-12-19 934 struct drbd_socket sock, msock;
c06ece6ba Andreas Gruenbacher 2011-06-21 935 struct drbd_peer_device *peer_device;
44ed167da Philipp Reisner 2011-04-19 936 struct net_conf *nc;
5d0b17f1a Philipp Reisner 2014-03-18 937 int vnr, timeout, h;
5d0b17f1a Philipp Reisner 2014-03-18 938 bool discard_my_data, ok;
197296ffe Philipp Reisner 2012-03-26 939 enum drbd_state_rv rv;
7a426fd8d Philipp Reisner 2012-07-12 940 struct accept_wait_data ad = {
bde89a9e1 Andreas Gruenbacher 2011-05-30 941 .connection = connection,
7a426fd8d Philipp Reisner 2012-07-12 942 .door_bell = COMPLETION_INITIALIZER_ONSTACK(ad.door_bell),
7a426fd8d Philipp Reisner 2012-07-12 943 };
b411b3637 Philipp Reisner 2009-09-25 944
bde89a9e1 Andreas Gruenbacher 2011-05-30 945 clear_bit(DISCONNECT_SENT, &connection->flags);
bde89a9e1 Andreas Gruenbacher 2011-05-30 946 if (conn_request_state(connection, NS(conn, C_WF_CONNECTION), CS_VERBOSE) < SS_SUCCESS)
b411b3637 Philipp Reisner 2009-09-25 947 return -2;
b411b3637 Philipp Reisner 2009-09-25 948
7da358625 Philipp Reisner 2011-12-19 949 mutex_init(&sock.mutex);
bde89a9e1 Andreas Gruenbacher 2011-05-30 950 sock.sbuf = connection->data.sbuf;
bde89a9e1 Andreas Gruenbacher 2011-05-30 951 sock.rbuf = connection->data.rbuf;
7da358625 Philipp Reisner 2011-12-19 952 sock.socket = NULL;
7da358625 Philipp Reisner 2011-12-19 953 mutex_init(&msock.mutex);
bde89a9e1 Andreas Gruenbacher 2011-05-30 954 msock.sbuf = connection->meta.sbuf;
bde89a9e1 Andreas Gruenbacher 2011-05-30 955 msock.rbuf = connection->meta.rbuf;
7da358625 Philipp Reisner 2011-12-19 956 msock.socket = NULL;
7da358625 Philipp Reisner 2011-12-19 957
0916e0e30 Andreas Gruenbacher 2011-03-21 958 /* Assume that the peer only understands protocol 80 until we know better. */
bde89a9e1 Andreas Gruenbacher 2011-05-30 959 connection->agreed_pro_version = 80;
b411b3637 Philipp Reisner 2009-09-25 960
bde89a9e1 Andreas Gruenbacher 2011-05-30 961 if (prepare_listen_socket(connection, &ad))
7a426fd8d Philipp Reisner 2012-07-12 962 return 0;
b411b3637 Philipp Reisner 2009-09-25 963
b411b3637 Philipp Reisner 2009-09-25 964 do {
2bf896213 Andreas Gruenbacher 2011-03-28 965 struct socket *s;
b411b3637 Philipp Reisner 2009-09-25 966
bde89a9e1 Andreas Gruenbacher 2011-05-30 967 s = drbd_try_connect(connection);
b411b3637 Philipp Reisner 2009-09-25 968 if (s) {
7da358625 Philipp Reisner 2011-12-19 969 if (!sock.socket) {
7da358625 Philipp Reisner 2011-12-19 970 sock.socket = s;
bde89a9e1 Andreas Gruenbacher 2011-05-30 971 send_first_packet(connection, &sock, P_INITIAL_DATA);
7da358625 Philipp Reisner 2011-12-19 972 } else if (!msock.socket) {
bde89a9e1 Andreas Gruenbacher 2011-05-30 973 clear_bit(RESOLVE_CONFLICTS, &connection->flags);
7da358625 Philipp Reisner 2011-12-19 974 msock.socket = s;
bde89a9e1 Andreas Gruenbacher 2011-05-30 975 send_first_packet(connection, &msock, P_INITIAL_META);
b411b3637 Philipp Reisner 2009-09-25 976 } else {
1ec861ebd Andreas Gruenbacher 2011-07-06 977 drbd_err(connection, "Logic error in conn_connect()\n");
b411b3637 Philipp Reisner 2009-09-25 978 goto out_release_sockets;
b411b3637 Philipp Reisner 2009-09-25 979 }
b411b3637 Philipp Reisner 2009-09-25 980 }
b411b3637 Philipp Reisner 2009-09-25 981
5d0b17f1a Philipp Reisner 2014-03-18 982 if (connection_established(connection, &sock.socket, &msock.socket))
b411b3637 Philipp Reisner 2009-09-25 983 break;
b411b3637 Philipp Reisner 2009-09-25 984
b411b3637 Philipp Reisner 2009-09-25 985 retry:
bde89a9e1 Andreas Gruenbacher 2011-05-30 986 s = drbd_wait_for_connect(connection, &ad);
b411b3637 Philipp Reisner 2009-09-25 987 if (s) {
bde89a9e1 Andreas Gruenbacher 2011-05-30 988 int fp = receive_first_packet(connection, s);
7da358625 Philipp Reisner 2011-12-19 989 drbd_socket_okay(&sock.socket);
7da358625 Philipp Reisner 2011-12-19 990 drbd_socket_okay(&msock.socket);
92f14951c Philipp Reisner 2012-08-01 991 switch (fp) {
e5d6f33ab Andreas Gruenbacher 2011-03-28 992 case P_INITIAL_DATA:
7da358625 Philipp Reisner 2011-12-19 993 if (sock.socket) {
1ec861ebd Andreas Gruenbacher 2011-07-06 994 drbd_warn(connection, "initial packet S crossed\n");
7da358625 Philipp Reisner 2011-12-19 995 sock_release(sock.socket);
80c6eed49 Philipp Reisner 2012-08-01 996 sock.socket = s;
80c6eed49 Philipp Reisner 2012-08-01 997 goto randomize;
b411b3637 Philipp Reisner 2009-09-25 998 }
7da358625 Philipp Reisner 2011-12-19 999 sock.socket = s;
b411b3637 Philipp Reisner 2009-09-25 1000 break;
e5d6f33ab Andreas Gruenbacher 2011-03-28 1001 case P_INITIAL_META:
bde89a9e1 Andreas Gruenbacher 2011-05-30 1002 set_bit(RESOLVE_CONFLICTS, &connection->flags);
7da358625 Philipp Reisner 2011-12-19 1003 if (msock.socket) {
1ec861ebd Andreas Gruenbacher 2011-07-06 1004 drbd_warn(connection, "initial packet M crossed\n");
7da358625 Philipp Reisner 2011-12-19 1005 sock_release(msock.socket);
80c6eed49 Philipp Reisner 2012-08-01 1006 msock.socket = s;
80c6eed49 Philipp Reisner 2012-08-01 1007 goto randomize;
b411b3637 Philipp Reisner 2009-09-25 1008 }
7da358625 Philipp Reisner 2011-12-19 1009 msock.socket = s;
b411b3637 Philipp Reisner 2009-09-25 1010 break;
b411b3637 Philipp Reisner 2009-09-25 1011 default:
1ec861ebd Andreas Gruenbacher 2011-07-06 1012 drbd_warn(connection, "Error receiving initial packet\n");
b411b3637 Philipp Reisner 2009-09-25 1013 sock_release(s);
80c6eed49 Philipp Reisner 2012-08-01 1014 randomize:
38b682b26 Akinobu Mita 2013-04-29 1015 if (prandom_u32() & 1)
b411b3637 Philipp Reisner 2009-09-25 1016 goto retry;
b411b3637 Philipp Reisner 2009-09-25 1017 }
b411b3637 Philipp Reisner 2009-09-25 1018 }
b411b3637 Philipp Reisner 2009-09-25 1019
bde89a9e1 Andreas Gruenbacher 2011-05-30 1020 if (connection->cstate <= C_DISCONNECTING)
b411b3637 Philipp Reisner 2009-09-25 1021 goto out_release_sockets;
b411b3637 Philipp Reisner 2009-09-25 1022 if (signal_pending(current)) {
b411b3637 Philipp Reisner 2009-09-25 1023 flush_signals(current);
b411b3637 Philipp Reisner 2009-09-25 1024 smp_rmb();
bde89a9e1 Andreas Gruenbacher 2011-05-30 1025 if (get_t_state(&connection->receiver) == EXITING)
b411b3637 Philipp Reisner 2009-09-25 1026 goto out_release_sockets;
b411b3637 Philipp Reisner 2009-09-25 1027 }
b411b3637 Philipp Reisner 2009-09-25 1028
5d0b17f1a Philipp Reisner 2014-03-18 1029 ok = connection_established(connection, &sock.socket, &msock.socket);
b666dbf81 Philipp Reisner 2012-07-26 1030 } while (!ok);
b411b3637 Philipp Reisner 2009-09-25 1031
7a426fd8d Philipp Reisner 2012-07-12 1032 if (ad.s_listen)
7a426fd8d Philipp Reisner 2012-07-12 1033 sock_release(ad.s_listen);
b411b3637 Philipp Reisner 2009-09-25 1034
986836503 Philipp Reisner 2012-11-09 1035 sock.socket->sk->sk_reuse = SK_CAN_REUSE; /* SO_REUSEADDR */
986836503 Philipp Reisner 2012-11-09 1036 msock.socket->sk->sk_reuse = SK_CAN_REUSE; /* SO_REUSEADDR */
b411b3637 Philipp Reisner 2009-09-25 1037
7da358625 Philipp Reisner 2011-12-19 1038 sock.socket->sk->sk_allocation = GFP_NOIO;
7da358625 Philipp Reisner 2011-12-19 1039 msock.socket->sk->sk_allocation = GFP_NOIO;
b411b3637 Philipp Reisner 2009-09-25 1040
7da358625 Philipp Reisner 2011-12-19 1041 sock.socket->sk->sk_priority = TC_PRIO_INTERACTIVE_BULK;
7da358625 Philipp Reisner 2011-12-19 1042 msock.socket->sk->sk_priority = TC_PRIO_INTERACTIVE;
b411b3637 Philipp Reisner 2009-09-25 1043
b411b3637 Philipp Reisner 2009-09-25 1044 /* NOT YET ...
bde89a9e1 Andreas Gruenbacher 2011-05-30 1045 * sock.socket->sk->sk_sndtimeo = connection->net_conf->timeout*HZ/10;
7da358625 Philipp Reisner 2011-12-19 1046 * sock.socket->sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT;
6038178eb Andreas Gruenbacher 2011-03-28 1047 * first set it to the P_CONNECTION_FEATURES timeout,
b411b3637 Philipp Reisner 2009-09-25 1048 * which we set to 4x the configured ping_timeout. */
44ed167da Philipp Reisner 2011-04-19 1049 rcu_read_lock();
bde89a9e1 Andreas Gruenbacher 2011-05-30 1050 nc = rcu_dereference(connection->net_conf);
44ed167da Philipp Reisner 2011-04-19 1051
7da358625 Philipp Reisner 2011-12-19 1052 sock.socket->sk->sk_sndtimeo =
7da358625 Philipp Reisner 2011-12-19 1053 sock.socket->sk->sk_rcvtimeo = nc->ping_timeo*4*HZ/10;
b411b3637 Philipp Reisner 2009-09-25 1054
7da358625 Philipp Reisner 2011-12-19 1055 msock.socket->sk->sk_rcvtimeo = nc->ping_int*HZ;
44ed167da Philipp Reisner 2011-04-19 1056 timeout = nc->timeout * HZ / 10;
08b165ba1 Philipp Reisner 2011-09-05 1057 discard_my_data = nc->discard_my_data;
44ed167da Philipp Reisner 2011-04-19 1058 rcu_read_unlock();
b411b3637 Philipp Reisner 2009-09-25 1059
7da358625 Philipp Reisner 2011-12-19 1060 msock.socket->sk->sk_sndtimeo = timeout;
b411b3637 Philipp Reisner 2009-09-25 1061
b411b3637 Philipp Reisner 2009-09-25 1062 /* we don't want delays.
25985edce Lucas De Marchi 2011-03-30 1063 * we use TCP_CORK where appropriate, though */
7da358625 Philipp Reisner 2011-12-19 1064 drbd_tcp_nodelay(sock.socket);
7da358625 Philipp Reisner 2011-12-19 1065 drbd_tcp_nodelay(msock.socket);
b411b3637 Philipp Reisner 2009-09-25 1066
bde89a9e1 Andreas Gruenbacher 2011-05-30 1067 connection->data.socket = sock.socket;
bde89a9e1 Andreas Gruenbacher 2011-05-30 1068 connection->meta.socket = msock.socket;
bde89a9e1 Andreas Gruenbacher 2011-05-30 1069 connection->last_received = jiffies;
b411b3637 Philipp Reisner 2009-09-25 1070
bde89a9e1 Andreas Gruenbacher 2011-05-30 1071 h = drbd_do_features(connection);
b411b3637 Philipp Reisner 2009-09-25 1072 if (h <= 0)
b411b3637 Philipp Reisner 2009-09-25 1073 return h;
b411b3637 Philipp Reisner 2009-09-25 1074
bde89a9e1 Andreas Gruenbacher 2011-05-30 1075 if (connection->cram_hmac_tfm) {
b30ab7913 Andreas Gruenbacher 2011-07-03 1076 /* drbd_request_state(device, NS(conn, WFAuth)); */
bde89a9e1 Andreas Gruenbacher 2011-05-30 1077 switch (drbd_do_auth(connection)) {
b10d96cb9 Johannes Thoma 2010-01-07 1078 case -1:
1ec861ebd Andreas Gruenbacher 2011-07-06 1079 drbd_err(connection, "Authentication of peer failed\n");
b411b3637 Philipp Reisner 2009-09-25 1080 return -1;
b10d96cb9 Johannes Thoma 2010-01-07 1081 case 0:
1ec861ebd Andreas Gruenbacher 2011-07-06 1082 drbd_err(connection, "Authentication of peer failed, trying again.\n");
b10d96cb9 Johannes Thoma 2010-01-07 1083 return 0;
b411b3637 Philipp Reisner 2009-09-25 1084 }
b411b3637 Philipp Reisner 2009-09-25 1085 }
b411b3637 Philipp Reisner 2009-09-25 1086
bde89a9e1 Andreas Gruenbacher 2011-05-30 1087 connection->data.socket->sk->sk_sndtimeo = timeout;
bde89a9e1 Andreas Gruenbacher 2011-05-30 1088 connection->data.socket->sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT;
b411b3637 Philipp Reisner 2009-09-25 1089
bde89a9e1 Andreas Gruenbacher 2011-05-30 1090 if (drbd_send_protocol(connection) == -EOPNOTSUPP)
7e2455c1a Philipp Reisner 2010-04-22 1091 return -1;
1e86ac48a Philipp Reisner 2011-08-04 1092
13c76aba7 Philipp Reisner 2012-11-22 1093 /* Prevent a race between resync-handshake and
13c76aba7 Philipp Reisner 2012-11-22 1094 * being promoted to Primary.
13c76aba7 Philipp Reisner 2012-11-22 1095 *
13c76aba7 Philipp Reisner 2012-11-22 1096 * Grab and release the state mutex, so we know that any current
13c76aba7 Philipp Reisner 2012-11-22 1097 * drbd_set_role() is finished, and any incoming drbd_set_role
13c76aba7 Philipp Reisner 2012-11-22 1098 * will see the STATE_SENT flag, and wait for it to be cleared.
13c76aba7 Philipp Reisner 2012-11-22 1099 */
31007745a Philipp Reisner 2014-04-28 1100 idr_for_each_entry(&connection->peer_devices, peer_device, vnr)
31007745a Philipp Reisner 2014-04-28 1101 mutex_lock(peer_device->device->state_mutex);
31007745a Philipp Reisner 2014-04-28 1102
31007745a Philipp Reisner 2014-04-28 1103 set_bit(STATE_SENT, &connection->flags);
31007745a Philipp Reisner 2014-04-28 1104
31007745a Philipp Reisner 2014-04-28 1105 idr_for_each_entry(&connection->peer_devices, peer_device, vnr)
31007745a Philipp Reisner 2014-04-28 1106 mutex_unlock(peer_device->device->state_mutex);
31007745a Philipp Reisner 2014-04-28 1107
31007745a Philipp Reisner 2014-04-28 1108 rcu_read_lock();
31007745a Philipp Reisner 2014-04-28 1109 idr_for_each_entry(&connection->peer_devices, peer_device, vnr) {
31007745a Philipp Reisner 2014-04-28 1110 struct drbd_device *device = peer_device->device;
31007745a Philipp Reisner 2014-04-28 1111 kref_get(&device->kref);
31007745a Philipp Reisner 2014-04-28 1112 rcu_read_unlock();
13c76aba7 Philipp Reisner 2012-11-22 1113
08b165ba1 Philipp Reisner 2011-09-05 1114 if (discard_my_data)
b30ab7913 Andreas Gruenbacher 2011-07-03 1115 set_bit(DISCARD_MY_DATA, &device->flags);
08b165ba1 Philipp Reisner 2011-09-05 1116 else
b30ab7913 Andreas Gruenbacher 2011-07-03 1117 clear_bit(DISCARD_MY_DATA, &device->flags);
08b165ba1 Philipp Reisner 2011-09-05 1118
69a227731 Andreas Gruenbacher 2011-08-09 1119 drbd_connected(peer_device);
05a10ec79 Andreas Gruenbacher 2011-06-07 1120 kref_put(&device->kref, drbd_destroy_device);
c141ebda0 Philipp Reisner 2011-05-05 1121 rcu_read_lock();
c141ebda0 Philipp Reisner 2011-05-05 1122 }
c141ebda0 Philipp Reisner 2011-05-05 1123 rcu_read_unlock();
197296ffe Philipp Reisner 2012-03-26 1124
bde89a9e1 Andreas Gruenbacher 2011-05-30 1125 rv = conn_request_state(connection, NS(conn, C_WF_REPORT_PARAMS), CS_VERBOSE);
bde89a9e1 Andreas Gruenbacher 2011-05-30 1126 if (rv < SS_SUCCESS || connection->cstate != C_WF_REPORT_PARAMS) {
bde89a9e1 Andreas Gruenbacher 2011-05-30 1127 clear_bit(STATE_SENT, &connection->flags);
1e86ac48a Philipp Reisner 2011-08-04 1128 return 0;
a1096a6e9 Philipp Reisner 2012-04-06 1129 }
1e86ac48a Philipp Reisner 2011-08-04 1130
1c03e5208 Philipp Reisner 2015-03-16 1131 drbd_thread_start(&connection->ack_receiver);
39e91a60c Lars Ellenberg 2015-03-24 1132 /* opencoded create_singlethread_workqueue(),
39e91a60c Lars Ellenberg 2015-03-24 1133 * to be able to use format string arguments */
39e91a60c Lars Ellenberg 2015-03-24 1134 connection->ack_sender =
39e91a60c Lars Ellenberg 2015-03-24 1135 alloc_ordered_workqueue("drbd_as_%s", WQ_MEM_RECLAIM, connection->resource->name);
668700b40 Philipp Reisner 2015-03-16 1136 if (!connection->ack_sender) {
668700b40 Philipp Reisner 2015-03-16 1137 drbd_err(connection, "Failed to create workqueue ack_sender\n");
668700b40 Philipp Reisner 2015-03-16 1138 return 0;
668700b40 Philipp Reisner 2015-03-16 1139 }
b411b3637 Philipp Reisner 2009-09-25 1140
0500813fe Andreas Gruenbacher 2011-07-07 1141 mutex_lock(&connection->resource->conf_update);
08b165ba1 Philipp Reisner 2011-09-05 1142 /* The discard_my_data flag is a single-shot modifier to the next
08b165ba1 Philipp Reisner 2011-09-05 1143 * connection attempt, the handshake of which is now well underway.
08b165ba1 Philipp Reisner 2011-09-05 1144 * No need for rcu style copying of the whole struct
08b165ba1 Philipp Reisner 2011-09-05 1145 * just to clear a single value. */
bde89a9e1 Andreas Gruenbacher 2011-05-30 1146 connection->net_conf->discard_my_data = 0;
0500813fe Andreas Gruenbacher 2011-07-07 1147 mutex_unlock(&connection->resource->conf_update);
08b165ba1 Philipp Reisner 2011-09-05 1148
d3fcb4908 Philipp Reisner 2011-04-13 1149 return h;
b411b3637 Philipp Reisner 2009-09-25 1150
b411b3637 Philipp Reisner 2009-09-25 1151 out_release_sockets:
7a426fd8d Philipp Reisner 2012-07-12 1152 if (ad.s_listen)
7a426fd8d Philipp Reisner 2012-07-12 1153 sock_release(ad.s_listen);
7da358625 Philipp Reisner 2011-12-19 1154 if (sock.socket)
7da358625 Philipp Reisner 2011-12-19 1155 sock_release(sock.socket);
7da358625 Philipp Reisner 2011-12-19 1156 if (msock.socket)
7da358625 Philipp Reisner 2011-12-19 1157 sock_release(msock.socket);
b411b3637 Philipp Reisner 2009-09-25 1158 return -1;
b411b3637 Philipp Reisner 2009-09-25 @1159 }
b411b3637 Philipp Reisner 2009-09-25 1160

:::::: The code at line 1159 was first introduced by commit
:::::: b411b3637fa71fce9cf2acf0639009500f5892fe The DRBD driver

:::::: TO: Philipp Reisner <philipp.reisner@linbit.com>
:::::: CC: Jens Axboe <jens.axboe@oracle.com>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-08-17 18:13    [W:0.038 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site