re: kdbus: add connection, queue handling and message validation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Daniel Mack,

The patch 5fc8dd5c84fc: "kdbus: add connection, queue handling and
message validation code" from Sep 11, 2014, leads to the following
static checker warning:

	ipc/kdbus/connection.c:2000 kdbus_cmd_send()
	warn: 'cancel_fd' isn't an ERR_PTR

ipc/kdbus/connection.c
  1998          if (argv[1].item) {
  1999                  cancel_fd = fget(argv[1].item->fds[0]);
                                    ^^^^
fget() returns NULL on error.

  2000                  if (IS_ERR(cancel_fd)) {
  2001                          ret = PTR_ERR(cancel_fd);
  2002                          cancel_fd = NULL;
  2003                          goto exit;
  2004                  }
  2005  
  2006                  if (!cancel_fd->f_op->poll) {
  2007                          ret = -EINVAL;
  2008                          goto exit;
  2009                  }
  2010          }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux