lkml.org 
[lkml]   [2022]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 2/5] userfaultfd: add /dev/userfaultfd for fine grained access control
On Wed, Aug 17, 2022 at 02:47:25PM -0700, Axel Rasmussen wrote:
> static int __init userfaultfd_init(void)
> {
> + WARN_ON(misc_register(&userfaultfd_misc));

Please no.

Spell this out and properly error out if there is an issue:
int ret;

ret = misc_register(&userfaultfd_misc);
if (ret)
return ret;

Handle issues properly, don't paper over them with WARN_ON().

thanks,

greg k-h

\
 
 \ /
  Last update: 2022-08-18 08:26    [W:0.497 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site