* linux-next: block/drbd tree build warning
@ 2009-10-06 3:01 Stephen Rothwell
[not found] ` <20091006140154.8d94d95c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2009-10-06 3:01 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-next-u79uwXL29TY76Z2rM5mHXA,
drbd-dev-cunTk1MwBs8qoQakbn7OcQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Philipp Reisner
[-- Attachment #1.1: Type: text/plain, Size: 556 bytes --]
Hi Jens, Philipp,
Today's linux-next build (x86_64 allmodconfig) produced this warning:
drivers/block/drbd/drbd_nl.c: In function 'drbd_nl_init':
drivers/block/drbd/drbd_nl.c:2309: warning: passing argument 3 of 'cn_add_callback' from incompatible pointer type
include/linux/connector.h:167: note: expected 'void (*)(struct cn_msg *, struct netlink_skb_parms *)' but argument is of type 'void (*)(struct cn_msg *)'
--
Cheers,
Stephen Rothwell sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 169 bytes --]
_______________________________________________
drbd-dev mailing list
drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org
http://lists.linbit.com/mailman/listinfo/drbd-dev
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <20091006140154.8d94d95c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>]
* Re: linux-next: block/drbd tree build warning [not found] ` <20091006140154.8d94d95c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org> @ 2009-10-06 7:17 ` Lars Ellenberg 2009-10-06 7:31 ` Jens Axboe 0 siblings, 1 reply; 3+ messages in thread From: Lars Ellenberg @ 2009-10-06 7:17 UTC (permalink / raw) To: Stephen Rothwell Cc: linux-next-u79uwXL29TY76Z2rM5mHXA, drbd-dev-cunTk1MwBs8qoQakbn7OcQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Philipp Reisner, Jens Axboe On Tue, Oct 06, 2009 at 02:01:54PM +1100, Stephen Rothwell wrote: > Hi Jens, Philipp, > > Today's linux-next build (x86_64 allmodconfig) produced this warning: > > drivers/block/drbd/drbd_nl.c: In function 'drbd_nl_init': > drivers/block/drbd/drbd_nl.c:2309: warning: passing argument 3 of 'cn_add_callback' from incompatible pointer type > include/linux/connector.h:167: note: expected 'void (*)(struct cn_msg *, struct netlink_skb_parms *)' but argument is of type 'void (*)(struct cn_msg *)' Thanks, expected after our connector related patches got in. -- Author: Philipp Reisner <philipp.reisner-63ez5xqkn6DQT0dZR+AlfA@public.gmane.org> Date: Tue Sep 29 13:35:30 2009 +0200 drbd: Work on permission enforcement Now we have the capabilities of the sending process available, use them to enforce CAP_SYS_ADMIN. Signed-off-by: Philipp Reisner <philipp.reisner-63ez5xqkn6DQT0dZR+AlfA@public.gmane.org> diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 1927ace..00ce3a4 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -2002,7 +2002,7 @@ static struct cn_handler_struct cnd_table[] = { [ P_new_c_uuid ] = { &drbd_nl_new_c_uuid, 0 }, }; -static void drbd_connector_callback(struct cn_msg *req) +static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms *nsp) { struct drbd_nl_cfg_req *nlp = (struct drbd_nl_cfg_req *)req->data; struct cn_handler_struct *cm; @@ -2019,6 +2019,11 @@ static void drbd_connector_callback(struct cn_msg *req) return; } + if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) { + retcode = ERR_PERM; + goto fail; + } + mdev = ensure_mdev(nlp); if (!mdev) { retcode = ERR_MINOR_INVALID; diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 69dc711..233db5c 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h @@ -138,6 +138,7 @@ enum drbd_ret_codes { ERR_VERIFY_RUNNING = 149, /* DRBD 8.2 only */ ERR_DATA_NOT_CURRENT = 150, ERR_CONNECTED = 151, /* DRBD 8.3 only */ + ERR_PERM = 152, /* insert new ones above this line */ AFTER_LAST_ERR_CODE ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: linux-next: block/drbd tree build warning 2009-10-06 7:17 ` Lars Ellenberg @ 2009-10-06 7:31 ` Jens Axboe 0 siblings, 0 replies; 3+ messages in thread From: Jens Axboe @ 2009-10-06 7:31 UTC (permalink / raw) To: Lars Ellenberg Cc: Stephen Rothwell, linux-next-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Philipp Reisner, drbd-dev-cunTk1MwBs8qoQakbn7OcQ On Tue, Oct 06 2009, Lars Ellenberg wrote: > On Tue, Oct 06, 2009 at 02:01:54PM +1100, Stephen Rothwell wrote: > > Hi Jens, Philipp, > > > > Today's linux-next build (x86_64 allmodconfig) produced this warning: > > > > drivers/block/drbd/drbd_nl.c: In function 'drbd_nl_init': > > drivers/block/drbd/drbd_nl.c:2309: warning: passing argument 3 of 'cn_add_callback' from incompatible pointer type > > include/linux/connector.h:167: note: expected 'void (*)(struct cn_msg *, struct netlink_skb_parms *)' but argument is of type 'void (*)(struct cn_msg *)' > > Thanks, expected after our connector related patches got in. Thanks for fixing it quickly, I've added the patch and updated for-next. -- Jens Axboe ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-06 7:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-06 3:01 linux-next: block/drbd tree build warning Stephen Rothwell
[not found] ` <20091006140154.8d94d95c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-10-06 7:17 ` Lars Ellenberg
2009-10-06 7:31 ` Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).