Re: [PATCH] scsi_netlink: Remove dead and buggy code

3 messages, 2 authors, 2012-09-13 · open the first message on its own page

Re: [PATCH] scsi_netlink: Remove dead and buggy code

From: Eric W. Biederman <hidden>
Date: 2012-09-11 22:40:08

James Bottomley [off-list ref] writes:
On Mon, 2012-09-10 at 15:07 -0400, David Miller wrote:
quoted
From: ebiederm@xmission.com (Eric W. Biederman)
Date: Fri, 07 Sep 2012 15:39:21 -0700
quoted
The scsi netlink code confuses the netlink port id with a process id,
going so far as to read NETLINK_CREDS(skb)->pid instead of the correct
NETLINK_CB(skb).pid.  Fortunately it does not matter because nothing
registers to respond to scsi netlink requests.

The only interesting use of the scsi_netlink interface is
fc_host_post_vendor_event which sends a netlink multicast message.

Since nothing registers to handle scsi netlink messages kill all of the
registration logic, while retaining the same error handling behavior
preserving the userspace visible behavior and removing all of the
confused code that thought a netlink port id was a process id.

This was tested with a kernel allyesconfig build which had no problems.

Cc: James Bottomley <redacted>
Cc: James Smart <redacted>
Signed-off-by: "Eric W. Biederman" <redacted>
James et al., please review and ACK.
I'll defer to the decision of James Smart and the other FC contributors,
since the FC transport class is really the only one using a netlink
interface.
So just for curiosity I searched the entire git history for scsi_nl_add_
and the only commit that I found was the addition of that code to the
tree in August of 2008.

Does anyone have any reason to keep scsi_nl_add_transport or
scsi_nl_add_driver that have never been used in the 4 years since
they have been added?

Eric

Re: [PATCH] scsi_netlink: Remove dead and buggy code

From: David Miller <davem@davemloft.net>
Date: 2012-09-11 22:48:50

From: ebiederm@xmission.com (Eric W. Biederman)
Date: Tue, 11 Sep 2012 15:40:08 -0700
So just for curiosity I searched the entire git history for scsi_nl_add_
and the only commit that I found was the addition of that code to the
tree in August of 2008.

Does anyone have any reason to keep scsi_nl_add_transport or
scsi_nl_add_driver that have never been used in the 4 years since
they have been added?
That's basically the question on the table right now :-)

Re: [PATCH] scsi_netlink: Remove dead and buggy code

From: David Miller <davem@davemloft.net>
Date: 2012-09-13 20:24:57

From: David Miller <davem@davemloft.net>
Date: Tue, 11 Sep 2012 18:48:46 -0400 (EDT)
From: ebiederm@xmission.com (Eric W. Biederman)
Date: Tue, 11 Sep 2012 15:40:08 -0700
quoted
So just for curiosity I searched the entire git history for scsi_nl_add_
and the only commit that I found was the addition of that code to the
tree in August of 2008.

Does anyone have any reason to keep scsi_nl_add_transport or
scsi_nl_add_driver that have never been used in the 4 years since
they have been added?
That's basically the question on the table right now :-)
Time has run out.

Letting legitimate and reasonable patches simply rot for a week is
absolutely never acceptable, so I'm applying Eric's patch to net-next.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help