linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Greg KH <greg@kroah.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	"\"Salva Peiró\"" <speiro@ai2.upv.es>,
	"Daeseok Youn" <daeseok.youn@gmail.com>
Subject: linux-next: manual merge of the staging tree with the staging.current tree
Date: Thu, 6 Mar 2014 16:06:49 +1100	[thread overview]
Message-ID: <20140306160649.9564c40b8deaaf3b1e261a5b@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 5442 bytes --]

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in
drivers/staging/cxt1e1/linux.c between commit 084b6e7765b9
("staging/cxt1e1/linux.c: Correct arbitrary memory write in c4_ioctl()")
from the staging.current tree and commit 922b81b835c4 ("staging: cxt1e1:
remove space between function name and parenthesis") and a couple of
others from the staging tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/staging/cxt1e1/linux.c
index 79206cb3fb94,579e68e3dece..000000000000
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@@ -861,79 -876,78 +876,80 @@@ c4_ioctl(struct net_device *ndev, struc
  #endif
  
  #if 0
-     pr_info("c4_ioctl: iocmd %x, dir %x type %x nr %x iolen %d.\n", iocmd,
-             _IOC_DIR (iocmd), _IOC_TYPE (iocmd), _IOC_NR (iocmd),
-             _IOC_SIZE (iocmd));
+ 	pr_info("c4_ioctl: iocmd %x, dir %x type %x nr %x iolen %d.\n", iocmd,
+ 		_IOC_DIR(iocmd), _IOC_TYPE(iocmd), _IOC_NR(iocmd),
+ 		_IOC_SIZE(iocmd));
  #endif
-     iolen = _IOC_SIZE (iocmd);
-     if (iolen > sizeof(arg))
-         return -EFAULT;
-     data = ifr->ifr_data + sizeof (iocmd);
-     if (copy_from_user (&arg, data, iolen))
-         return -EFAULT;
- 
-     ret = 0;
-     switch (iocmd)
-     {
-     case SBE_IOC_PORT_GET:
-         //pr_info(">> SBE_IOC_PORT_GET Ioctl...\n");
-         ret = do_get_port (ndev, data);
-         break;
-     case SBE_IOC_PORT_SET:
-         //pr_info(">> SBE_IOC_PORT_SET Ioctl...\n");
-         ret = do_set_port (ndev, data);
-         break;
-     case SBE_IOC_CHAN_GET:
-         //pr_info(">> SBE_IOC_CHAN_GET Ioctl...\n");
-         ret = do_get_chan (ndev, data);
-         break;
-     case SBE_IOC_CHAN_SET:
-         //pr_info(">> SBE_IOC_CHAN_SET Ioctl...\n");
-         ret = do_set_chan (ndev, data);
-         break;
-     case C4_DEL_CHAN:
-         //pr_info(">> C4_DEL_CHAN Ioctl...\n");
-         ret = do_del_chan (ndev, data);
-         break;
-     case SBE_IOC_CHAN_NEW:
-         ret = do_create_chan (ndev, data);
-         break;
-     case SBE_IOC_CHAN_GET_STAT:
-         ret = do_get_chan_stats (ndev, data);
-         break;
-     case SBE_IOC_LOGLEVEL:
-         ret = do_set_loglevel (ndev, data);
-         break;
-     case SBE_IOC_RESET_DEV:
-         ret = do_reset (ndev, data);
-         break;
-     case SBE_IOC_CHAN_DEL_STAT:
-         ret = do_reset_chan_stats (ndev, data);
-         break;
-     case C4_LOOP_PORT:
-         ret = do_port_loop (ndev, data);
-         break;
-     case C4_RW_FRMR:
-         ret = do_framer_rw (ndev, data);
-         break;
-     case C4_RW_MSYC:
-         ret = do_musycc_rw (ndev, data);
-         break;
-     case C4_RW_PLD:
-         ret = do_pld_rw (ndev, data);
-         break;
-     case SBE_IOC_IID_GET:
-         ret = (iolen == sizeof (struct sbe_iid_info)) ? c4_get_iidinfo (ci, &arg.u.iip) : -EFAULT;
-         if (ret == 0)               /* no error, copy data */
-             if (copy_to_user (data, &arg, iolen))
-                 return -EFAULT;
-         break;
-     default:
-         //pr_info(">> c4_ioctl: EINVAL - unknown iocmd <%x>\n", iocmd);
-         ret = -EINVAL;
-         break;
-     }
-     return mkret (ret);
+ 	iolen = _IOC_SIZE(iocmd);
++	if (iolen > sizeof(arg))
++		return -EFAULT;
+ 	data = ifr->ifr_data + sizeof(iocmd);
+ 	if (copy_from_user(&arg, data, iolen))
+ 		return -EFAULT;
+ 
+ 	ret = 0;
+ 	switch (iocmd)
+ 	{
+ 	case SBE_IOC_PORT_GET:
+ 		//pr_info(">> SBE_IOC_PORT_GET Ioctl...\n");
+ 		ret = do_get_port(ndev, data);
+ 		break;
+ 	case SBE_IOC_PORT_SET:
+ 		//pr_info(">> SBE_IOC_PORT_SET Ioctl...\n");
+ 		ret = do_set_port(ndev, data);
+ 		break;
+ 	case SBE_IOC_CHAN_GET:
+ 		//pr_info(">> SBE_IOC_CHAN_GET Ioctl...\n");
+ 		ret = do_get_chan(ndev, data);
+ 		break;
+ 	case SBE_IOC_CHAN_SET:
+ 		//pr_info(">> SBE_IOC_CHAN_SET Ioctl...\n");
+ 		ret = do_set_chan(ndev, data);
+ 		break;
+ 	case C4_DEL_CHAN:
+ 		//pr_info(">> C4_DEL_CHAN Ioctl...\n");
+ 		ret = do_del_chan(ndev, data);
+ 		break;
+ 	case SBE_IOC_CHAN_NEW:
+ 		ret = do_create_chan(ndev, data);
+ 		break;
+ 	case SBE_IOC_CHAN_GET_STAT:
+ 		ret = do_get_chan_stats(ndev, data);
+ 		break;
+ 	case SBE_IOC_LOGLEVEL:
+ 		ret = do_set_loglevel(ndev, data);
+ 		break;
+ 	case SBE_IOC_RESET_DEV:
+ 		ret = do_reset(ndev, data);
+ 		break;
+ 	case SBE_IOC_CHAN_DEL_STAT:
+ 		ret = do_reset_chan_stats(ndev, data);
+ 		break;
+ 	case C4_LOOP_PORT:
+ 		ret = do_port_loop(ndev, data);
+ 		break;
+ 	case C4_RW_FRMR:
+ 		ret = do_framer_rw(ndev, data);
+ 		break;
+ 	case C4_RW_MSYC:
+ 		ret = do_musycc_rw(ndev, data);
+ 		break;
+ 	case C4_RW_PLD:
+ 		ret = do_pld_rw(ndev, data);
+ 		break;
+ 	case SBE_IOC_IID_GET:
+ 		ret = (iolen == sizeof(struct sbe_iid_info)) ?
+ 		       c4_get_iidinfo(ci, &arg.u.iip) : -EFAULT;
+ 		if (ret == 0)               /* no error, copy data */
+ 			if (copy_to_user(data, &arg, iolen))
+ 				return -EFAULT;
+ 		break;
+ 	default:
+ 		//pr_info(">> c4_ioctl: EINVAL - unknown iocmd <%x>\n", iocmd);
+ 		ret = -EINVAL;
+ 		break;
+ 	}
+ 	return mkret(ret);
  }
  
  static const struct net_device_ops c4_ops = {

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2014-03-06  5:06 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06  5:06 Stephen Rothwell [this message]
2014-03-06  5:11 ` linux-next: manual merge of the staging tree with the staging.current tree Greg KH
2014-03-17 18:29 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2023-01-19  3:56 Stephen Rothwell
2022-06-14  2:24 Stephen Rothwell
2022-06-14  6:42 ` Greg KH
2022-06-20  7:00 ` Greg KH
2021-09-22  2:45 Stephen Rothwell
2021-09-22  6:48 ` Greg KH
2020-04-24  5:15 Stephen Rothwell
2020-04-24  6:45 ` Greg KH
2020-04-28 12:15   ` Greg KH
2020-04-28 12:55     ` Stephen Rothwell
2019-12-13  1:05 Stephen Rothwell
2019-12-14 12:19 ` Greg KH
2019-04-08  3:02 Stephen Rothwell
2019-04-08  8:14 ` Jonathan Cameron
2019-04-08 10:01   ` Andy Shevchenko
2019-04-08 10:14     ` Jonathan Cameron
2019-04-08 10:34       ` Andy Shevchenko
2019-04-08 12:01         ` Jonathan Cameron
2019-04-09 15:39           ` Andy Shevchenko
2019-04-10  6:34             ` Alexandru Ardelean
2017-12-04  1:50 Stephen Rothwell
2017-12-04  9:09 ` Greg KH
2017-12-04 10:00   ` Jonathan Cameron
2017-12-06 14:50 ` Greg KH
2017-07-19  3:07 Stephen Rothwell
2017-07-19  6:07 ` Greg KH
2017-07-19  8:30   ` Marcus Wolf
2017-07-20  8:19     ` Greg KH
2017-01-30  3:59 Stephen Rothwell
2016-06-14  5:04 Stephen Rothwell
2016-06-19 20:17 ` Jonathan Cameron
2016-04-27  4:54 Stephen Rothwell
2016-04-27 12:37 ` Jonathan Cameron
2016-04-05  3:03 Stephen Rothwell
2016-04-05  4:41 ` Greg KH
2016-02-01  3:45 Stephen Rothwell
2016-02-01  4:01 ` Greg KH
2014-05-01  4:37 Stephen Rothwell
2014-05-01  4:47 ` Greg KH
2014-04-17  4:31 Stephen Rothwell
2014-04-17 16:17 ` Greg KH
2013-12-04  2:06 Stephen Rothwell
2013-11-27  2:01 Stephen Rothwell
2013-11-27  3:20 ` Greg KH
2013-09-23  3:21 Stephen Rothwell
2013-09-23  5:52 ` Jonathan Cameron
2013-09-23  3:16 Stephen Rothwell
2013-09-23  5:54 ` Jonathan Cameron
2012-10-25  2:19 Stephen Rothwell
2012-10-25 12:42 ` Ian Abbott
2011-06-09  6:58 Stephen Rothwell
2011-06-09 18:41 ` Greg KH
2011-06-09 20:51   ` Greg KH
2011-06-09  6:58 Stephen Rothwell
2011-06-09 18:42 ` Greg KH
2011-06-09 20:51   ` Greg KH
2011-06-28 14:07     ` Arjan Mels
2011-06-28 14:43       ` Greg KH
2011-04-06  4:41 Stephen Rothwell
2011-04-06  5:12 ` Greg KH
2011-02-10  5:35 Stephen Rothwell
2011-02-10 11:24 ` Nitin Gupta
2011-02-10 14:43 ` Robert Jennings
2011-02-10 18:50 ` Greg KH
2011-02-18 20:13 ` Greg KH
2011-01-31  5:16 Stephen Rothwell
2011-01-31 18:47 ` Greg KH
2011-02-02 21:58 ` Greg KH
2011-01-31  5:09 Stephen Rothwell
2011-01-31  8:52 ` Arend van Spriel
2011-02-02 21:58 ` Greg KH
2010-12-02  2:22 Stephen Rothwell
2010-12-02  3:20 ` Randy Dunlap
2010-12-02  4:00 ` Greg KH
2010-12-08 22:27   ` Greg KH
2010-11-10  2:24 Stephen Rothwell
2010-11-10 18:40 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140306160649.9564c40b8deaaf3b1e261a5b@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=daeseok.youn@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=speiro@ai2.upv.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).