On Tue, Apr 17, 2012 at 05:51:03PM +0400, Stanislav Kinsbursky wrote: > > #ifdef CONFIG_CHECKPOINT_RESTORE > - if (msgflg & MSG_PEEK_ALL) > + if (msgflg & MSG_PEEK_ALL) { > + if (copy_to_user(buf, kbuf, bufsz - arrsz)) > + return -EFAULT; kbuf leak? > + kfree(kbuf); > return bufsz - arrsz; > + } > #endif Cyrill