static int gru_user_copy_handle(void __user **dp, void *s)
{
- if (copy_to_user(dp, s, GRU_HANDLE_BYTES))
+ if (copy_to_user(*dp, s, GRU_HANDLE_BYTES))
return -1;
*dp += GRU_HANDLE_BYTES;
return 0;
{
struct gru_dump_context_header hdr;
struct gru_dump_context_header __user *uhdr = ubuf;
- struct gru_context_configuration_handle *cch;
+ struct gru_context_configuration_handle *cch, *ubufcch;
struct gru_thread_state *gts;
int try, cch_locked, cbrcnt = 0, dsrcnt = 0, bytes = 0, ret = 0;
void *grubase;
}
ubuf += sizeof(hdr);
+ ubufcch = ubuf;
if (gru_user_copy_handle(&ubuf, cch))
goto fail;
+ if (cch_locked)
+ ubufcch->delresp = 0;
bytes = sizeof(hdr) + GRU_CACHE_LINE_BYTES;
if (cch_locked || !lock_cch) {
return ret;
hdr.magic = GRU_DUMP_MAGIC;
+ hdr.gid = gru->gs_gid;
hdr.ctxnum = ctxnum;
hdr.cbrcnt = cbrcnt;
hdr.dsrcnt = dsrcnt;
enum {dcs_pid, dcs_gid};
struct gru_dump_chiplet_state_req {
unsigned int op;
- int gid;
+ unsigned int gid;
int ctxnum;
char data_opt;
char lock_cch;
#define GRU_DUMP_MAGIC 0x3474ab6c
struct gru_dump_context_header {
unsigned int magic;
- unsigned char gid;
+ unsigned int gid;
unsigned char ctxnum;
unsigned char cbrcnt;
unsigned char dsrcnt;