re: net: return actual error on register_queue_kobjects

3 messages, 3 authors, 2014-06-20 · open the first message on its own page

re: net: return actual error on register_queue_kobjects

From: Dan Carpenter <hidden>
Date: 2014-06-19 21:28:58

Hello Jie Liu,

The patch d36a4f4b4723: "net: return actual error on
register_queue_kobjects" from Jun 17, 2014, leads to the following
static checker warning:

	net/core/net-sysfs.c:1203 register_queue_kobjects()
	warn: 'net->queues_kset' isn't an ERR_PTR

net/core/net-sysfs.c
  1200  #ifdef CONFIG_SYSFS
  1201          net->queues_kset = kset_create_and_add("queues",
                                   ^^^^^^^^^^^^^^^^^^^
This function returns a NULL on error doesn't it?  In linux-next it
does.  The patch description is not clear.

  1202              NULL, &net->dev.kobj);
  1203          if (IS_ERR(net->queues_kset))
  1204                  return PTR_ERR(net->queues_kset);
  1205          real_rx = net->real_num_rx_queues;
  1206  #endif

regards,
dan carpenter

Re: net: return actual error on register_queue_kobjects

From: Alexei Starovoitov <hidden>
Date: 2014-06-19 21:39:42

On Thu, Jun 19, 2014 at 2:28 PM, Dan Carpenter [off-list ref] wrote:
Hello Jie Liu,

The patch d36a4f4b4723: "net: return actual error on
register_queue_kobjects" from Jun 17, 2014, leads to the following
static checker warning:

        net/core/net-sysfs.c:1203 register_queue_kobjects()
        warn: 'net->queues_kset' isn't an ERR_PTR

net/core/net-sysfs.c
  1200  #ifdef CONFIG_SYSFS
  1201          net->queues_kset = kset_create_and_add("queues",
                                   ^^^^^^^^^^^^^^^^^^^
This function returns a NULL on error doesn't it?  In linux-next it
does.  The patch description is not clear.
that patch is broken and should be reverted as Jeff said:

--
From: Jeff Liu <redacted>
You will have to watch very carefully to ensure that those patches do
not now get accepted, as they will break the existing code.
Ok, and I'll inform every other maintainers do not apply their patch
individually.

Cheers,
-Jeff

--

From: Jeff Liu <redacted>
Yes, could you please remove this patch? sorry for the convenient!

--

Re: net: return actual error on register_queue_kobjects

From: David Miller <davem@davemloft.net>
Date: 2014-06-20 01:12:53

From: Dan Carpenter <redacted>
Date: Fri, 20 Jun 2014 00:28:40 +0300
The patch d36a4f4b4723: "net: return actual error on
register_queue_kobjects" from Jun 17, 2014, leads to the following
static checker warning:
I've reverted it from my tree, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help