The patch titled Fix getdelays.c - cpumask length and error reporting has been added to the -mm tree. Its filename is fix-getdelaysc-cpumask-length-and-error-reporting.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Fix getdelays.c - cpumask length and error reporting From: Balbir Singh <balbir@xxxxxxxxxx> Fix the length passed while (un)registering cpumask. We were passing sizeof the array, make it strlen(). Error value printed in fatal errors should be derived from the message. The message contains an nlmsgerr embedded with an error value. We must report that value to the user. Signed-off-by: Balbir Singh <balbir@xxxxxxxxxx> Cc: Jamal Hadi <hadi@xxxxxxxxxx> Cc: Shailabh Nagar <nagar@xxxxxxxxxxxxxx> Cc: Thomas Graf <tgraf@xxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Jay Lan <jlan@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- Documentation/accounting/getdelays.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff -puN Documentation/accounting/getdelays.c~fix-getdelaysc-cpumask-length-and-error-reporting Documentation/accounting/getdelays.c --- a/Documentation/accounting/getdelays.c~fix-getdelaysc-cpumask-length-and-error-reporting +++ a/Documentation/accounting/getdelays.c @@ -285,7 +285,7 @@ int main(int argc, char *argv[]) if (maskset) { rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, - &cpumask, sizeof(cpumask)); + &cpumask, strlen(cpumask) + 1); PRINTF("Sent register cpumask, retval %d\n", rc); if (rc < 0) { printf("error sending register cpumask\n"); @@ -315,7 +315,8 @@ int main(int argc, char *argv[]) } if (msg.n.nlmsg_type == NLMSG_ERROR || !NLMSG_OK((&msg.n), rep_len)) { - printf("fatal reply error, errno %d\n", errno); + struct nlmsgerr *err = NLMSG_DATA(&msg); + printf("fatal reply error, errno %d\n", err->error); goto done; } @@ -383,7 +384,7 @@ done: if (maskset) { rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, - &cpumask, sizeof(cpumask)); + &cpumask, strlen(cpumask) + 1); printf("Sent deregister mask, retval %d\n", rc); if (rc < 0) err(rc, "error sending deregister cpumask\n"); _ Patches currently in -mm which might be from balbir@xxxxxxxxxx are add-genetlink-utilities-for-payload-length-calculation.patch fix-taskstats-size-calculation-use-the-new-genetlink-utility-functions.patch fix-getdelaysc-cpumask-length-and-error-reporting.patch csa-basic-accounting-over-taskstats.patch csa-extended-system-accounting-over-taskstats.patch csa-convert-config-tag-for-extended-accounting-routines.patch csa-accounting-taskstats-update.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html