Loading fs/afs/cmservice.c +3 −6 Original line number Diff line number Diff line Loading @@ -307,8 +307,7 @@ static int afs_deliver_cb_callback(struct afs_call *call) call->count = ntohl(call->tmp); _debug("FID count: %u", call->count); if (call->count > AFSCBMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_cb_fid_count); return afs_protocol_error(call, afs_eproto_cb_fid_count); call->buffer = kmalloc(array3_size(call->count, 3, 4), GFP_KERNEL); Loading Loading @@ -353,8 +352,7 @@ static int afs_deliver_cb_callback(struct afs_call *call) call->count2 = ntohl(call->tmp); _debug("CB count: %u", call->count2); if (call->count2 != call->count && call->count2 != 0) return afs_protocol_error(call, -EBADMSG, afs_eproto_cb_count); return afs_protocol_error(call, afs_eproto_cb_count); call->iter = &call->def_iter; iov_iter_discard(&call->def_iter, READ, call->count2 * 3 * 4); call->unmarshall++; Loading Loading @@ -674,8 +672,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call *call) call->count = ntohl(call->tmp); _debug("FID count: %u", call->count); if (call->count > YFSCBMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_cb_fid_count); return afs_protocol_error(call, afs_eproto_cb_fid_count); size = array_size(call->count, sizeof(struct yfs_xdr_YFSFid)); call->buffer = kmalloc(size, GFP_KERNEL); Loading fs/afs/fsclient.c +6 −11 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ static void xdr_decode_AFSFetchStatus(const __be32 **_bp, bad: xdr_dump_bad(*_bp); afs_protocol_error(call, -EBADMSG, afs_eproto_bad_status); afs_protocol_error(call, afs_eproto_bad_status); goto advance; } Loading Loading @@ -1470,8 +1470,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call) call->count = ntohl(call->tmp); _debug("volname length: %u", call->count); if (call->count >= AFSNAMEMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_volname_len); return afs_protocol_error(call, afs_eproto_volname_len); size = (call->count + 3) & ~3; /* It's padded */ afs_extract_to_buf(call, size); call->unmarshall++; Loading Loading @@ -1500,8 +1499,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call) call->count = ntohl(call->tmp); _debug("offline msg length: %u", call->count); if (call->count >= AFSNAMEMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_offline_msg_len); return afs_protocol_error(call, afs_eproto_offline_msg_len); size = (call->count + 3) & ~3; /* It's padded */ afs_extract_to_buf(call, size); call->unmarshall++; Loading Loading @@ -1531,8 +1529,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call) call->count = ntohl(call->tmp); _debug("motd length: %u", call->count); if (call->count >= AFSNAMEMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_motd_len); return afs_protocol_error(call, afs_eproto_motd_len); size = (call->count + 3) & ~3; /* It's padded */ afs_extract_to_buf(call, size); call->unmarshall++; Loading Loading @@ -2012,8 +2009,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call) tmp = ntohl(call->tmp); _debug("status count: %u/%u", tmp, call->count2); if (tmp != call->count2) return afs_protocol_error(call, -EBADMSG, afs_eproto_ibulkst_count); return afs_protocol_error(call, afs_eproto_ibulkst_count); call->count = 0; call->unmarshall++; Loading Loading @@ -2049,8 +2045,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call) tmp = ntohl(call->tmp); _debug("CB count: %u", tmp); if (tmp != call->count2) return afs_protocol_error(call, -EBADMSG, afs_eproto_ibulkst_cb_count); return afs_protocol_error(call, afs_eproto_ibulkst_cb_count); call->count = 0; call->unmarshall++; more_cbs: Loading fs/afs/inode.c +2 −2 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ static int afs_inode_init_from_status(struct afs_vnode *vnode, struct key *key, default: dump_vnode(vnode, parent_vnode); write_sequnlock(&vnode->cb_lock); return afs_protocol_error(NULL, -EBADMSG, afs_eproto_file_type); return afs_protocol_error(NULL, afs_eproto_file_type); } afs_set_i_size(vnode, status->size); Loading Loading @@ -179,7 +179,7 @@ static void afs_apply_status(struct afs_fs_cursor *fc, vnode->fid.vnode, vnode->fid.unique, status->type, vnode->status.type); afs_protocol_error(NULL, -EBADMSG, afs_eproto_bad_status); afs_protocol_error(NULL, afs_eproto_bad_status); return; } Loading fs/afs/internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -1133,7 +1133,7 @@ extern void afs_flat_call_destructor(struct afs_call *); extern void afs_send_empty_reply(struct afs_call *); extern void afs_send_simple_reply(struct afs_call *, const void *, size_t); extern int afs_extract_data(struct afs_call *, bool); extern int afs_protocol_error(struct afs_call *, int, enum afs_eproto_cause); extern int afs_protocol_error(struct afs_call *, enum afs_eproto_cause); static inline void afs_set_fc_call(struct afs_call *call, struct afs_fs_cursor *fc) { Loading fs/afs/rxrpc.c +3 −3 Original line number Diff line number Diff line Loading @@ -961,11 +961,11 @@ int afs_extract_data(struct afs_call *call, bool want_more) /* * Log protocol error production. */ noinline int afs_protocol_error(struct afs_call *call, int error, noinline int afs_protocol_error(struct afs_call *call, enum afs_eproto_cause cause) { trace_afs_protocol_error(call, error, cause); trace_afs_protocol_error(call, cause); if (call) call->unmarshalling_error = true; return error; return -EBADMSG; } Loading
fs/afs/cmservice.c +3 −6 Original line number Diff line number Diff line Loading @@ -307,8 +307,7 @@ static int afs_deliver_cb_callback(struct afs_call *call) call->count = ntohl(call->tmp); _debug("FID count: %u", call->count); if (call->count > AFSCBMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_cb_fid_count); return afs_protocol_error(call, afs_eproto_cb_fid_count); call->buffer = kmalloc(array3_size(call->count, 3, 4), GFP_KERNEL); Loading Loading @@ -353,8 +352,7 @@ static int afs_deliver_cb_callback(struct afs_call *call) call->count2 = ntohl(call->tmp); _debug("CB count: %u", call->count2); if (call->count2 != call->count && call->count2 != 0) return afs_protocol_error(call, -EBADMSG, afs_eproto_cb_count); return afs_protocol_error(call, afs_eproto_cb_count); call->iter = &call->def_iter; iov_iter_discard(&call->def_iter, READ, call->count2 * 3 * 4); call->unmarshall++; Loading Loading @@ -674,8 +672,7 @@ static int afs_deliver_yfs_cb_callback(struct afs_call *call) call->count = ntohl(call->tmp); _debug("FID count: %u", call->count); if (call->count > YFSCBMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_cb_fid_count); return afs_protocol_error(call, afs_eproto_cb_fid_count); size = array_size(call->count, sizeof(struct yfs_xdr_YFSFid)); call->buffer = kmalloc(size, GFP_KERNEL); Loading
fs/afs/fsclient.c +6 −11 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ static void xdr_decode_AFSFetchStatus(const __be32 **_bp, bad: xdr_dump_bad(*_bp); afs_protocol_error(call, -EBADMSG, afs_eproto_bad_status); afs_protocol_error(call, afs_eproto_bad_status); goto advance; } Loading Loading @@ -1470,8 +1470,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call) call->count = ntohl(call->tmp); _debug("volname length: %u", call->count); if (call->count >= AFSNAMEMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_volname_len); return afs_protocol_error(call, afs_eproto_volname_len); size = (call->count + 3) & ~3; /* It's padded */ afs_extract_to_buf(call, size); call->unmarshall++; Loading Loading @@ -1500,8 +1499,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call) call->count = ntohl(call->tmp); _debug("offline msg length: %u", call->count); if (call->count >= AFSNAMEMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_offline_msg_len); return afs_protocol_error(call, afs_eproto_offline_msg_len); size = (call->count + 3) & ~3; /* It's padded */ afs_extract_to_buf(call, size); call->unmarshall++; Loading Loading @@ -1531,8 +1529,7 @@ static int afs_deliver_fs_get_volume_status(struct afs_call *call) call->count = ntohl(call->tmp); _debug("motd length: %u", call->count); if (call->count >= AFSNAMEMAX) return afs_protocol_error(call, -EBADMSG, afs_eproto_motd_len); return afs_protocol_error(call, afs_eproto_motd_len); size = (call->count + 3) & ~3; /* It's padded */ afs_extract_to_buf(call, size); call->unmarshall++; Loading Loading @@ -2012,8 +2009,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call) tmp = ntohl(call->tmp); _debug("status count: %u/%u", tmp, call->count2); if (tmp != call->count2) return afs_protocol_error(call, -EBADMSG, afs_eproto_ibulkst_count); return afs_protocol_error(call, afs_eproto_ibulkst_count); call->count = 0; call->unmarshall++; Loading Loading @@ -2049,8 +2045,7 @@ static int afs_deliver_fs_inline_bulk_status(struct afs_call *call) tmp = ntohl(call->tmp); _debug("CB count: %u", tmp); if (tmp != call->count2) return afs_protocol_error(call, -EBADMSG, afs_eproto_ibulkst_cb_count); return afs_protocol_error(call, afs_eproto_ibulkst_cb_count); call->count = 0; call->unmarshall++; more_cbs: Loading
fs/afs/inode.c +2 −2 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ static int afs_inode_init_from_status(struct afs_vnode *vnode, struct key *key, default: dump_vnode(vnode, parent_vnode); write_sequnlock(&vnode->cb_lock); return afs_protocol_error(NULL, -EBADMSG, afs_eproto_file_type); return afs_protocol_error(NULL, afs_eproto_file_type); } afs_set_i_size(vnode, status->size); Loading Loading @@ -179,7 +179,7 @@ static void afs_apply_status(struct afs_fs_cursor *fc, vnode->fid.vnode, vnode->fid.unique, status->type, vnode->status.type); afs_protocol_error(NULL, -EBADMSG, afs_eproto_bad_status); afs_protocol_error(NULL, afs_eproto_bad_status); return; } Loading
fs/afs/internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -1133,7 +1133,7 @@ extern void afs_flat_call_destructor(struct afs_call *); extern void afs_send_empty_reply(struct afs_call *); extern void afs_send_simple_reply(struct afs_call *, const void *, size_t); extern int afs_extract_data(struct afs_call *, bool); extern int afs_protocol_error(struct afs_call *, int, enum afs_eproto_cause); extern int afs_protocol_error(struct afs_call *, enum afs_eproto_cause); static inline void afs_set_fc_call(struct afs_call *call, struct afs_fs_cursor *fc) { Loading
fs/afs/rxrpc.c +3 −3 Original line number Diff line number Diff line Loading @@ -961,11 +961,11 @@ int afs_extract_data(struct afs_call *call, bool want_more) /* * Log protocol error production. */ noinline int afs_protocol_error(struct afs_call *call, int error, noinline int afs_protocol_error(struct afs_call *call, enum afs_eproto_cause cause) { trace_afs_protocol_error(call, error, cause); trace_afs_protocol_error(call, cause); if (call) call->unmarshalling_error = true; return error; return -EBADMSG; }