infiniband: remove WARN that is not kernel bug
PATCH 1/1 infiniband: remove WARN that is not kernel bug
WARNINGs mean kernel bugs.
The one in ucma_write() points to user programming error or a malicious attempt. This is not a kernel bug, remove it.
BUG/WARNs that are not kernel bugs hinder automated testing effots.
--- drivers/infiniband/core/ucma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/ucma.c +1 -1
@@ -1584,7 +1584,7 @@ static ssize_t ucma_write(struct file *filp, const char __user *buf,struct rdma_ucm_cmd_hdr hdr;ssize_t ret; -if (WARN_ON_ONCE (!ib_safe_file_access (filp))) +if (!ib_safe_file_access (filp))return -EACCES ;if (len <sizeof (hdr))
Signature · 1 line
2.8.0.rc3.226.g39d4020
drivers/infiniband/core/ucma.c static ssize_t ucma_write(struct file *filp, const char __user *buf, · line 1588
Quoted 7 lines · Dmitry Vyukov
WARNINGs mean kernel bugs.
The one inucma_write()points to user programming error or a malicious attempt. This is not a kernel bug, remove it.drivers/infiniband/core/ucma.c +1
-1-if (WARN_ON_ONCE (!ib_safe_file_access (filp))) +if (!ib_safe_file_access (filp))return -EACCES ;
In that case, wouldn't this be better?
if (!ib_safe_file_access(filp)) {
printk_once("Process %d (%s) tried to do something hinky", pid, comm);
return _EACCESS;
}so the sysadmin becomes aware of the malicious attempt?
Quoted 11 lines · On Fri, Nov 18, 2016 at 09:22:42PM -0500, [email protected] wrote:
drivers/infiniband/core/ucma.c static ssize_t ucma_write(struct file *filp, const char __user *buf, · line 1588
Quoted 7 lines · Dmitry Vyukov
WARNINGs mean kernel bugs.
The one inucma_write()points to user programming error or a malicious attempt. This is not a kernel bug, remove it.drivers/infiniband/core/ucma.c +1
-1-if (WARN_ON_ONCE (!ib_safe_file_access (filp))) +if (!ib_safe_file_access (filp))return -EACCES ;In that case, wouldn't this be better?
Quoted 6 lines
if (!ib_safe_file_access(filp)) { printk_once("Process %d (%s) tried to do something hinky", pid, comm); return _EACCESS; }so the sysadmin becomes aware of the malicious attempt?
Yes please
Jason
Quoted 12 lines · Jason Gunthorpe
Quoted 11 lines · On Fri, Nov 18, 2016 at 09:22:42PM -0500…
drivers/infiniband/core/ucma.c static ssize_t ucma_write(struct file *filp, const char __user *buf, · line 1588
Quoted 7 lines · Dmitry Vyukov
WARNINGs mean kernel bugs.
The one inucma_write()points to user programming error or a malicious attempt. This is not a kernel bug, remove it.drivers/infiniband/core/ucma.c +1
-1-if (WARN_ON_ONCE (!ib_safe_file_access (filp))) +if (!ib_safe_file_access (filp))return -EACCES ;In that case, wouldn't this be better?
Quoted 8 lines
Quoted 6 lines
if (!ib_safe_file_access(filp)) { printk_once("Process %d (%s) tried to do something hinky", pid, comm); return _EACCESS; }so the sysadmin becomes aware of the malicious attempt?
Yes please
Mailed v2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html